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

unhandledRejection Promise #242

Open
eliasdaler opened this issue Feb 2, 2023 · 12 comments
Open

unhandledRejection Promise #242

eliasdaler opened this issue Feb 2, 2023 · 12 comments

Comments

@eliasdaler
Copy link

Hello.

coc-java worked fine for me, but recently it stopped working for some reason - it fails at the startup.

(I'll be happy to provide further info if needed)

  • Vim version: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 19 2022 18:24:48)
  • OS: macOS 13.0.1
  • coc.nvim version: 2.1.3
  • coc-java version: 1.14.1
$ java -version
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08)
OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08, mixed mode, sharing)

coc.nvim log:

vim version: VIM - Vi IMproved 9.0 9000800
node version: v18.11.0
coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800
coc.nvim directory: /Users/anon/.vim/bundle/coc.nvim
term: iTerm.app
platform: darwin

[...]

2023-02-02T13:09:33.076 INFO (pid:34131) [configurations] - Add folder configuration from cwd: /Users/anon/userverx/.vim/coc-settings.json
2023-02-02T13:09:33.177 INFO (pid:34131) [plugin] - coc.nvim initialized with node: v18.11.0 after 130
2023-02-02T13:09:43.241 ERROR (pid:34131) [timing] - activate coc-java timeout after 5000ms
2023-02-02T13:09:44.513 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: stopped => starting
2023-02-02T13:09:44.515 INFO (pid:34131) [language-client-index] - Language server "java" started with 34225
2023-02-02T13:09:45.241 ERROR (pid:34131) [language-client] - Sending request failed.
2023-02-02T13:09:45.241 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: starting => stopped
2023-02-02T13:09:45.241 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: stopped => starting
2023-02-02T13:09:45.397 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: starting => stopped
2023-02-02T13:09:45.397 ERROR (pid:34131) [server] - unhandledRejection  Promise {
  <rejected> ResponseError2: Pending response rejected since connection got disposed
      at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
      at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
      at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
      at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
      at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
      at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
      at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
      at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
      at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
      at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
    code: -32097,
    data: undefined
  }
} ResponseError2: Pending response rejected since connection got disposed
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
  code: -32097,
  data: undefined
}
2023-02-02T13:09:45.399 ERROR (pid:34131) [server] - unhandledRejection  Promise {
  <rejected> ResponseError2: Pending response rejected since connection got disposed
      at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
      at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
      at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
      at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
      at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
      at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
      at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
      at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
      at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
      at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
    code: -32097,
    data: undefined
  }
} ResponseError2: Pending response rejected since connection got disposed
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
  code: -32097,
  data: undefined
}
2023-02-02T13:09:45.399 ERROR (pid:34131) [server] - unhandledRejection  Promise {
  <rejected> ResponseError2: Pending response rejected since connection got disposed
      at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
      at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
      at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
      at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
      at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
      at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
      at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
      at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
      at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
      at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
    code: -32097,
    data: undefined
  },
  dispose: [Function (anonymous)]
} ResponseError2: Pending response rejected since connection got disposed
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
  code: -32097,
  data: undefined
}
2023-02-02T13:09:45.401 INFO (pid:34131) [language-client-index] - Language server "java" started with 34226
2023-02-02T13:09:46.083 ERROR (pid:34131) [language-client] - Sending request failed.
2023-02-02T13:09:46.083 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: stopped => starting
2023-02-02T13:09:46.253 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: starting => stopped
2023-02-02T13:09:46.253 ERROR (pid:34131) [services] - Server java failed to start: ResponseError2: Pending response rejected since connection got disposed
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:15673:25)
    at Object.dispose (/Users/anon/.vim/bundle/coc.nvim/build/index.js:66855:31)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67788:30)
    at LanguageClient.handleConnectionClosed (/Users/anon/.vim/bundle/coc.nvim/build/index.js:68298:15)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:67775:16)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34)
    at closeHandler (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14895:24)
    at CallbackList.invoke (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14102:35)
    at Emitter2.fire (/Users/anon/.vim/bundle/coc.nvim/build/index.js:14153:34) {
  code: -32097,
  data: undefined
}
2023-02-02T13:09:46.254 INFO (pid:34131) [language-client-index] - Language server "java" started with 34227
2023-02-02T13:09:46.924 ERROR (pid:34131) [language-client] - Sending request failed.
2023-02-02T13:09:46.924 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: stopped => starting
2023-02-02T13:09:47.354 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: starting => stopped
2023-02-02T13:09:47.355 INFO (pid:34131) [language-client-index] - Language server "java" started with 34230
2023-02-02T13:09:48.066 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: stopped => starting
2023-02-02T13:09:48.485 INFO (pid:34131) [services] - LanguageClient Language Support for Java state change: starting => stopped
2023-02-02T13:09:48.486 ERROR (pid:34131) [language-client] - Sending request failed.
2023-02-02T13:09:48.486 INFO (pid:34131) [language-client-index] - Language server "java" started with 34233
2023-02-02T13:09:49.172 ERROR (pid:34131) [language-client] - Sending request failed.
2023-02-02T13:09:53.519 INFO (pid:34131) [attach] - receive notification: showInfo []
@danickblouin
Copy link

