Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android update rolling back #717

Closed
cosmith opened this issue Feb 23, 2017 · 8 comments
Closed

Android update rolling back #717

cosmith opened this issue Feb 23, 2017 · 8 comments

Comments

@cosmith
Copy link

cosmith commented Feb 23, 2017

Hi,
We recently deployed CodePush in our app. Everything is going fine on iOS but the Android version doesn't update. Looking at the logs on one of our devices we found the An update is available, but it is being ignored due to having been previously rolled back. message.

  • react-native-code-push version: 1.16.1-beta
  • react-native version: ~0.38.0
  • iOS/Android/Windows version:
  • Does this reproduce on a debug build or release build? release
  • Does this reproduce on a simulator, or only on a physical device? physical
  • Repro steps and/or stack trace:

code-push deployment history Truckfly Production

┌───────┬──────────────┬─────────────┬───────────┬───────────────────────────────┬───────────────────────────────┐
│ Label │ Release Time │ App Version │ Mandatory │ Description                   │ Install Metrics               │
├───────┼──────────────┼─────────────┼───────────┼───────────────────────────────┼───────────────────────────────┤
│ v1    │ 3 days ago   │ 3.3.0       │ No        │ [ANDROID]                     │ Active: 0.11% (21 of 19,228)  │
│       │              │             │           │ * Show CodePush Version       │ Total: 21 (1 pending)         │
│       │              │             │           │ * Fix bug in foreign comments │                               │
│       │              │             │           │ * Allow optional fields       │                               │
├───────┼──────────────┼─────────────┼───────────┼───────────────────────────────┼───────────────────────────────┤
│ v2    │ 3 days ago   │ 3.3.0       │ No        │ [IOS]                         │ Active: 19% (3,607 of 19,228) │
│       │              │             │           │ * Show CodePush Version       │ Total: 4,225 (1,069 pending)  │
│       │              │             │           │ * Fix bug in foreign comments │ Rollbacks: 63                 │
│       │              │             │           │ * Allow optional fields       │                               │
├───────┼──────────────┼─────────────┼───────────┼───────────────────────────────┼───────────────────────────────┤
│ v3    │ 2 hours ago  │ 3.3.0       │ Yes       │ [ANDROID]                     │ Active: 0.11% (21 of 19,228)  │
│       │              │             │           │ * Add GPS survey              │ Total: 21                     │
│       │              │             │           │ * Fix crash in comment menu   │                               │
├───────┼──────────────┼─────────────┼───────────┼───────────────────────────────┼───────────────────────────────┤
│ v4    │ 2 hours ago  │ 3.3.0       │ Yes       │ [IOS]                         │ Active: 4.1% (789 of 19,228)  │
│       │              │             │           │ * Add GPS survey              │ Total: 789                    │
│       │              │             │           │ * Fix crash in comment menu   │ Rollbacks: 5                  │
└───────┴──────────────┴─────────────┴───────────┴───────────────────────────────┴───────────────────────────────┘

Any ideas?

@max-mironov
Copy link
Contributor

Hi @cosmith, do you have separate apps for iOS and Android with different deployment keys? If not this may be the root cause of this issues. Please let us know.

@cosmith
Copy link
Author

cosmith commented Feb 23, 2017

Hi, we have the same deployment key on both apps.

We managed to find the actual error by reinstalling the app from the store on the device where it wasn't working:

02-23 14:48:14.856 15741 15757 W System.err: com.microsoft.codepush.react.CodePushInvalidUpdateException: Update is invalid - A JS bundle file named "index.android.bundle" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary.
02-23 14:48:14.857 15741 15757 W System.err:    at com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage(CodePushUpdateManager.java:239)
02-23 14:48:14.857 15741 15757 W System.err:    at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:232)
02-23 14:48:14.857 15741 15757 W System.err:    at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:226)
02-23 14:48:14.868 15741 15787 I ReactNativeJS: [CodePush] An unknown error occurred.
02-23 14:48:14.868 15741 15787 I ReactNativeJS: [CodePush] Update is invalid - A JS bundle file named "index.android.bundle" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary.

