1
votes

I am using Ionic / Angular / Cordova / Firebase.

I am developing an app which allows a user to upload a photo from their phone gallery into the app interface.

To do this I am using "cordova plugin add cordova-plugin-camera"

I have the code running perfectly on android versions 4.4 or higher, however, users with android 4.4 or lower are not able to upload the images.

I don't know if this is of any help but I checked firebase logs to see whats going on and received the following error

" 04-19 11:42:08.841 17462-17462/com.ionicframework.Arina D/SystemWebChromeClient: https://www.gstatic.com/firebasejs/3.6.1/firebase.js: Line 537 : Uncaught Error: INVALID_STATE_ERR: DOM Exception 11 04-19 11:42:08.841 17462-17462/com.ionicframework.Arina E/Web Console: Uncaught Error: INVALID_STATE_ERR: DOM Exception 11 at https://www.gstatic.com/firebasejs/3.6.1/firebase.js:537 "

I tried debugging it, but the problem is at the code: "b.a.withCredentials = d.D"

My developer found a workaround for this problem, he installed Crosswalk and android < 4.4 devices had no issue uploading photos anymore.

However, crosswalk made the apk size too big to make it an acceptable solution. Does anyone know any other solutions other than using Crosswalk ? I am not a firebase developer and can't understand the error or what "b.a.withCredentials = d.D" means

Thank you.

1

1 Answers

0
votes

Ionic uses webview in android which will only support from android 4.1 and above. In Ionic version 1, it is recommended using Crosswalk on versions < 4.4, as newer versions of Chrome are considerably more performant and stable than the stock Android browsers shipped in the highly-fragmented 4.x era (a problem that seems to be getting resolved). Refer New Supported Android Versions