Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/projects fails to load if there exists a project with a blank name #62

Closed
thehale opened this issue Apr 25, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@thehale
Copy link

thehale commented Apr 25, 2022

Issue

When clicking on the Projects tab in the sidebar, my local instance of Hakatime sits on the loading screen forever.

Expected Behavior

Clicking on the Projects tab should pull up details about one of my projects, just like in the demo environment.

Steps to Reproduce

  1. Use VS Code on a random file, outside of any specific project, for a few minutes.
  2. Open Hakatime, log in, click on Projects and see the loading screen perpetually.

Suspected Root Cause

  • Looking in the Browser dev tools under Network I see a successful request to http://<my-hakatime-url>/api/v1/projects?start=2022-04-10T03%3A30%3A55.667Z&end=2022-04-25T03%3A30%3A55.667Z that returns my list of projects ["", "asu", "hakatime", "DIY-Supercube"].
  • Immediately after that successful request is a failed request to http://<my-hakatime-url>/api/v1/users/current/projects/?start=2022-04-10T03%3A30%3A55.667Z&end=2022-04-25T03%3A30%3A55.667Z&timeLimit=15 that returns a 404.

If I manually log into the hakatime db and delete all heartbeats with a blank project name, the page loads successfully.

Video for extra clarity:

hakatime_projects_bug.mp4
@mujx mujx added the bug Something isn't working label Apr 25, 2022
@JamesDAdams
Copy link

same

@mujx mujx closed this as completed in 6865126 Sep 17, 2022
@mujx
Copy link
Owner

mujx commented Sep 17, 2022

Thanks a lot @thehale for the detailed bug report. I was able to reproduce and fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants