sg.nvim icon indicating copy to clipboard operation
sg.nvim copied to clipboard

`set_credentials` error when logging in with neovim

Open OZoneGuy opened this issue 10 months ago • 2 comments

Going through the setup guide in the README, I get this error when I run :SourcegraphLogin:

Failed to save credentials - Please report this error: set_credentials

At this URL: http://localhost:52068/api/sourcegraph/token?token=XXX.

I am using Firefox and on Arch Linux.

I tried disabling enhanced tracking protection, but still failed. It does create the token successfully.

Is there a place I can add the token manually, or do I need to add it as an env variable?

Please let me know if you need more information.

OZoneGuy avatar Mar 31 '24 07:03 OZoneGuy

Same setup. Same results. Has anyone found a workaround?

Cheezmeister avatar Aug 03 '24 08:08 Cheezmeister

I am on Ubuntu 22.04(WSL2), I have set the env variables SRC_ENDPOINT and SRC_ACCESS_TOKEN.

I got the same error in browser after SourceGraphLogin; however login is successful(I verified with :checkhealth sg) and I can open sourcegraph URLs in neovim with :edit <URL>. I am still facing issues with code intelligence though.

  • gr shows sourcegraph: -32700: lsif
  • K shows sourcegraph: -32700: No corresponding code intelligence
  • gd shows
    Error executing vim.schedule lua callback: 
    ...tvik_/.local/share/nvim/lazy/sg.nvim/lua/sg/lsp/init.lua:19: attempt to index local 'location' (a nil value)
    stack traceback:
          ...tvik_/.local/share/nvim/lazy/sg.nvim/lua/sg/lsp/init.lua:19: in function 'preload_file'
          ...tvik_/.local/share/nvim/lazy/sg.nvim/lua/sg/lsp/init.lua:81: in function 'handler'
          ...t/nvim-linux64/share/nvim/runtime/lua/vim/lsp/client.lua:685: in function ''
          vim/_editor.lua: in function <vim/_editor.lua:0>
    
    

hrutvikyadav avatar Aug 16 '24 08:08 hrutvikyadav