I have a browser extension that attempts to interact with a Firestore DB from within a content script. In Chrome this functions perfectly with no issues, but in Firefox it fails with a cryptic error:
@firebase/firestore: Firestore (8.8.1): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: The operation could not be completed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
Looking at the network tab in firefox/chrome devtools it's clear that no requests are being made to the Firestore backend which explains why this error is being thrown, but I can't figure out why this is happening.
I've been unable to identify any obvious differences between network request handling between chrome & firefox content scripts.
I should also note that when I try to access firestore from within the Firebase background page it works as expected, it's only within the content script that there are issues.
A minimal repro can be found here & the code that is being run in the content script can be found here.