New issue in runtime messaging in Chrome Beta 140

167 views
Skip to first unread message

Gaurang Tandon

unread,
Aug 14, 2025, 12:26:02 PMAug 14
to Chromium Extensions
Hi all, we're seeing a new messaging issue in Chrome Beta 140.0.7339.16 that did not happen in 139 and earlier.

An iframe sends a message to our service worker's onMessageExternal listener. The service worker responds asynchronously with sendResponse. But the iframe never receives the response.

This issue seems to only happen for larger response sizes, around ~100kB JSON stringified. We can reliably reproduce this on two different MacBooks with Chrome 140, but not on Chrome 139.

We're working on a minimal, shareable example, but has anyone else seen a similar issue so far?

Best,
Gaurang

Justin Lulejian

unread,
Aug 14, 2025, 6:48:12 PMAug 14
to Chromium Extensions, Gaurang Tandon
Hi Gaurang,

I've made a couple of messaging related changes in 140 that I'm wondering if they might be the cause. 

[Extensions] runtime.onMessage() promise return (reject) support. (Mac/Win Beta 140.0.7339.5)
[Extensions] Don't create promise rejected callback when feature is off. (Mac/Win Beta 140.0.7339.5)

Does a Beta version before those change work, whereas a version after this fail?

I'm curious about "never". If you stop the extension's worker via chrome://serviceworker-internals while waiting for the response does that force a response or no?

Is the repro possible within an extension (e.g. a content script or extension popup send a message to the extension worker listener in `onMessage`)?

I'm very interested to see the repro regardless of the above answers. When filing a bug feel free to assign it to me directly.

Best regards,
Justin

Gaurang Tandon

unread,
Aug 15, 2025, 10:32:05 AMAug 15
to Chromium Extensions, Justin Lulejian, Gaurang Tandon
Thanks for your quick response, Justin! I have filed an issue here: https://issues.chromium.org/issues/438884253 (I don't have the permissions to assign it.) You are right that stopping the extension's worker forces a response for all the "hung" requests. 

The commits do seem related. Based on the steps in the issue above, I get the expected behavior on Chrome for Testing 140.0.7290.0, which was before the first commit (2afdc12) landed. I get unexpected behavior on both 140.0.7297.0 and 140.0.7326.0 - which is when the first and second commits (d825498) respectively landed.
Reply all
Reply to author
Forward
0 new messages