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.

Unable to connect + Uncatchable api error

See original GitHub issue

I’m trying to connect to my unsynced node with api 1.0.0-beta.17

target=#750431 (25 peers), best: #520014

I’m getting Screen Shot 2020-01-23 at 16 42 13

which is uncatchable with both of these

try {
  let api = await ApiPromise.create().catch(e => {})
} catch (e) {}

It also doesn’t emit error on

provider.on('error',(e)=>{})

It results in stuck application since I can’t react on anything that happened here. It also happens when you get error while connecting to wsprovider but it can be handled by wrapping api creation inside another promise, which I can reject. It is not ideal, but it works.

When trying to connect to wss://cc3-5.kusama.network/ I get this on the other hand

Screen Shot 2020-01-23 at 16 41 42

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jak-pancommented, Feb 15, 2020

This looks like a good fix. It should be documented however to catch apiPromise.create() since it can crash now.

1reaction
jacogrcommented, Jan 23, 2020

In this case you got very unlucky on Kusama. The issue is that at some point metadata v9 was actually broken - a type was added without changing the metadata version. (The bump to metadata v10 fixed that - retrospectively)

However, despite the brokenness there, going to keep this issue as logged and see what we can do around the error handling so it properly propagates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle a possible uncatchable error in Javascript?
I've got a very small program in index.js, it tries to make a connection to a URL that does not exist, and makes...
Read more >
The Elusive, Uncatchable Error? - Ben Gribaudo
The error seems to escape catching. When the expression is evaluated, Query Editor displays the error. Try loading the query's output into ...
Read more >
Handling errors - Node-RED
These are uncatchable errors. If it does notify the runtime properly, then it is a catchable error that can be used to trigger...
Read more >
API Connect error "Backside connection failed" when calling ...
Open your APIC management portal. · Expand the menu, and select Drafts. · Select the APIs tab, and open the API in question....
Read more >
Unable to contact API | AdminUI Documentation
If you experience the error message “Unable to contact API”, it means that the AdminUI backend cannot successfully communicate with the ...
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