vv icon indicating copy to clipboard operation
vv copied to clipboard

No window opens, menus disabled

Open ronen opened this issue 4 years ago • 3 comments

When I run vv 2.3.0, the app starts but there's no window and all menu options are greyed out. This happens whether running from the command line or directly launching VV.app from finder. It would guess it's due to an unhandled promise rejection:

$ vv --debug
(node:11132) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(node:11132) UnhandledPromiseRejectionWarning: [object Array]
(node:11132) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11132) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Here's my environment info:

$ sw_vers
ProductName:	macOS
ProductVersion:	11.2.2
BuildVersion:	20D80
$ node --version
v15.10.0
$ nvim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20210221-22062-cmfqom/neovim-0.4.4/build/config -I/tmp/neovim-20210221-22062-cmfqom/neovim-0.4.4/src -I/usr/local/include -I/usr/local/opt/luv/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210221-22062-cmfqom/neovim-0.4.4/build/src/nvim/auto -I/tmp/neovim-20210221-22062-cmfqom/neovim-0.4.4/build/include
Compiled by brew@BigSur

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.4_1/share/nvim"

Run :checkhealth for more info
$

Any ideas?

Thanks!

PS. This has been happening for me for quite a while actually, with older versions of everything, but I've been too lame to try debugging and report the issue and have simply not been using vv 😞 Just tried again with the latest version hoping it would be fixed but same thing.

ronen avatar Mar 06 '21 07:03 ronen

Hi @ronen. Thank you for reporting this.

I am still investigating, but I suspect that might be related to the VVprojectRoot function we discussed in https://github.com/vv-vim/vv/issues/36#issuecomment-671109758. I irresponsibly call it without error handling.

If I add this to my nvim config:

function! VVprojectRoot()
  throw "error"
endfunction

I am getting the same unhandled promise error, but the only difference that I still have the first window open, but can't open new ones. If you have custom VVprojectRoot, can you try to disable it and run VV?

Also I updated it to 2.4.0 few days ago. I doubt it will fix this issue, but still.

igorgladkoborodov avatar Mar 07 '21 07:03 igorgladkoborodov

You got it! I had a VVprojectRoot function in my init, if I comment it out then the window opens and vv functions normally. Now I just need to fix up that function :)

Thanks!

ronen avatar Mar 07 '21 14:03 ronen

Great. I'll need to handle possible errors there anyway, will do it shortly.

igorgladkoborodov avatar Mar 07 '21 19:03 igorgladkoborodov