-
Notifications
You must be signed in to change notification settings - Fork 66
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
presence.nvim doesn't start, getting an exception instead #88
presence.nvim doesn't start, getting an exception instead #88
Comments
Same error on Gentoo and NVIM 0.9.0 |
I think I found the issue, the logging function on line 358 (provided below) in self.log:info(string.format("Authorized with Discord for %s", response.data.user.username)) |
Same issue here, on Arch and Neovim v0.9.1. Nearly identical error trace; the relevant line has moved slightly, but it's the same code that @isopropyletherperoxide indicated above. Prior to experiencing this issue, I had not changed anything in my configuration (or even updated this extension, though doing that doesn't resolve the issue either). Maybe something has changed on Discord's end? |
Same error and for me it only crashes when discord is open |
Yep. That should be because it doesn't try to talk to Discord when the latter is closed. |
well the crash happens cause response is nil so i added nil protection |
Adding this bit of code will fix it, don't know a thing about lua but just adding a protection if response != nil fixed it. if response ~= nil then
self.log:info(string.format("Authorized with Discord for %s", response.data.user.username))
self.is_authorized = true
end |
I don't know if this is happening with anyone else but after adding nil protection there isn't an error anymore but my RPC is dropping randomly after a little bit of time. |
Feels to me like the nil response might indicate a larger issue with authorization (potentially explaining @grififth 's dropped connections?), but I'm unfortunately not familiar enough with Discord to really dig into this. |
Description
I followed the installation steps but I'm getting an exception instead and Discord shows nothing.
I don't think it's a problem with my system because elcord.el on Emacs works fine. It looks like the same error as #70 but I'm not using alpha-nvim and I tested it with a minimal configuration.
There's my config:
Neovim version
OS information
fedora 36
Steps to reproduce
Logs
[presence.nvim] Setting up plugin for linux
[presence.nvim] Using user-defined Discord client id
[presence.nvim] Using runtime path: /run/user/1000
[presence.nvim] Using Discord IPC socket path: /run/user/1000/discord-ipc-0
[presence.nvim] Checking Discord IPC socket at /run/user/1000/discord-ipc-0...
[presence.nvim] Using id 98584a77-cb5a-487f-96c0-bc52a0867ef7
[presence.nvim] Completed plugin setup
[presence.nvim] Getting nvim socket paths...
[presence.nvim] Executing command:
ss -lx|grep "nvim.*/0"
[presence.nvim] Checked Discord IPC socket, looks good!
[presence.nvim] Handling BufEnter event...
[presence.nvim] Connecting to Discord...
[presence.nvim] Connected to Discord
[presence.nvim] Authorizing with Discord...
[presence.nvim] Wrote message to pipe
[presence.nvim] Got nvim socket paths: {}
[presence.nvim] No other remote nvim instances
Error executing vim.schedule lua callback: ...te/pack/packer/start/presence.nvim/lua/presence/init.lua:348: attempt to index local 'response' (a nil value)
stack traceback:
...te/pack/packer/start/presence.nvim/lua/presence/init.lua:348: in function 'on_done'
...pack/packer/start/presence.nvim/lua/presence/discord.lua:186: in function <...pack/packer/start/presence.nvim/lua/presence/discord.lua:185>
The text was updated successfully, but these errors were encountered: