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

Re-creating .wakatime-project #1103

Open
berkus opened this issue Sep 26, 2024 · 8 comments
Open

Re-creating .wakatime-project #1103

berkus opened this issue Sep 26, 2024 · 8 comments
Labels
bug Something isn't working triage

Comments

@berkus
Copy link

berkus commented Sep 26, 2024

Hi, I am a bit confused and need some discussion to understand if the problem is with wakatime or with my setup:

Now, my project is at work, so it uses all the hide_xxx options in wakatime config, and also a pre-existing committed .wakatime-project file. BUT, every time I do editing, this file is recreated with a new unique name, I do not yet know the frequency of this change, but I can see there are A LOT of random projects reported in the UI, each with approximately 10 minutes of time logged, so I suppose this re-creation happens at about 10 minute interval.

I want to understand why it is happening and how to prevent this? Any ideas are welcome, I will test them out.

@berkus berkus added the bug Something isn't working label Sep 26, 2024
@alanhamlett
Copy link
Member

The hide_project_names creates that file if it doesn't exist, but it should only create it once. One of these is happening:

  1. something is deleting the .wakatime-project file causing wakatime-cli to re-create it
  2. a bug in wakatime-cli is re-creating .wakatime-project because it thinks it doesn't exist

What version of wakatime-cli are you using? Run this to find out:

~/.wakatime/wakatime-cli --version

My guess is there's a bug in wakatime-cli where it fails reading the project file and then re-creates it.

@alanhamlett
Copy link
Member

Also, are there any errors in your ~/.wakatime/wakatime.log file? Could you paste the contents here, or if it's too large email to [email protected]?

@alanhamlett
Copy link
Member

Let's see if #1104 fixes it. That prevents ever re-creating an already existing .wakatime-project file.

After that's merged, run rm ~/.wakatime/wakatime-cli* then restart Zed to get the new wakatime-cli version. Then if you start seeing Unknown Project on your dashboard instead of random projects it means the fix worked, but wakatime-cli is having trouble reading your .wakatime-project file for some reason.

@berkus
Copy link
Author

berkus commented Sep 28, 2024

@alanhamlett thanks for prompt response!

~/.wakatime/wakatime-cli --version
fish: Unknown command

~/.wakatime/wakatime.log

{"caller":"cmd/run.go:156","func":"cmd.RunE","level":"warning","message":"one of the following parameters has to be provided: --config-read, --config-write, --entity, --file-experts, --offline-count, --print-offline-heartbeats, --sync-offline-activity, --today, --today-goal, --user-agent, --version","now":"2024-08-05T19:52:32+03:00","os/arch":"darwin/arm64","version":"v1.98.3"}
{"caller":"pkg/api/api.go:103","file":"/Users/berkus/**FILENAME REDACTED**","func":"api.isLocalIPv6","is_write":true,"level":"warning","message":"failed dialing to detect default local ip address: dial udp 143.244.210.202:80: connect: network is unreachable","now":"2024-09-09T15:55:30+03:00","os/arch":"darwin/arm64","plugin":"Zed/0.151.2 Zed-wakatime/0.1.2","time":1725886530,"version":"v1.98.3"}

nothing else in there.

@alanhamlett
Copy link
Member

Where's your wakatime-cli located? Maybe the Zed extension puts it inside the LSP extension's folder?

I think you need to re-install the zed extension to get the updated wakatime-cli.

@bestgopher
Copy link

@alanhamlett thanks for prompt response!

~/.wakatime/wakatime-cli --version fish: Unknown command

~/.wakatime/wakatime.log

{"caller":"cmd/run.go:156","func":"cmd.RunE","level":"warning","message":"one of the following parameters has to be provided: --config-read, --config-write, --entity, --file-experts, --offline-count, --print-offline-heartbeats, --sync-offline-activity, --today, --today-goal, --user-agent, --version","now":"2024-08-05T19:52:32+03:00","os/arch":"darwin/arm64","version":"v1.98.3"}
{"caller":"pkg/api/api.go:103","file":"/Users/berkus/**FILENAME REDACTED**","func":"api.isLocalIPv6","is_write":true,"level":"warning","message":"failed dialing to detect default local ip address: dial udp 143.244.210.202:80: connect: network is unreachable","now":"2024-09-09T15:55:30+03:00","os/arch":"darwin/arm64","plugin":"Zed/0.151.2 Zed-wakatime/0.1.2","time":1725886530,"version":"v1.98.3"}

nothing else in there.

~/Library/Application Support/Zed/extensions/work/wakatime/

@berkus
Copy link
Author

berkus commented Sep 30, 2024

~/Library/Application Support/Zed/extensions/work/wakatime/

ls: ~/Library/Application Support/Zed/extensions/work/wakatime/: No such file or directory

@bestgopher
Copy link

~/Library/Application Support/Zed/extensions/work/wakatime/

ls: ~/Library/Application Support/Zed/extensions/work/wakatime/: No such file or directory

If you don't see it, try reinstalling and check again.
image

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

No branches or pull requests

3 participants