this is not flutter but in my case, experimentalForceLongPolling: true did not work.
this can be your simple solution if you're stuck in the same error in typescript front-end development.
const db = getFirestore(FirebaseApp, 'your firestore id')
yes. please specify your firestore ID. it took me 4 hours to figure out. even chat GPT could not solve it