@max-mironov
Copy link
Contributor

Thank you for your reply @cosmith!
Anyway as stated here https://microsoft.github.io/code-push/docs/cli.html#link-3
"NOTE: Using the same app for iOS and Android may cause installation exceptions because the CodePush update package produced for iOS will have different content from the update produced for Android."

So it would be better to create separate apps. Please let us know if you need further help or we can close the ticket?

@cosmith
Copy link
Author

cosmith commented Feb 23, 2017

Ok I think we figured it out: since we deploy on the same key, and we deployed iOS right after Android in both cases, it worked for 3 minutes (where we tested it on our devices) and then stopped working.

@max-mironov
Copy link
Contributor

Correct, please let us know if deploying to separate platforms resolve the issue.

@cosmith
Copy link
Author

cosmith commented Feb 23, 2017

@max-mironov thanks! I think this should be a lot more visible in the docs, not buried in a note like it is right now. Maybe change the message to:

WARNING: Using the same app for iOS and Android will cause installation exceptions because the CodePush update package produced for iOS will have different content from the update produced for Android.

@max-mironov
Copy link
Contributor

@cosmith that make sense, thank you for feedback. Will try to update docs to make things more evident.
If you don't mind I'm closing the issue for now, feel free to reopen or create a new one in case of any questions.

@cosmith
Copy link
Author

cosmith commented Feb 23, 2017

Sure, thanks for your help!

max-mironov pushed a commit to max-mironov/react-native-code-push that referenced this issue Mar 3, 2017
…fferent platforms more clear

Due to multiple requests in discord chanel, microsoft#723, microsoft#717
max-mironov pushed a commit to max-mironov/code-push that referenced this issue Mar 3, 2017
max-mironov pushed a commit that referenced this issue Mar 7, 2017
* Modified Issue_Template to be more descriptive

* Some minor changes to Description field

* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, #723, #717

* Minor additional tweak for readme
max-mironov pushed a commit to microsoft/code-push that referenced this issue Mar 7, 2017
#406)

* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, microsoft/react-native-code-push#723, microsoft/react-native-code-push#717

* Minor tweak for readme
max-mironov pushed a commit to microsoft/code-push that referenced this issue Mar 10, 2017
* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, microsoft/react-native-code-push#723, microsoft/react-native-code-push#717

* Add ability to specify build type for Cordova
Also fixes issue #392

* revert changes not related to this PR

* Minor tweak for readme

* Reordered param names for cordova-release command in Readme alphabetically
max-mironov pushed a commit to microsoft/cordova-plugin-code-push that referenced this issue Mar 15, 2017
* Modified Issue_Template to be more descriptive

* Some minor changes to decription field

* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, microsoft/react-native-code-push#723, microsoft/react-native-code-push#717

* FIxed spelling for Readme
max-mironov pushed a commit to microsoft/cordova-plugin-code-push that referenced this issue Mar 23, 2017
* Modified Issue_Template to be more descriptive

* Some minor changes to decription field

* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, microsoft/react-native-code-push#723, microsoft/react-native-code-push#717

* FIxed spelling for Readme

* Supress XCode warnings on build

See #218 for details
max-mironov pushed a commit that referenced this issue Apr 4, 2017
* Modified Issue_Template to be more descriptive

* Some minor changes to Description field

* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, #723, #717

* Minor additional tweak for readme

* Bump xcode dependency

Should fix Warnings from yarn regarding node-uuid #419 (microsoft/code-push#419) issue
max-mironov pushed a commit to microsoft/code-push that referenced this issue Jul 19, 2017
* Improved messages to make intention of creating different apps for different platforms more clear

Due to multiple requests in discord chanel, microsoft/react-native-code-push#723, microsoft/react-native-code-push#717

* Minor tweak for readme

* Add ability to use plain integer number for app version

See #377 for details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants