browser-extension icon indicating copy to clipboard operation
browser-extension copied to clipboard

[bug] Error in invocation of runtime.sendMessage

Open 0xbuidler opened this issue 6 months ago • 9 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

RainbowKit Version

2.2.5

wagmi Version

2.15.4

Current Behavior

Go to https://app.aave.com/, inspect the console. See the error:

Uncaught (in promise) TypeError: Error in invocation of runtime.sendMessage(optional string extensionId, any message, optional object options, optional function callback): chrome.runtime.sendMessage() called from a webpage must specify an Extension ID (string) for its first argument.

Same error happens in local.

Expected Behavior

Image

I'm expecting to not have this error.

Steps To Reproduce

Go to https://app.aave.com/ and inspect the console.

Needs to have the Rainbow chrome extension ofc.

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

Chrome version: Version 137.0.7151.69 (Build officiel) (arm64)

0xbuidler avatar Jun 03 '25 19:06 0xbuidler

This actually seems to be an issue on the wallet side. Does this occur for you on every dApp? Are you eventually able to successfully connect and sign transactions?

DanielSinclair avatar Jun 05 '25 03:06 DanielSinclair

Hello, I am also getting the same issue (locally and in production). Every users that connects to my dApp with Rainbow wallet sees the above error in their console.

RainbowKit Version

2.2.4

wagmi Version

2.14.15

josephbouassaf avatar Jun 10 '25 16:06 josephbouassaf

same error

Image

here is the source of the error:

https://github.com/rainbow-me/browser-extension/blob/16a6ea85b5a27acaa34e87bd82600202964d1f16/src/core/messengers/internal/tab.ts#L23-L32

zakariamouhid avatar Jun 15 '25 04:06 zakariamouhid

This actually seems to be an issue on the wallet side. Does this occur for you on every dApp? Are you eventually able to successfully connect and sign transactions?

@DanielSinclair Yes, it would seem that I can do everything. But when working in a dev env I get this error everytime I refresh and it's a nighmare.

Have you been able to figure out the issue ?

0xbuidler avatar Jun 16 '25 06:06 0xbuidler

@DanielSinclair Hello, this error kinda ruin the development experience on Next.js. I'd be very happy to help fix this if redirected into the right direction. Thank you 🙏

0xbuidler avatar Jul 30 '25 17:07 0xbuidler

Looks like it was first spotted in November 2023: https://github.com/rainbow-me/browser-extension/issues/1117

0xbuidler avatar Jul 30 '25 17:07 0xbuidler

I get this too:

Image

It's really bad for an extension to be spamming the console in this way:

  1. It's very inconvenient as it makes it harder to spot genuine issues.
  2. It gives the impression of a low quality product.

aspiers avatar Oct 13 '25 11:10 aspiers

Could you have a look at this when you have time pls @DanielSinclair ?

0xbuidler avatar Oct 14 '25 11:10 0xbuidler