Provider not getting connected

Hey, I keep seeing ```write after end` error in the JavaScript console which I believe is preventing the provider to connect. No event is fired, no details returned and no connection established. Funny thing is that this only happens with the console closed. If I open the console and then visit the website it works every single time. No error thrown and connection working. It also seems to work and the provider regains the connection if I manually open the extension window. Any ideas what this is about?

I use Chrome with MetaMask extension 11.3.0 and metamask/sdk 0.10.0 running on localhost.

Hi, are you using the latest sdk version could you please check: Releases · MetaMask/metamask-sdk · GitHub

1 Like

The version I use currently is 0.10.0. There seems to be 0.11.0 released just 2 hours ago on npm (I can’t post links). I did try updating although that didn’t help, the error seems to be more in the wallet itself than SDK, I believe…

What extension version are you on? Is it possible for you to share a desktop recording

The version of both, the extension as well as the SDK is mention in my question at the top :sweat_smile: I could share recording, but not sure what to record. I basically open a dApp web and the console is showing the error I posted (no connection established). Sometimes the error keeps popping (as above it was retried 35x) until the connection was established or not. This isn’t being done from the dApp. Also, as mentioned, if I open the JS console and then visit the website, the error is not present and connection is established correctly.

By the way is it your dapp if so could you check the provider: Ethereum provider API | MetaMask developer documentation

What exactly am I supposed to check? :smiley: The title of this topic itself is saying the provider is not getting connected hence ``isConnectedis returningfalse`. Oh my lord

Please try updating your mm extension to 11.4.0 MetaMask - Chrome Web Store and try again

Hi @Mat do you still have an issue, if you still can’t connect please open a support ticket:

Same issue here.
Nuxt 3 + ethersjs + MetaMask. When I open my site for the first time, I get this error and I’m not connected. If I refresh, it works. If I open a new tab while having at least one tab active, it also works. So basically it happens only on new session for me:

Hi, i am having the exact same problem, have you figured out the root cause?

Looks like there is an open issue about it: [Bug]: Prerender streams not getting reset · Issue #23329 · MetaMask/metamask-extension · GitHub
[Bug]: Calling `request` too early after the browser start leads to a Promise which is never settled · Issue #23336 · MetaMask/metamask-extension · GitHub

exact same problem …opening a new tab …
in BrowserProvider _network [Exception: Error: network is not available yet (code=NETWORK_ERROR…

Please comment on the open issue above

A post was merged into an existing topic: Wallet compromised, help