Same problem here !

@eliasdaler
Copy link
Author

eliasdaler commented Feb 6, 2023

Reinstalling coc-java has helped for me (CocUninstall coc-java + CocInstall coc-java.

I also cleaned various caches (:CocCommand java.clean.workspace + :CocCommand java.clean.sharedIndexes).

Try this.

@danickblouin
Copy link

danickblouin commented Feb 6, 2023

@eliasdaler I did rm -r .config/coc/extensions/coc-java-data/* and it also fixed the problem for me, but I already did that last week and the problem came back. (I'm using neovim I don't know if it's in the same path for Vim)
Let's hope it doesn't happen again 🤞

@eliasdaler
Copy link
Author

Yep, it literally happened to me again right now... :CocCommand java.clean.workspace helps, but calling it again and again isn't really pleasant.

@mrchoc
Copy link

mrchoc commented Feb 7, 2023

@eliasdaler I did rm -r .config/coc/extensions/coc-java-data/* and it also fixed the problem for me, but I already did that last week and the problem came back. (I'm using neovim I don't know if it's in the same path for Vim) Let's hope it doesn't happen again 🤞

this works for me

@danickblouin
Copy link

@eliasdaler I did rm -r .config/coc/extensions/coc-java-data/* and it also fixed the problem for me, but I already did that last week and the problem came back. (I'm using neovim I don't know if it's in the same path for Vim) Let's hope it doesn't happen again 🤞

this works for me

It worked for me at first but just like I said, the problem came back after some time... Let us know if it does the same thing for u

@Taz03
Copy link
Contributor

Taz03 commented Feb 8, 2023

it happens everytime i close and reopen (neo)vim

@mrchoc
Copy link

mrchoc commented Feb 18, 2023

@eliasdaler I did rm -r .config/coc/extensions/coc-java-data/* and it also fixed the problem for me, but I already did that last week and the problem came back. (I'm using neovim I don't know if it's in the same path for Vim) Let's hope it doesn't happen again 🤞

this works for me

It worked for me at first but just like I said, the problem came back after some time... Let us know if it does the same thing for u

it came back like you said. it worked fine up until today since the last time i temporarily fixed it.

@Taz03
Copy link
Contributor

Taz03 commented Feb 18, 2023

it happens everytime i close and reopen (neo)vim

i just do :CocCommand java.clean.workspace and it fixes it for me, it isn't much work but would be great if this gets fixed

@Natan-P
Copy link

Natan-P commented Apr 8, 2023

can confirm this is still an issue
i'm pretty certain that the issue is that the language server isn't done in 5 seconds, which for me is almost every time, since i'm running an i3-2100
i wonder though, why does it not do that on java.clean.workspace? i'm guessing there's a flag passed to alert that something is in progress...
if i find some time, i'll dig into the source code and see what could be done

@halarus
Copy link

halarus commented Aug 19, 2023

Can confirm, just happened to me. Any updates on this?

@chemzqm
Copy link
Member

chemzqm commented Sep 19, 2023

Seems the server crashed for some unknown reason, need check the server log

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

7 participants