Post

Replies

Boosts

Views

Activity

Reply to Service worker is killed when Device memory usage is high. But service worker doesn't return after memory is freed up on device
I think I experienced exactly the same issue just now, and after some attempts, here is a possibly working workaround (not a good solution though): replace the background.service_worker with background.scripts in manifest.json, like: { ... "background": { "service_worker": "background.js" }, ... } replaced by: { ... "background": { "scripts": [ "background.js" ], "persistent": false }, ... } I tested several times, the listeners registered in background.js can always continue working after RAM usage reaches 80%.
Jun ’24