bug: firebase v9 not working on iOS
See original GitHub issueBug Report
Capacitor Version
PASTE OUTPUT HERE
Platform(s)
iOS
Current Behavior
firebase
v9 refuses to connect on iOS due to the following errors below. On safari, android, chrome, everything else, works fine.
[Error] Cross-origin redirection to http://developers.google.com/ denied by Cross-Origin Resource Sharing policy: Origin capacitor://localhost is not allowed by Access-Control-Allow-Origin. [Error] XMLHttpRequest cannot load https://apis.google.com/_/jserror?script=https%3A%2F%2Fapis.google.com%2F_%2Fscs%2Fabc-static%2F_%2Fjs%2Fk%3Dgapi.lb.pt_BR.JNlq9XF7n9c.O%2Fm%3Dgapi_iframes%2Frt%3Dj%2Fsv%3D1%2Fd%3D1%2Fed%3D1%2Frs%3DAHpOoo_CgjdRKayLAI-SffAgrENAd8_UBA%2Fcb%3Dgapi.loaded_0%3Fle%3Dscs&error=x`capacitor&line=183 due to access control checks. [Error] Failed to load resource: Cross-origin redirection to http://developers.google.com/ denied by Cross-Origin Resource Sharing policy: Origin capacitor://localhost is not allowed by Access-Control-Allow-Origin. (jserror, line 0)
Expected Behavior
Shoulda connect normally. Appears that the domain from http://developers.google.com/ appears to be refusing the connection, tho version 8 of firebase
worked normally.
Code Reproduction
Just imported all the libraries from firebase
Other Technical Details
npm --version
output: 8.5.5
node --version
output: 12.22.8
pod --version
output (iOS issues only): 1.10.2
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top GitHub Comments
Hi ! I got the same problem, it was was caused by a bad initialisation of FireAuth in my case.
See how to properly initialise FireAuth here : https://stackoverflow.com/questions/71630326/firebase-authentication-sticks-capacitor-ionic-on-ios
For now I went back to v8.