Android certificate error

  • Hi,
    I use: Qt 5.7.0 for Android, android-24, I'm testing on devices with Android 6.0

    I make a QNetworkRequest to https resource. Qt returns these errors when executing the QNetworkRequest.

    The host name did not match any of the valid hosts for this certificate
    The root certificate of the certificate chain is self-signed, and untrusted

    The https server uses Let's Encrypt certificate.

    Standalone browser on Android 6.0 or 5.0 device or Windows is able to get the https resource without showing any certificate error, and also my app works on Android 5.0 devices and also on Windows.

    What can I do with this error?

  • Hi!

    Does this only happen when accessing a https resource or also for plain http calls?
    And are other https:// resources working or does https not work at all?

    If https requests generally do not work, you are probably missing the required SSL libraries to make https:// calls.
    For Android, it is currently needed to manually package the SSL library as described here:

    In case you want to create a QML-based mobile App, you can also have a look at V-Play Engine.
    With V-Play you can avoid having to build and provide SSL for Android, V-Play has SSL for Android already bundled since version 2.10.0.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.