Skip to content

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

@thehale

Description

@thehale

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions