BEX MV3 - Bridge loses connection to content script after inactivity, doesn't auto-reconnect when new message is received #17932
Labels
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
mode/bex
Qv2 🔝
Quasar v2 issues
What happened?
My chrome extension needs to fetch content from the current tab each time the extension popup is opened. I use $q.bex.send to send a message from my Vue component to the background service worker, which passes on the message to each content script in the bridge.portList.
After upgrading to MV3, the background script loses the connection to any content scripts after 30 seconds of not opening the extension popup, and can't fetch anything from the page. It doesn't seem to try re-connecting when a new bridge message is sent from the app. I tried console logging the bridge.portList within the background script each time a message is received, which prints only ['app'] if the popup hasn't been opened in the last 30 seconds.
What did you expect to happen?
I expected the bridge to handle the message communication between the app/background/content scripts as it did in MV2.
Reproduction URL
https://stackblitz.com/edit/quasarframework-stackblitz-templates-mngvdn94?title=Quasar%20Framework%20-%20app-vite%20v2
How to reproduce?
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
BEX Mode
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: