Heatmap never loads (since introduced) #3225

Closed
opened 2025-11-02 05:04:35 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @jamiew0w on GitHub (Apr 22, 2019).

  • Gitea version (or commit ref): 1.8
  • Git version: 2.7.4
  • Operating system: ubuntu 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Since the heatmap has been introduced, it has never loaded correctly on my instance.

I read through previous issues surrounding this and tested - it's not related to only users pre-introduction. I made a new one, created repo - still infinitely loading. I am using remote mysql but it's setup correctly in the app.ini. Lastly, the reverse proxy settings are correct and the logs don't have any errors. I'm unsure if the xorm logs will be useful, if they're needed let me know and I'd be happy to attach.

I'm also not using mysql 8 - mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64).

All requests at the reverse proxy are 200s also, no errors in browser console either.
...

Screenshots

^ The screenshot is a little misleading by the way, I've waited minutes and nothing ever loads.

Logs

Reverse proxy - [redacted]

Nothing in error logs. Cloudflare IP also, that's the full login and to where it loads forever.

Gitea - [redacted]

Nothing suspect.

serv.log is just this repeated, don't think it will be related (all from 2018 for what it's worth)

2018/10/27 18:22:30 [T] UpdatePublicKeyUpdated: http://localhost:3000/api/internal/ssh/1/update

The xorm.log does have some more info, I'm not sure how relevant it'll be. I just redacted the email;

[redacted]

The only thing I can think of is my app.ini is a bit dated and missing a bunch of the options, however I don't see anything (apart from the show heatmap option) which would be related.

