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

WakaTimeToday permission denied #131

Closed
harryghgim opened this issue Feb 20, 2022 · 9 comments
Closed

WakaTimeToday permission denied #131

harryghgim opened this issue Feb 20, 2022 · 9 comments

Comments

@harryghgim
Copy link

Hi. Thanks for the great vim plugin.

My issue is even if I registered my api key, my wakatime dashboard won't show the sign of vim as registered editor. I ran :WakaTimeApiKey and pasted my api key from dashboard, and also made sure that my ~/.wakatime.cfg has api_keyvalue in it.

I use wakatime with vscode and sublime text, and no such non-recognition issue happened with them.

And as a related issue I suspect, when I run :WakaTimeToday, I see this sign on the bottom:

Today: zsh:1: permission denied: /Users/gwanghyeongim/.wakatime/wakatime-cli

But when I run this file in shell, it seems at least I don't have permission error.

What do you think seems to be the reason of the problem?

For better reproduction of the issue my environments are as follow:

  • macOs Cataliana Version 10.15.7
  • Vim 8.2
@kidonng
Copy link

kidonng commented Feb 20, 2022

Try setting the symlink yourself:

ln -s $(basename ~/.wakatime/*) ~/.wakatime/wakatime-cli

The symlink will be created automatically if you install the CLI via this plugin.

Or alternatively set g:wakatime_CLIPath.

@alanhamlett
Copy link
Member

@harryghgim try adding debug = true to your ~/.wakatime.cfg file then start Vim and look for an error message at the bottom.

Every time vim-wakatime loads (on Vim startup) it runs this install script which should create the symlink. If it's failing there should be an error printed with debug = true.

@harryghgim
Copy link
Author

@harryghgim try adding debug = true to your ~/.wakatime.cfg file then start Vim and look for an error message at the bottom.

Every time vim-wakatime loads (on Vim startup) it runs this install script which should create the symlink. If it's failing there should be an error printed with debug = true.

@alanhamlett After I set debug = true in cfg file, no earlier than I had set let g:wakatime_CLIPath='/Users/gwanghyeongim/.wakatime/wakatime-cli' in my vimrc, I see this error message. Maybe my path is wrong somehow?

Screen Shot 2022-02-22 at 12 43 38 AM

@kidonng I ran the command, and the result says

ln: /Users/gwanghyeongim/.wakatime/wakatime-cli/wakatime-cli: File exists

So I tried g:wakatime_CLIPath as above, it doesn't seem to help me much either.

I have a feeling that I've missed something too obvious to miss in the end...

@alanhamlett
Copy link
Member

That error shown is:
Error: sh: /Users/gwanghyeongim/.wakatime/wakatime-cli: is a directory

Try deleting your ~/.wakatime/ folder then re-launch Vim.

@harryghgim
Copy link
Author

@alanhamlett Thank you so much. My issue is solved now and I'm closing it.

@alanhamlett
Copy link
Member

Also, remember to turn off debug mode so your Vim performance won't be impacted:

:WakaTimeDebugDisable

@alanhamlett
Copy link
Member

f922f82 should prevent this from happening in the future.

@OGoodness
Copy link

Having a similar issue, it's trying to run the folder instead of running the binary inside of the folder

@alanhamlett
Copy link
Member

alanhamlett commented Mar 10, 2022

You're using the latest vim-wakatime? This change should remove the old directory, so maybe you're not on the latest?

shutil.rmtree(os.path.join(getResourcesFolder(), 'wakatime-cli'))

If you're using the latest vim-wakatime, try deleting the ~/.wakatime/ folder then restart Vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants