microsoft / cordova-plugin-code-push

Cordova plugin for CodePush
http://appcenter.ms
Other
643 stars 328 forks source link

Error downloading package - javax.net.ssl.SSLProtocolException #515

Open renanvasconcelos opened 5 years ago

renanvasconcelos commented 5 years ago

Description

Try to sync code-push version and get a null error no file-transfer plugin.

This is the exception I get on my console:

[CodePush]  null. StackTrace: Error: null
    at downloadError (file:///android_asset/www/plugins/cordova-plugin-code-push/bin/www/remotePackage.js:65:54)
    at fail (file:///android_asset/www/plugins/cordova-plugin-file-transfer/www/FileTransfer.js:226:9)
    at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:293:52)
    at <anonymous>:1:9 codePushUtil.js:41
[CodePush] An error occurred during sync. null. StackTrace: Error: null
    at downloadError (file:///android_asset/www/plugins/cordova-plugin-code-push/bin/www/remotePackage.js:65:54)
    at fail (file:///android_asset/www/plugins/cordova-plugin-file-transfer/www/FileTransfer.js:226:9)
    at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:293:52)
    at <anonymous>:1:9 

Using Chrome debug mode shows that I'm facing this exception:

javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x77cb52b0: Failure in SSL library, usually a protocol error
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x68917ec8:0x00000000)

Found a similar issue on react-native plugin here

Reproduction

Create an Ionic 3 project and try to update app using code-push.

Code bellow:

let subscription = this.codepush.sync({}, (progress) => {
      console.log('Progresso',progress);
    }).subscribe((status) => {
      console.log('Status',status);
      if (status == SyncStatus.CHECKING_FOR_UPDATE && !silent)
        this.showLoading('Verificando atualizações');
      else if (status == SyncStatus.DOWNLOADING_PACKAGE)
        this.showLoading('Fazendo download de atualização')
      else if (status == SyncStatus.IN_PROGRESS)
        this.showLoading('Atualização em progresso')
      else if (status == SyncStatus.INSTALLING_UPDATE)
        this.showLoading('Instalando atualização')
      else if (status == SyncStatus.UP_TO_DATE && !silent) {
        alert('Sem atualizações');
        this.loading.dismissAll();
      }
      else if (status == SyncStatus.UPDATE_INSTALLED) {
        this.showLoading('Aplicativo atualizado')
      }
      else if (status == SyncStatus.ERROR) {
        alert('Ocorreu um erro durante a atualização.');
      } else {
        console.log('Status codepush',status);
      }
    },
    (error) => {
      console.log('Erro ao atulizar',error);
      this.loading.dismissAll();
      alert('Ocorreu um erro durante a atualização.');
    });

Sample application available here

Additional Information

image

image

It's not possible to update my application without code-push. I have 2250 devices all around the country that are not connected to google services and are now using kiosk mode. The only way I have to update them is code-push. So thats's really urgent.

Thanks for any help.

alexandergoncharov-zz commented 5 years ago

Hi @renanvasconcelos , Thanks for reporting and sorry for this issue.

Could you please describe can you confirm that this issue only for Android 4.x.x? Other Android device versions work correctly?

renanvasconcelos commented 5 years ago

@alexandergoncharov Yes! Just tried with API25 and it's working like a charm.

It seems we have an Infrastructure issue here. Something realted to Azure and SSLv3. That's scaring my off. I have 2200 devices running all over the country and I can't update them without codepush.

renanvasconcelos commented 5 years ago

Hello @alexandergoncharov.

Any update about it?

alexandergoncharov-zz commented 5 years ago

Hi @renanvasconcelos, Sorry for this delay.

We are working on fixing this issue on Azure side. I'll be keep you posted. Sorry for this issue.

ahmedNY commented 5 years ago

Any new update, I got the same error while testing my app on an emulator of android 4.4.2

renanvasconcelos commented 5 years ago

Any update about it?

botatoes commented 5 years ago

Hi, we are currently working on the next version of CodePush (no breaking changes) that will fix a bunch of the bugs people are seeing. We will come back and confirm this is fixed with the changes once we are done.

MrLrx commented 5 years ago

@renanvasconcelos Hi, I have the same problem. Have you solved it?

renanvasconcelos commented 5 years ago

@renanvasconcelos Hi, I have the same problem. Have you solved it?

No. It's in the thread that they are working on a fix.

Joel619 commented 5 years ago

Hi, any updates?

seme1 commented 4 years ago

Fives months already since this was reported and still no updates from your side or even a temporary work-around ?

bbialas commented 3 years ago

Hi, any news...?

ludufre commented 3 years ago

This was fixed in the latest version. At least with me it doesn't happen anymore