kolbasa/cordova-plugin-apkupdater

Trust anchor for certification path not found

Closed this issue · 4 comments

i have provided the apk path but its https not http, when i click on install button, it gives below error
image

I don't think this is a bug with the plugin itself, but rather a wrong configuration of your download server.
Or it could be your Bluestacks installation. I'm not familiar with it, I use Android Studio for testing. You might have to update the certificates.

The plugin has no problems with https as far as I know.

Maybe you can send me your apk URL, then I can take a closer look.

As I suspected: you are using a self-signed certificate. Android is right to complain about this.
Screenshot 2023-07-09 at 18 45 57

There are three solutions here:

  1. The correct way: you configure your server with a known certificate e.g. with a free one from Let's Encrypt.
  2. You switch to an unencrypted connection. You have to specify this in your AndroidManifest.xml (android:usesCleartextTraffic="true").
  3. You whitelist your own certificate: Android Documentation.

The problem has nothing to do with the ApkUpdater plugin itself.

thanks for the reply, i forgot to install the certificate, its working now