Skip to content

Error: attempt to index local 'response' (a nil value) on Linux. #164

@Crehab

Description

@Crehab

Description

Hello,

I'm encountering a persistent error with the plugin. It seems to be unable to get a valid response from the Discord client.

Error Message:
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/presence.nvim/lua/presence/init.lua:358: attempt to index local 'response' (a nil value) stack traceback: ...ocal/share/nvim/lazy/presence.nvim/lua/presence/init.lua:358: in function 'on_done' ...l/share/nvim/lazy/presence.nvim/lua/presence/discord.lua:186: in function <...l/share/nvim/lazy/presence.nvim/lua/presence/discord.lua:185>

Discord Version:

  • stable 432290 (d874666)
  • Host 0.0.104 x64 Build Override: N/A Linux 64-bit (6.14.0-28-generic)
  • Vencord 9329467 (Standalone)
  • Electron 35.3.0
  • Chromium 134.0.6998.205

Installation Methods:

  • Discord is installed from the official .deb package.
  • presence.nvim is installed using lazy.nvim with the LazyVim starter.

Troubleshooting Steps I've Already Taken:

Confirmed "Activity Status" is enabled in Discord settings.

Confirmed the Discord desktop client is running.

Updated all plugins with :Lazy.

Completely restarted both Neovim and Discord.

Confirmed Discord is not a Snap or Flatpak.

Cleared the Discord cache (~/.config/discord/Cache).

Cleared the Discord IPC sockets ($XDG_RUNTIME_DIR/discord-ipc-*).

The error still occurs after all of these steps. It seems to be a bug. Thank you for your help!

Neovim version

NVIM v0.11.3
Build type: RelWithDebInfo
LuaJIT 2.1.1741730670

OS information

Ubuntu 25.04 (Plucky Puffin)

Steps to reproduce

Steps to Reproduce

Start with a clean installation of the LazyVim starter.

Add the presence.nvim plugin to lua/plugins/presence.lua with the default configuration.

Restart Neovim. LazyVim will install the plugin.

Ensure the Discord desktop client (native .deb version) is running and "Activity Status" is enabled.

Open any file in Neovim.

The error appears in the notifications or when checking :messages.

Logs

[presence.nvim] Setting up plugin for linux
[presence.nvim] Using user-defined Discord client id
[presence.nvim] Duplicate options: g:presence_auto_update and setup option auto_update
[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 cc7c07cc-a0c7-41d9-b0b2-1bd96901d89c
[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] Checked Discord IPC socket, looks good!
[presence.nvim] Handling WinLeave event...
[presence.nvim] Handling WinEnter event...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Connecting to Discord...
[presence.nvim] Connected to Discord
[presence.nvim] Authorizing with Discord...
[presence.nvim] Handling WinLeave event...
[presence.nvim] Handling WinEnter event...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Handling WinEnter event...
[presence.nvim] Handling WinEnter event...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Handling TextChanged event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Not canceling presence due to switching to a window within the same instance...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Wrote message to pipe
[presence.nvim] Not canceling presence due to switching to a window within the same instance...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Got nvim socket paths: {}
[presence.nvim] No other remote nvim instances
[presence.nvim] Got nvim socket paths: {}
[presence.nvim] No other remote nvim instances
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Handling WinLeave event...
[presence.nvim] Handling WinEnter event...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Canceling presence due to leaving window...
[presence.nvim] Canceling Discord presence...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Wrote message to pipe
[presence.nvim] Handling TextChanged event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Handling TextChanged event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Handling TextChanged event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Failed to decode payload: '{�
[presence.nvim] Canceled Discord presence
[presence.nvim] Handling FocusGained event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Handling WinLeave event...
[presence.nvim] Handling WinEnter event...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Handling BufAdd event...
[presence.nvim] Handling BufEnter event...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Not canceling presence due to switching to a window within the same instance...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Currently authorizing with Discord, scheduling callback for later...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...
[presence.nvim] Parsed filename nil with no extension
[presence.nvim] No status text for the given buffer, skipping...

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