I’ve tried this app, with this code on some Android devices and it works well.
It works well in debug mode with Chrome.
Now I’ve installed this app on a Huawei device (Honor Play COR-L29 with Android 9) and on this device the httpClient call fails.
I can’t see the error, so I can’t understand what is the problem.
The device is online.
I’ve installed the Ionic Dev app on this device to try the app, but I can’t login because it seems that Ionic Dev too doesn’t reach the Network.
So, is it a problem between the network plugin of Ionic and Huawei?
Do you ever had this problem?
Are there any other tests I can do to debug the problem?
I have no idea.
Having the actual error that is occurring will help a great deal. Given the behaviour you’re experiencing it could be an SSL problem, Android treats secure requests different in debug/prod builds, and whilst your SSL certificate might appear fine there might be some hidden issues (e.g. not being able to verify the full certificate chain). You can check for any issues with your SSL set up using a tool like this: https://www.ssllabs.com/ssltest/
and I’ve modified the top of the same file in this way: <widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
And now it works.
The next step will be to move web services to HTTPS.
Will I have the same problem on ios?
I’ll let you know.
@ioclaudio hey, ioclaudio.
My ionic4 development, config.xml has set the widget and android:usesCleartextTraffic=“true” , but in Huawei still reported error, Failed to load resource: net::ERR_CLEARTEXT_NOT_PERMITTED
My network_security_config.xml generated by android is like this, yours?
domain localhost /domain
good night, the problem is that when generating the apk and installing it on my android phone 9 the screen will start my application goes blank, I already did everything you have said about the update to sdk 28 but nothing that works for me does anyone know what I can do about it