We have some http get and posts in our ionic3
app which makes a HTTPS call to an external resource like https://smart.blabla.com
If we create a simple bundle with ionic cordova build android
anything is fine and anything is working as expected.
If we create the release bundle with ionic cordova build android --release
we have the problem that after every first open of the app on the first request to the cloud, the request is going wrong. No HTTP error or something like that. But the request is breaking client side.
This is the exception we can see if we do the same request native with XHR.
XMLHttpRequest.e.responseBlob.r.function.o.(anonymous function).P.(anonymous function).(anonymous function)
u
t.scheduleTask
r.scheduleTask
r.scheduleMacroTask
(anonymous function)
r.(anonymous function)
(anonymous function)
InjectedScript._evaluateOn
InjectedScript._evaluateAndWrap
InjectedScript.evaluate
As mentioned before, with a not release bundle every thing is fine and we have the same error on emulator as on device.
We did see the same error before if the device is not ONLINE. in this case we have the same error. But this should not be the problem.
So we think there can be two reasons of this problem
- there are is any problem with the SSL certificate which android is not trusting on first time?
- the devices and emulator some times for a period are offline? And we must send in this case the request a second time? But this should also not the problem because in this case the problem should persist on using the app.
Some help? thx