UnhandledRejection: TypeError
See original GitHub issueSince I updated fairly recently, whenever I open a rust project I continuously get errors from coc.nvim. The error says:
[coc.nvim] error: UnhandledRejection: TypeError: this.ctx.sendRequestWithRetry(...).catch(...).finally is not a function
Heres the coc.nvim log:
8 <rejected> TypeError: this.ctx.sendRequestWithRetry(...).catch(...).finally is not a function
9 at HintsUpdater.fetchHints (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js: 8258:21)
10 at sourceFiles.forEach (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8219:54)
11 at Map.forEach (<anonymous>)
12 at HintsUpdater.syncCacheAndRenderHints (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8219:26)
13 at new HintsUpdater (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8211:14)
14 at Object.onConfigChange (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8278:32)
15 at <anonymous>
16 at process._tickCallback (internal/process/next_tick.js:188:7) } TypeError: this.ctx.sendRequestWithRetry(...).catch(...).finally is not a function
17 at HintsUpdater.fetchHints (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8258:21)
18 at sourceFiles.forEach (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8219:54)
19 at Map.forEach (<anonymous>)
20 at HintsUpdater.syncCacheAndRenderHints (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8219:26)
21 at new HintsUpdater (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8211:14)
22 at Object.onConfigChange (/home/matt/.config/coc/extensions/node_modules/coc-rust-analyzer/lib/index.js:8278:32)
23 at <anonymous>
24 at process._tickCallback (internal/process/next_tick.js:188:7)
Sorry for any weird formatting, it was a pain to copy/paste.
From a bunch of random searching, it looks like it was caused by this commit here handing something it wasn’t supposed to to coc (that’s about as specific as I can be)
(edit)
here’s the specific line that’s causing problems
Adding
{
"rust-analyzer.inlayHints.chainingHints": "false"
}
to coc-settings.json does not fix the problem
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Unhandled Rejection (TypeError): Cannot read property of ...
So on the first render, this.state.ticket is an empty string, and this.state.ticket.data is undefined. Only later are you updating state.ticket ...
Read more >Window: unhandledrejection event - Web APIs | MDN
The unhandledrejection event is sent to the global scope of a script when a JavaScript Promise that has no rejection handler is rejected; ......
Read more >Unhandled Rejection (TypeError): Cannot read properties ...
Forum Thread - Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'getElementsByClassName') - React - EJ 2.
Read more >Design Code Utility (DCU) Commands throw Unhandled ...
Oracle Commerce Cloud Service - Version N/A and later: Design Code Utility (DCU) Commands throw Unhandled rejection TypeError.
Read more >Unhandled Rejection (TypeError):this.setState is not a function
Use arrow function. “Unhandled Rejection (TypeError):this.setState is not a function” is published by Michael S.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Work-around for those who just want to use 0.5.5:
took some googling to figure out that that was possible! You should also probably add
to coc-settings.json (:CocConfig)
I did
then followed the instructions here to get the latest version of node (v14.1.0), this solved the problem!
I had an old version because I used apt I guess (I don’t remember).