presence.nvim
presence.nvim copied to clipboard
Failed to decode payload: `'{^A`
Description
When trying to run this plugin in NvChad it fails to start. (I saw a similar error occur in #116 [here]).
Config
-- initialisation
{
"andweeb/presence.nvim",
lazy = false,
opts = function ()
return require "custom.configs.presence"
end,
config = function(_, opts)
require('presence').setup(opts)
end
}
-- custom.configs.presence file
local options = {
-- General options
-- auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
-- neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
-- main_image = "neovim", -- Main image display (either "neovim" or "file")
-- client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
-- log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
log_level = "debug",
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
enable_line_number = false, -- Displays the current line number instead of the current project
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
-- buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
-- file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
show_time = true, -- Show the timer
-- -- Rich Presence text options
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
}
return options
Neovim version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
OS information
Linux compooter 6.4.3-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:16 +0000 x86_64 GNU/Linux
Steps to reproduce
Clone https://github.com/Arthurdw/nv-chad-custom into the custom folder.
Uncomment the presence config in plugins.lua
.
:Lazy install
&| :MasonInstallAll
Logs
[presence.nvim] Setting up plugin for linux
[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 33e38e33-393f-492e-802e-9535f39c2aef
[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 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
[presence.nvim] Got nvim socket paths: {}
[presence.nvim] No other remote nvim instances
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>
[presence.nvim] Failed to decode payload: '{^A
Are you using the flathub version of discord?
~~Not sure, using whatever the aur set.~~
Edit: No, the AUR does not use the flatpak version.
I have the same error. Following what others have posted in other issues that reference this, I'm using Discord installed from the Arch Linux extra repo. My system and nvim plugins are all up-to-date. I even nuked my nvim install and reinstalled in case there was some caching issue with something else.
I'd like that there's been no commits to master since January, and no PR reviews from the author since last year.
can confirm I have this problem as well
I have the issue as well on Fedora. Discord is installed from copr.
Was anyone able to fix this issue for themselves? Facing the same issue on macos
macOS 14.4.1 23E224 arm64
Solution: uninstall unmaintained, and unnecessary, plugin.