cordova-plugin-code-push icon indicating copy to clipboard operation
cordova-plugin-code-push copied to clipboard

Error downloading package - javax.net.ssl.SSLProtocolException

Open renanvasconcelos opened this issue 5 years ago • 13 comments

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

  • cordova-plugin-code-push version: ^1.11.12
  • List of installed plugins: code-push 2.0.6 "CodePushAcquisition" cordova-open-native-settings 1.5.1 "Native settings" cordova-plugin-android-wifi-manager 1.0.0 "Android WifiManager" cordova-plugin-app-version 0.1.9 "AppVersion" cordova-plugin-background-mode 0.7.2 "BackgroundMode" cordova-plugin-code-push 1.11.12 "CodePush" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-device 2.0.2 "Device" cordova-plugin-dialogs 2.0.1 "Notification" cordova-plugin-file 4.3.3 "File" cordova-plugin-file-transfer 1.6.3 "File Transfer" cordova-plugin-geolocation 4.0.1 "Geolocation" cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)" cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview" cordova-plugin-network-information 2.0.1 "Network Information" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-uniquedeviceid 1.3.2 "UniqueDeviceID" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-zip 3.1.0 "cordova-plugin-zip" es6-promise-plugin 4.1.0 "Promise" wifiwizard2 3.1.0 "WifiWizard2"
  • Cordova version: 7.0.0
  • iOS/Android/Windows version: Android 4.4.4 (Upgrade not possible)
  • Device Physical SM-T560

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.

renanvasconcelos avatar Mar 26 '19 13:03 renanvasconcelos

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?

alexandergoncharov-zz avatar Mar 31 '19 22:03 alexandergoncharov-zz

@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 avatar Apr 01 '19 12:04 renanvasconcelos

Hello @alexandergoncharov.

Any update about it?

renanvasconcelos avatar Apr 04 '19 14:04 renanvasconcelos

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.

alexandergoncharov-zz avatar Apr 10 '19 14:04 alexandergoncharov-zz

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

ahmedNY avatar Apr 22 '19 23:04 ahmedNY

Any update about it?

renanvasconcelos avatar Apr 29 '19 18:04 renanvasconcelos

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.

botatoes avatar May 23 '19 23:05 botatoes

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

MrLrx avatar Jul 03 '19 13:07 MrLrx

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

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

renanvasconcelos avatar Jul 04 '19 16:07 renanvasconcelos

Hi, any updates?

Joel619 avatar Jul 09 '19 16:07 Joel619

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

seme1 avatar Aug 26 '19 17:08 seme1

Hi, any news...?

bbialas avatar Oct 02 '20 09:10 bbialas

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

ludufre avatar Oct 02 '20 09:10 ludufre