angularfire
angularfire copied to clipboard
AngularFireStorage not working with capacitorHttp on native device
Version info
Angular: 16.1.1
Firebase: 9.23.0
AngularFire: 7.6.1
Other (e.g. Ionic/Cordova, Node, browser, operating system): Ionic:
Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 7.1.2 @angular-devkit/build-angular : 16.1.4 @angular-devkit/schematics : 16.1.4 @angular/cli : 16.1.4 @ionic/angular-toolkit : 10.0.0
Capacitor:
Capacitor CLI : 5.1.1 @capacitor/android : 5.1.1 @capacitor/core : 5.1.1 @capacitor/ios : 5.1.1
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
Steps to set up and reproduce
When enable capacitorHttp Angularfire storage unable to upload image on native device. Received error below.
Sample data and security rules
Debug output
** Errors in the JavaScript console ** FirebaseError: Firebase Storage: An unknown error occurred, please check the error payload for server response. (storage/unknown)
** Output from firebase.database().enableLogging(true); **
** Screenshots **
Expected behavior
Actual behavior
Is there anyway you can create an MVCE for me to check why? I'm not super familiar with Capacitor but if I have a base project and debugging setup I can check to see what's going on.
Is there anyway you can create an MVCE for me to check why? I'm not super familiar with Capacitor but if I have a base project and debugging setup I can check to see what's going on.
@davideast Do you have any recommendation for creating MVCE? I can try to reproduce the environment.
@dodomui If there's an online IDE for using Capacitor that would be best. Otherwise a GitHub repo with setup and reproducible steps will help.
Got it. Will prepare this later.
@dodomui I'm not able to run any transactions. My app crashes with the following message on iOS Error: Uncaught (in promise): Error: Service firestore is not available getImmediate@capacitor.
I'm just using Firestore with the default angularFire setup from ng add. I'm struggling to find a solution, it works without issue on my browser, but not native.
Are you doing any additional initialization other than
provideFirebaseApp(() => initializeApp(environment.firebase)),
provideFirestore(() => getFirestore())