Same exact issue. Were you ever able to solve this?
Post
Replies
Boosts
Views
Activity
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.
I'm almost certainly experiencing a similar issue that I've documented with a minimum-reproducible example that you can find in this forum post.
Dropping a link to a StackOverflow i authored around this exact topic. I've been trying to figure this out for months as well.
https://stackoverflow.com/questions/78570837/safari-web-extension-background-script-becomes-unresponsive-after-30-seconds
It's not fixed in 17.6.1 or 18.