electron / electron/electron

[Bug]: chrome.storage.onChanged events are not delivered to Manifest V3 service workers

Open
#52,451 7 comments 1 reaction 1 assignee Claimed by @dsanders11 View on GitHub
43-x-y bug :beetle: component/extensions has-repro-gist platform/macOS
Dominant language
C++
Stars
123k
Forks
17.5k
Avg merge
14h 31m
Merged PRs (30d)
858

Description

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

43.0.0

### What operating system(s) are you using?

macOS

### Operating System Version

macOS Tahoe 26.5.2

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

_No response_

### Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

### Expected Behavior

An active Manifest V3 extension service worker that has registered a `chrome.storage.onChanged` listener should receive storage change events.

This should work regardless of whether the change originates from:

- an extension page
- an extension popup
- a content script
- the service worker itself

The behavior should match extension pages, popups, and content scripts, which receive these events correctly.

### Actual Behavior

In Electron 43.0.0, an active Manifest V3 service worker does not receive any `chrome.storage.onChanged` events.

I've tested these contexts:

| Receiver | Page write | Popup write | Content-script write | Service-worker write |
|---|---:|---:|---:|---:|
| Extension page | 1 | 1 | 1 | 1 |
| Popup | 1 | 1 | 1 | 1 |
| Content script | 1 | 1 | 1 | 1 |
| MV3 service worker | 0 | 0 | 0 | 0 |

The writes all completed successfully. The other contexts each received exactly one event from every sender, while the service worker received none, including for its own write.

### Testcase Gist URL

https://gist.github.com/iamEvanYT/fb8c9fe108d38910fe4e844d3e439787

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.