I have a flutter web app using firestore, the code runs perfectly on iOS, Android simulator as well as launch web app locally under debugging mode. But when I push the app to the server, all reads from the database successful but all the write function got the following error under the JS console. Note I already added .catchError for every writes but it did not catch the error. I am using the
firebase_core: ^2.7.0
cloud_firestore: ^4.4.3
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at Object.a_ (main.dart.js:8425:23)
at mQ.bl (main.dart.js:53486:15)
at aiv.$0 (main.dart.js:53454:17)
at Object.b4x (main.dart.js:8810:9)
at Object.acW (main.dart.js:9962:19)
at TM.bl (main.dart.js:53428:18)
at main.dart.js:50382:16
at aR6.a (main.dart.js:6032:62)
at aR6.$2 (main.dart.js:44355:14)
at Object.x (main.dart.js:6018:10)
I have a flutter web app using firestore, the code runs perfectly on iOS, Android simulator as well as launch web app locally under debugging mode. But when I push the app to the server, all reads from the database successful but all the write function got the following error under the JS console. Note I already added .catchError for every writes but it did not catch the error. I am using the firebase_core: ^2.7.0 cloud_firestore: ^4.4.3
And in Index.html I am using import { initializeApp } from "https://www.gstatic.com/firebasejs/9.17.1/firebase-app.js";
Flutter version 3.7.5
Uncaught TypeError: Cannot read properties of undefined (reading 'apply') at Object.a_ (main.dart.js:8425:23) at mQ.bl (main.dart.js:53486:15) at aiv.$0 (main.dart.js:53454:17) at Object.b4x (main.dart.js:8810:9) at Object.acW (main.dart.js:9962:19) at TM.bl (main.dart.js:53428:18) at main.dart.js:50382:16 at aR6.a (main.dart.js:6032:62) at aR6.$2 (main.dart.js:44355:14) at Object.x (main.dart.js:6018:10)