Originally created by @jamiew0w on GitHub (Apr 22, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8 - Git version: 2.7.4 - Operating system: ubuntu 16.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Since the heatmap has been introduced, it has never loaded correctly on my instance. I read through previous issues surrounding this and tested - it's not related to only users pre-introduction. I made a new one, created repo - still infinitely loading. I am using remote mysql but it's setup correctly in the app.ini. Lastly, the reverse proxy settings are correct and the logs don't have any errors. I'm unsure if the xorm logs will be useful, if they're needed let me know and I'd be happy to attach. I'm also *not* using mysql 8 - `mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64)`. All requests at the reverse proxy are 200s also, no errors in browser console either. ... ## Screenshots ![](https://imgs.ovh/i/86v4a.png) ^ The screenshot is a little misleading by the way, I've waited minutes and nothing ever loads. <!-- **If this issue involves the Web Interface, please include a screenshot** --> ## Logs Reverse proxy - [redacted] Nothing in error logs. Cloudflare IP also, that's the full login and to where it loads forever. Gitea - [redacted] Nothing suspect. serv.log is just this repeated, don't think it will be related (all from 2018 for what it's worth) ``` 2018/10/27 18:22:30 [T] UpdatePublicKeyUpdated: http://localhost:3000/api/internal/ssh/1/update ``` The xorm.log does have some more info, I'm not sure how relevant it'll be. I just redacted the email; [redacted] The only thing I can think of is my app.ini is a bit dated and missing a bunch of the options, however I don't see anything (apart from the show heatmap option) which would be related.
Author
Owner

@jolheiser commented on GitHub (Apr 22, 2019):

Have you tried with a fresh install of Gitea? (No need to delete other data, just temp move it perhaps)
Alternatively, have you tried with another DB or local connection to a DB?

Just trying to narrow down causes since the logs don't seem to have anything pointing to an error.

@jolheiser commented on GitHub (Apr 22, 2019): Have you tried with a fresh install of Gitea? (No need to delete other data, just temp move it perhaps) Alternatively, have you tried with another DB or local connection to a DB? Just trying to narrow down causes since the logs don't seem to have anything pointing to an error.
Author
Owner

@jamiew0w commented on GitHub (Apr 22, 2019):

@jolheiser Just tested with stopping gitea - swapping to sqlite3 and restarting. Made a new user, didn't work, made a new repo - continued to load endlessly. I've swapped the logs to debug mode, is there anything in particular you'd be looking for?

I can whip up another VM tomorrow and try with a fresh install also, little late for that tonight though lol.

@jamiew0w commented on GitHub (Apr 22, 2019): @jolheiser Just tested with stopping gitea - swapping to sqlite3 and restarting. Made a new user, didn't work, made a new repo - continued to load endlessly. I've swapped the logs to debug mode, is there anything in particular you'd be looking for? I can whip up another VM tomorrow and try with a fresh install also, little late for that tonight though lol.
Author
Owner

@jolheiser commented on GitHub (Apr 22, 2019):

No problem, no rush.

As for anything specific, unfortunately right now I'm not sure what to look for.
I would assume the reason it is eterna-loading is because it never gets a response back from the API, but I'm not sure why yet.

@jolheiser commented on GitHub (Apr 22, 2019): No problem, no rush. As for anything specific, unfortunately right now I'm not sure what to look for. I would assume the reason it is eterna-loading is because it never gets a response back from the API, but I'm not sure why yet.
Author
Owner

@jamiew0w commented on GitHub (Apr 22, 2019):

Okay, I tested with copying the binary and specifying a new config with different port and the heatmap worked after this - that's with using sqlite3 too.

That does mean the app.ini works fine though, so I'm guessing it must be something with mysql but I have no idea what.

I ruled out the reverse proxy also - tested with naked IP and port and still occurs.

@jamiew0w commented on GitHub (Apr 22, 2019): Okay, I tested with copying the binary and specifying a new config with different port and the heatmap worked after this - that's with using sqlite3 too. That does mean the app.ini works fine though, so I'm guessing it must be something with mysql but I have no idea what. I ruled out the reverse proxy also - tested with naked IP and port and still occurs.
Author
Owner

@jolheiser commented on GitHub (Apr 22, 2019):

This is the URL that Gitea hits to get Heatmap data: https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L2494

What happens if you curl the API? Would look something like https://mydomain.com/api/v1/users/<username>/heatmap

If you need to play with the parameters a bit, you can hit your Swagger endpoint at https://mydomain.com/api/swagger which gives a nice GUI to use.

Here is the link to https://try.gitea.io swagger, for example: https://try.gitea.io/api/swagger#/user/userGetHeatmapData

@jolheiser commented on GitHub (Apr 22, 2019): This is the URL that Gitea hits to get Heatmap data: https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L2494 What happens if you curl the API? Would look something like `https://mydomain.com/api/v1/users/<username>/heatmap` If you need to play with the parameters a bit, you can hit your Swagger endpoint at `https://mydomain.com/api/swagger` which gives a nice GUI to use. Here is the link to https://try.gitea.io swagger, for example: https://try.gitea.io/api/swagger#/user/userGetHeatmapData
Author
Owner

@jamiew0w commented on GitHub (Apr 22, 2019):

Unfortunately I do get the same output on swagger on my instance as I do get on the try.gitea.io setup. Full json with timestamps and contributions. When logged in I can load the json just fine by manually browsing to https://domain.whatever/api/v1/users/jamie/heatmap

@jamiew0w commented on GitHub (Apr 22, 2019): Unfortunately I do get the same output on swagger on my instance as I do get on the try.gitea.io setup. Full json with timestamps and contributions. When logged in I can load the json just fine by manually browsing to https://domain.whatever/api/v1/users/jamie/heatmap
Author
Owner

@jolheiser commented on GitHub (Apr 22, 2019):

This is with your initial MySQL setup?

@jolheiser commented on GitHub (Apr 22, 2019): This is with your initial MySQL setup?
Author
Owner

@jamiew0w commented on GitHub (Apr 22, 2019):

Correct, yup! (bizarre right?)

edit; I think because this does work on a fresh install with sqlite3 that I'll re-install from scratch tomorrow just in-case something's awry. If everything works (with mysql) it won't take long to create and push up all the repos again anyway.

@jamiew0w commented on GitHub (Apr 22, 2019): Correct, yup! (bizarre right?) edit; I think because this *does work* on a fresh install with sqlite3 that I'll re-install from scratch tomorrow just in-case something's awry. If everything works (with mysql) it won't take long to create and push up all the repos again anyway.
Author
Owner

@jolheiser commented on GitHub (Apr 22, 2019):

Very odd. If the endpoint is working, the Vue component must be silently dying on something? I am not incredibly familiar with the heatmap component's internals, but it seems like we've narrowed it down to somewhere in there.
I'm a little surprised there's nothing in the browser console, though. Can you see where it is making the call to the API, and whether it is actually returning on the page?

@jolheiser commented on GitHub (Apr 22, 2019): Very odd. If the endpoint is working, the Vue component must be silently dying on something? I am not incredibly familiar with the heatmap component's internals, but it seems like we've narrowed it down to somewhere in there. I'm a little surprised there's nothing in the browser console, though. Can you see where it is making the call to the API, and whether it is actually returning on the page?
Author
Owner

@jamiew0w commented on GitHub (Apr 22, 2019):

Son of a ___, it's something to do with the styling.

If I swap it back to the default it works.

@jolheiser Thanks very much for your help with this, I appreciate it. Thanks also to you and the team for their work on Gitea, it really is brilliant.

@jamiew0w commented on GitHub (Apr 22, 2019): Son of a ___, it's something to do with the styling. If I swap it back to the default it works. ![](https://imgs.ovh/i/fj8e3.png) @jolheiser Thanks very much for your help with this, I appreciate it. Thanks also to you and the team for their work on Gitea, it really is brilliant.
Author
Owner

@jolheiser commented on GitHub (Apr 22, 2019):

oh well that's also interesting, I can't imagine why the other style would mess it up. Perhaps there was a caching issue. Regardless, glad to see it's working!

Thank you very much! 😄

@jolheiser commented on GitHub (Apr 22, 2019): *oh* well that's also interesting, I can't imagine why the other style would mess it up. Perhaps there was a caching issue. Regardless, glad to see it's working! Thank you very much! 😄
Author
Owner

@ramlev commented on GitHub (Aug 14, 2019):

Dont know if its ok to post here, but i have same issue, have installed gitea 1.9.0 on a docker container, and my heatmap doesnt work.

When i try the endpoint in swagger the response is

{
  "message": "Error 1305: FUNCTION gitea.strftime does not exist",
  "url": "https://my.host.com/api/swagger"
}
@ramlev commented on GitHub (Aug 14, 2019): Dont know if its ok to post here, but i have same issue, have installed gitea 1.9.0 on a docker container, and my heatmap doesnt work. When i try the endpoint in swagger the response is ```json { "message": "Error 1305: FUNCTION gitea.strftime does not exist", "url": "https://my.host.com/api/swagger" }
Author
Owner

@lunny commented on GitHub (Aug 14, 2019):

@ramlev Please fire another issue with more detail there.

@lunny commented on GitHub (Aug 14, 2019): @ramlev Please fire another issue with more detail there.
Author
Owner

@ramlev commented on GitHub (Aug 26, 2019):

i just restarted the docker container, then everything worked.

@ramlev commented on GitHub (Aug 26, 2019): i just restarted the docker container, then everything worked.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3225