-
Notifications
You must be signed in to change notification settings - Fork 325
CodePush isn't compatible with cordova-plugin-crypt-file #72
Comments
@ne0c0de Hey! We haven't seen anyone using the CordovaCrypt plugin along with CodePush, so it's definitely possible there is an issue there we need to investigate. Thanks a lot for reporting this. Just as a first level triage, could you confirm that you are releasing the platform-specific www folder to CodePush (e.g. platforms/android/assets/www) after running "cordova prepare"? The error you are getting is an indication that the CodePush plugin wasn't able to find the HTML file in the update contents which corresponds to your app's configured start page (e.g. index.html. We don't attempt to read the HTM file at this point, so if it was encrypted, that shouldn't matter, as long as the file name wasn't changed. If that isn't the issue, then I suppose it's possible that we are running into problems trying to read the app's start page from the config.xml, if it is encrypted. We'll take a look at the Crypt plugin you're using in parallel while waiting for your response to see if that sheds any light on the potential issue. Thanks! |
I removed the plugin from my source for testing and it works without any error. This is the proof of the problem caused by that plugin. I always first make cordova prepare and than code-push release . but as i said the problem was caused by cordova crypt plugin This is the plugin page that i'm using: https://github.com/tkyaji/cordova-plugin-crypt-file |
@ne0c0de Ah OK, thanks a lot for confirming that. I just wanted to double check :) I'll take a look at that plugin right now, and will likely have some follow up questions if that is cool. Thanks for the patience, and sorry for the inconvenience! We try to make sure we are as compatible as possible with other plugins, but our coverage could always be better. |
Ah I see the problem. On Android, the crypt plugin rewrites the start page in your config.xml to be prefixed with "http://localhost" (e.g. "Index.html" becomes "http://localhost/index.html"). When the CodePush plugin attempts to find your start page in the update contents, it would look for a file called "http://localhost/index.html" and obviously fail :) It's possible that we could special case this scenario and strip the prefix, but I'll have to think about the potential issues that could cause. |
Hello @lostintangent Is there an estimation when this bug will be fixed? Because i want to use code-push on my next version that we will publish very soon but i don't want to disable cordova encrypt because of security. If this will be fixed soon i want to postpone our publish date for few days. |
@ne0c0de We'll send out a PR for this fix today and should have it published to NPM by tomorrow at the latest. Thanks for the patience! |
@ne0c0de Unfortunately this isn't actually a simple fix like we had hoped, and we would need to submit a PR to the crypt plugin to actually enable interoping with CodePush. We will look into doing this, but for now, I think it might make sense for you to do your release without CodePush for now, and we'll let you know once we resolve this. |
I'm going to close this issue for now since it isn't immediately actionable. At some point I want to support E2E encryption, but we'll need to determine if relying on this plugin is the right choice. Thanks again for reporting this, and please re-open it if you think we should continue pursuing support for this plugin specifically. |
@lostintangent It's almost two years the issue was closed but still seems to be no way for end to end encryption in conjunction with code-push-plugin. |
Any updates? I imagine anyone using code-push with Android would like to see ability to have an obfuscated APK that could be used with code-push |
Any updates ? I'm facing same issue , Is there any alternative plugin for cordova-plugin-crypt-file that is compatible with Code-Push? |
Hi,
I'm using Cordova and codepush with the latest versions.
Here's the plugins that i additinaly used:
code-push 1.6.0-beta "CodePushAcquisition"
com.phonegap.plugins.oauthio 0.2.1 "OAuth.io"
com.verso.cordova.clipboard 0.1.0 "Clipboard"
cordova-instagram-plugin 0.5.3 "Instagram"
cordova-plugin-app-version 0.1.8 "AppVersion"
cordova-plugin-code-push 1.5.1-beta "CodePush"
cordova-plugin-crypt-file 0.0.1 "CordovaCrypt"
cordova-plugin-customurlscheme 4.1.3 "Custom URL scheme"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-dialogs 1.2.0 "Notification"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.0 "File Transfer"
cordova-plugin-globalization 1.0.2 "Globalization"
cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.3.1-dev "InAppBrowser"
cordova-plugin-splashscreen 3.1.0 "Splashscreen"
cordova-plugin-statusbar 2.1.1 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-plugin-x-socialsharing 5.0.10 "SocialSharing"
cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
org.apache.cordova.console 0.2.10 "Console"
org.apache.cordova.inappbrowser 0.4.1-dev "InAppBrowser"
org.apache.cordova.plugin.ActivityIndicator 1.0.0 "Activity Indicator"
org.apache.cordova.vibration 0.3.10-dev "Vibration"
phonegap-plugin-push 1.5.3 "PushPlugin"
When i'm using codePush.sync() command on deviceready it downloads the package and get Preinstall failure error when it's started to install
Here you can see the console log that i catched via Chrome: http://imgur.com/7i74s1z
I suspect that CordovaCrypt plugin cause this because it's encrypting all files when i use "cordova prepare" command. (It's decrypting that files when application is running)
Any suggestions that you can give me?
The text was updated successfully, but these errors were encountered: