0

I call sendMessage a few times from the content script, but it seems like service worker is inactive at the same time and the listener it's not getting triggered.

Any solution?

I've tried to listen to history state change to keep it "awake" `

chrome.webNavigation.onHistoryStateUpdated.addListener((details) => {
  console.log('wake me up');
});

`

Ron Hillel
  • 160
  • 6
  • It's a bug. Normally onMessage listener always wakes up the background script. Try uninstalling the extension and install it again. The workaround is to keep the SW running as shown [here](https://stackoverflow.com/a/66618269). – wOxxOm Dec 22 '22 at 11:23
  • I'll try that. Thanks. Uninstalling and installing it again not working. – Ron Hillel Dec 22 '22 at 11:26

0 Answers0