Post

Replies

Boosts

Views

Activity

Reply to Safari Web Extension background script becomes unresponsive after 30 seconds
Some additional findings... If you look through the content script code you'll see that I am calling runtime.sendMessage every 1 second which always causes the background script to crash after 30 seconds. I started to play with the 1 second interval to see if it behaved differently. Increasing it to 2 seconds caused a crash after 15 calls (also 30 seconds). Increasing the interval to 3 seconds caused a crash after 10 calls (also 30 seconds). Increasing to 4 seconds causes the background script to behave how I'd expect... that is it never crashes and is able to respond to the sendMessage request forever.
Jun ’24