Http requests fails only while releasing Android build APK

I have a similar problem to this but only on Android 9.0.
It’s working fine in ionic cordova run android --device. but not on ionic cordova build android --prod --release. And the server already running under SSL.
https://www.ssllabs.com/ssltest/analyze.html?d=apps.uib.ac.id

Please help me, Thanks

Maybe you should try to use the native HTTP plugin

Te solution for this problem is go to the AndroidManifest.xml and add the following line

android:usesCleartextTraffic="true"

Inside of application tag, before closing.

<application 
    android:usesCleartextTraffic="true"
    ......
>
</application>

This line give to the app the capacity of run traffic in http without ssl certificate
I hope to be helpful

Thank you for joining the forum and thank you for your contribution.

However, I really strongly think it is well past time for all of us to do our part in making the Internet more secure for everybody that uses our apps, and that means no more unsecured HTTP.

Get proper SSL certificates for all your backend servers. LetsEncrypt provides them for free, with very good surrounding tooling for updating them regularly.

Then there is absolutely no need to continue promoting a workaround for something that should be disabled.

3 Likes

Shure! Just for local working you can add the solutions that i proposed. But for productions and quality work is necesary SSL certificate.
Thanks for answer me.