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

Can't sync updates to todoist #22

Open
mibzman opened this issue Mar 3, 2022 · 5 comments
Open

Can't sync updates to todoist #22

mibzman opened this issue Mar 3, 2022 · 5 comments

Comments

@mibzman
Copy link

mibzman commented Mar 3, 2022

When trying to create or edit a task, or refreshing, I get this error:

Error detected while processing function Todoist__onRefresh[1]..remote#define#notify:
line    6:
E475: Invalid argument: Channel doesn't exist

I

@romgrk
Copy link
Owner

romgrk commented May 14, 2022

Can't reproduce :| Any other details?

@Frederick888
Copy link

@romgrk I'm seeing the same error. I can use :Todoist Testing to create a new project (and I can see it in todoist.com), but if I try creating a new task with o, it just silently fails.

Then if I r or o again, I see the same error as @mibzman posted.

Neovim version:

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Node: v18.1.0. Neovim node package: [email protected].

Minimal vimrc I used to reproduce this issue:

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath

call plug#begin('~/.vim/plugged')
Plug 'romgrk/todoist.nvim', { 'do': ':TodoistInstall' }
call plug#end()

set nocompatible
set updatetime=300
set cmdheight=2

:checkhealth reported no errors. Node section:

## Node.js provider (optional)
  - INFO: Node.js: v18.1.0
  - INFO: Nvim node.js host: /home/frederick/.npm-global/lib/node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.10.1

@irishmac473
Copy link

I am having the exact same problem as @Frederick888.

@romgrk
Copy link
Owner

romgrk commented Jul 31, 2022

Sorry this will probably be inconvenient, but the only I'll be able to provide assistance is if you enable debug logging by setting the correct level and providing a log file path, see https://github.com/neovim/node-client#logging

I've tested creating a new project & tasks, both succeed on my end.

@Frederick888
Copy link

Logs:

{"level":"debug","message":"host.start"}
{"level":"info","message":"handleRequest: "}
{"level":"debug","message":"request received: "}
{"level":"info","message":"handleNotification: "}
{"level":"debug","message":"host.handlePlugin: "}
{"level":"debug","message":"createPlugin./home/frederick/.vim/plugged/todoist.nvim/rplugin/node/todoist.clearCache: true"}
{"level":"debug","message":"getPlugin.alwaysInit"}
{"level":"debug","message":"request -> neovim.api.nvim_eval"}
{"level":"debug","message":"response -> neovim.api.nvim_eval: [object Object]"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: -1"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_get_current_buf"}
{"level":"debug","message":"response -> neovim.api.nvim_get_current_buf: [object Object]"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"info","message":"handleNotification: "}
{"level":"debug","message":"host.handlePlugin: "}
{"level":"debug","message":"getPlugin.useCachedPlugin"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 3"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: Hello, world!"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: "}
{"level":"debug","message":"request -> neovim.api.nvim_call_function"}
{"level":"debug","message":"response -> neovim.api.nvim_call_function: 0"}

And here's a Dockerfile to reproduce this issue:

FROM archlinux:latest

RUN pacman -Sy --noconfirm
RUN pacman -Sy --noconfirm neovim git nodejs npm curl
RUN npm install -g neovim@latest

RUN mkdir -p /root/.config/nvim /root/.vim/autoload /root/.vim/plugged
ADD ./init.vim /root/.config/nvim/init.vim
ADD ./rc.vim /root/.vimrc
RUN curl -fLo /root/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
RUN nvim +PlugInstall +qa

init.vim

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc

rc.vim

call plug#begin('~/.vim/plugged')
Plug 'romgrk/todoist.nvim', { 'do': ':TodoistInstall' }
call plug#end()

set nocompatible
set updatetime=300
set cmdheight=2

Put these three files in the same directory, then

$ docker build -t nvim .
$ docker run --rm -it -e "TODOIST_API_KEY=$TODOIST_API_KEY" nvim bash
# In container
$ cd
$ nvim .vimrc
# In Neovim
:TodoistInstall  <-- somehow I needed to run this again, probably due to how post-upgrade hooks are handled by vim-plug

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