question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnhandledRejection: TypeError

See original GitHub issue

Since 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Torrencemcommented, May 1, 2020

Work-around for those who just want to use 0.5.5:

:CocUninstall coc-rust-analyzer
:CocInstall coc-rust-analyzer@0.5.5

took some googling to figure out that that was possible! You should also probably add

"coc.preferences.extensionUpdateCheck": "never"

to coc-settings.json (:CocConfig)

0reactions
Torrencemcommented, May 1, 2020

I did

sudo apt-get remove nodejs

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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found