Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Development/debug build crashes on android after downloading update #1272

Description

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. Build android development version of react-native app with code-push enabled.
  2. Load on android emulator or phone
  3. App loads and says there is an update.
  4. After update is downloaded, app crashes.

Expected Behavior

New bundle should run

Actual Behavior

New bundle crashes, and code-push reverts to existing bundle.

05-03 23:06:08.639  4208  4251 I ReactNativeJS: Downloading package.
05-03 23:06:09.285  4208  4251 I ReactNativeJS: 65100 of 4928365 received.
05-03 23:06:09.325  4208  4251 I ReactNativeJS: 171596 of 4928365 received.
05-03 23:06:09.374  4208  4251 I ReactNativeJS: 343628 of 4928365 received.
05-03 23:06:09.416  4208  4251 I ReactNativeJS: 417356 of 4928365 received.
05-03 23:06:09.460  4208  4251 I ReactNativeJS: 548428 of 4928365 received.
05-03 23:06:09.505  4208  4251 I ReactNativeJS: 663116 of 4928365 received.
05-03 23:06:09.550  4208  4251 I ReactNativeJS: 785996 of 4928365 received.
05-03 23:06:09.596  4208  4251 I ReactNativeJS: 917068 of 4928365 received.
05-03 23:06:09.638  4208  4251 I ReactNativeJS: 1015372 of 4928365 received.
05-03 23:06:09.683  4208  4251 I ReactNativeJS: 1171020 of 4928365 received.
05-03 23:06:09.726  4208  4251 I ReactNativeJS: 1310284 of 4928365 received.
05-03 23:06:09.770  4208  4251 I ReactNativeJS: 1482316 of 4928365 received.
05-03 23:06:09.816  4208  4251 I ReactNativeJS: 1629772 of 4928365 received.
05-03 23:06:09.860  4208  4251 I ReactNativeJS: 1777228 of 4928365 received.
05-03 23:06:09.904  4208  4251 I ReactNativeJS: 1932876 of 4928365 received.
05-03 23:06:09.949  4208  4251 I ReactNativeJS: 2063948 of 4928365 received.
05-03 23:06:09.993  4208  4251 I ReactNativeJS: 2260556 of 4928365 received.
05-03 23:06:10.037  4208  4251 I ReactNativeJS: 2375244 of 4928365 received.
05-03 23:06:10.082  4208  4251 I ReactNativeJS: 2506316 of 4928365 received.
05-03 23:06:10.327  4208  4251 I ReactNativeJS: 2719308 of 4928365 received.
05-03 23:06:10.416  4208  4251 I ReactNativeJS: 3227212 of 4928365 received.
05-03 23:06:10.527  4208  4251 I ReactNativeJS: 3604044 of 4928365 received.
05-03 23:06:10.571  4208  4251 I ReactNativeJS: 3694156 of 4928365 received.
05-03 23:06:10.615  4208  4251 I ReactNativeJS: 3817036 of 4928365 received.
05-03 23:06:10.660  4208  4251 I ReactNativeJS: 3857996 of 4928365 received.
05-03 23:06:10.708  4208  4251 I ReactNativeJS: 3964492 of 4928365 received.
05-03 23:06:10.750  4208  4251 I ReactNativeJS: 4087372 of 4928365 received.
05-03 23:06:10.793  4208  4251 I ReactNativeJS: 4259404 of 4928365 received.
05-03 23:06:10.838  4208  4251 I ReactNativeJS: 4406860 of 4928365 received.
05-03 23:06:10.884  4208  4251 I ReactNativeJS: 4546560 of 4928365 received.
05-03 23:06:10.926  4208  4251 I ReactNativeJS: 4661248 of 4928365 received.
05-03 23:06:10.971  4208  4251 I ReactNativeJS: 4792320 of 4928365 received.
05-03 23:06:11.015  4208  4251 I ReactNativeJS: 4915200 of 4928365 received.
05-03 23:06:11.021  4208  4251 I ReactNativeJS: 4928365 of 4928365 received.
05-03 23:06:11.314  4208  4223 D ReactNative: [CodePush] Applying full update.
05-03 23:06:11.316  4208  4251 I ReactNativeJS: Installing update.
05-03 23:06:11.330  4208  4251 I ReactNativeJS: Update installed.
05-03 23:06:11.337  4208  4252 D ReactNative: [CodePush] Loading JS bundle from "/data/user/0/io.grubmobile.app/files/CodePush/c12478e93c7c3fcc04bac253cfeb34e3066d2b69b04b65557fbdcee7475bb417/CodePush/index.android.bundle"
05-03 23:06:11.339  4208  4251 I ReactNativeJS: [CodePush] Restarting app
05-03 23:06:11.349  4208  4208 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
05-03 23:06:11.408  4208  4208 D ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
05-03 23:06:11.409  4208  4208 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
05-03 23:06:11.409  4208  4208 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
05-03 23:06:11.409  4208  4208 D ReactNative: ReactInstanceManager.tearDownReactContext()
05-03 23:06:11.410  4208  4208 D ReactNative: CatalystInstanceImpl.destroy() start
05-03 23:06:11.411  4208  4372 D ReactNative: ReactInstanceManager.createReactContext()
05-03 23:06:11.450  4208  4372 D ReactNative: Initializing React Xplat Bridge.
05-03 23:06:11.456  4208  4372 D ReactNative: Initializing React Xplat Bridge before initializeBridge
05-03 23:06:11.459  4208  4372 D ReactNative: Initializing React Xplat Bridge after initializeBridge
05-03 23:06:11.459  4208  4372 D ReactNative: CatalystInstanceImpl.runJSBundle()
05-03 23:06:11.510  4208  4226 D ReactNative: CatalystInstanceImpl.destroy() end

screen shot 2018-05-03 at 4 06 47 pm

Error

facebook::react::Recoverable: Could not open file ReactNativeDevBundle.js: No such file or directory

Environment

  • react-native-code-push version: 5.3.2
  • react-native version: 0.55.3
  • iOS/Android/Windows version: Android 7 and 8
  • Does this reproduce on a debug build or release build? Android debug only
  • Does this reproduce on a simulator, or only on a physical device? Both

Why do debug builds even use code-push? I thought debug builds bypass code-push? Only release builds should use code-push, right?

Activity

  1. alexandergoncharov-zz commented on May 7, 2018

    @alexandergoncharov-zz
    Contributor

    Hi Ujwal Setlur (@ujwal-setlur),

    Thanks for reporting!
    I reproduced your issue. I'll investigate it a little bit later.

    Thanks,
    Alexander

  2. alexandergoncharov-zz commented on May 7, 2018

    @alexandergoncharov-zz
    Contributor

    About debug builds with code-push: I'm afraid it is No, debug builds use code-push functionality. But if you will try to update app throw codePush with enabling liveReload server You would just get app version which you use on liveReload server. It may seems that update isn't working.

    From documentation(Here: https://github.com/Microsoft/react-native-code-push#releasing-updates):

    NOTE: CodePush updates should be tested in modes other than Debug mode. In Debug mode, React Native app always downloads JS bundle generated by packager, so JS bundle downloaded by CodePush does not apply.

    Thanks,
    Alexander

  3. ppatel890 commented on May 31, 2018

    @ppatel890

    Any Update with this? Dealing with the same issue

  4. gdancel commented on Jun 1, 2018

    @gdancel

    +1

  5. alexandergoncharov-zz commented on Jun 6, 2018

    @alexandergoncharov-zz
    Contributor

    Hi all,
    Sorry for long delay.

    Found that the issue is reproducing only in Live Reload mode.
    As hot workaround you can just comment your CodePush calling during developing your app. But don't forget to uncomment it when you will release your updates.
    If you would like to test CodePush logic(that your updates successful will be installed to your user devices) you should use only Release build.
    Investigation of the reason of issue in progress.

    Thanks,
    Alexander

  6. alexandergoncharov-zz commented on Jul 4, 2018

    @alexandergoncharov-zz
    Contributor

    Hi all,
    Sorry for long delay.

    I opened PR for this issue: #1332.
    Could please someone test it?

    Thanks,
    Alexander

  7. ujwal-setlur commented on Jul 4, 2018

    @ujwal-setlur
    Author

    I will test it today. Thanks!

  8. alexandergoncharov-zz commented on Jul 5, 2018

    @alexandergoncharov-zz
    Contributor

    Ujwal Setlur (@ujwal-setlur), Thanks for help!

    Please let me know about your results.

  9. 13 remaining items

  10. ujwal-setlur commented on Nov 12, 2018

    @ujwal-setlur
    Author

    g33ktony, nope I didn't. Thing to note is that this happens only on debug build for Android. App id is the same between release and debug builds

  11. alexandergoncharov-zz commented on Nov 13, 2018

    @alexandergoncharov-zz
    Contributor

    Hi Jim Chou (@wenkangzhou), g33ktony , Ujwal Setlur (@ujwal-setlur) ,

    I see that you all have the issue like that. Could you please provide logs, versions, reprosteps or dummy project with reproducing issue?

    Thanks,
    Alexander

  12. g33ktony commented on Nov 14, 2018

    @g33ktony

    Hi Jim Chou (@wenkangzhou), g33ktony , Ujwal Setlur (@ujwal-setlur) ,

    I see that you all have the issue like that. Could you please provide logs, versions, reprosteps or dummy project with reproducing issue?

    Thanks,
    Alexander

    react-native: 0.57.3
    react-native-code-push: ^5.4.2

    captura de pantalla 2018-11-14 a la s 14 47 39

    ezgif com-video-to-gif

  13. yasojha commented on Nov 15, 2018

    @yasojha

    react-native 0.56.0
    react-native-code-push 5.3.5
    and also tested it with
    react-native-code-push 5.4.2
    code-push was working fine some days before, but recently I did one npm install and it messed up everything. Red screen shows and on
    react-native log-android shows this

    11-15 17:40:46.009  4486  4506 D ReactNative: [CodePush] Applying full update.
    11-15 17:40:46.025  4486  4562 I ReactNativeJS: [CodePush] Installing update.
    11-15 17:40:46.052  4486  4563 D ReactNative: [CodePush] Loading JS bundle from "/data/user/0/com<app_package_nam>e/files/CodePush/ed3cd25941b72c1fc8efc1ccc5b07f4535474e528fcf3250200510506981680c/index.android.bundle"
    11-15 17:40:46.052  4486  4486 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
    11-15 17:40:46.054  4486  4562 I ReactNativeJS: [CodePush] Restarting app
    11-15 17:40:46.089  4486  4486 D ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
    11-15 17:40:46.090  4486  4486 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
    11-15 17:40:46.090  4486  4486 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
    11-15 17:40:46.090  4486  4486 D ReactNative: ReactInstanceManager.tearDownReactContext()
    11-15 17:40:46.096  4486  4486 D ReactNative: CatalystInstanceImpl.destroy() start
    11-15 17:40:46.102  4486  4759 D ReactNative: ReactInstanceManager.createReactContext()
    11-15 17:40:46.277  4486  4759 D ReactNative: Initializing React Xplat Bridge.
    11-15 17:40:46.287  4486  4759 D ReactNative: Initializing React Xplat Bridge before initializeBridge
    11-15 17:40:46.297  4486  4506 D ReactNative: CatalystInstanceImpl.destroy() end
    11-15 17:40:46.300  4486  4759 D ReactNative: Initializing React Xplat Bridge after initializeBridge
    11-15 17:40:46.300  4486  4759 D ReactNative: CatalystInstanceImpl.runJSBundle()
    

    and also it makes app crash in release version.

  14. yasojha commented on Nov 15, 2018

    @yasojha

    Got it working, after code-pushing the current code. Suggestion test staging one first. and note down the current version, so that you can roll-back to right version. working good, in release version also.
    I think the problem was, react-native-code-push pushing the older binaries to updated code.

  15. baicuhaha commented on Dec 20, 2018

    @baicuhaha

    Sorry I have this problem too RN:0.57.7 , "react-native-code-push": "^5.5.0",

  16. g33ktony commented on Jan 10, 2019

    @g33ktony

    I have updated to react-native-code-push: 5.5.0 and I still having the same issue

  17. darkfiredarkhalo commented on Jan 14, 2019

    @darkfiredarkhalo

    react: 16.6.0-alpha.8af6728
    react-native: 0.57.4
    react-native-code-push: 5.5.1

    I have the same issue in Android

  18. vladpalkanov commented on Feb 12, 2019

    @vladpalkanov

    "react": "16.6.3"
    "react-native": "0.58.4"
    "haul": "^1.0.0-rc.12"
    "react-native-code-push": "^5.5.2"

    The same issue using Android 9 emulator

  19. dachinat commented on Mar 24, 2019

    @dachinat

    Same here using debug

  20. viralS-tuanlv commented on Mar 25, 2019

    @viralS-tuanlv

    i am using "react-native-code-push": "^5.6.0" and got this issue, please telll me why? thanks

  21. KitYeungDev commented on Apr 5, 2019

    @KitYeungDev

    If use Debug mode: react-native run-android, happen this issue;
    If use Release mode: react-native run-android --variant=release, update version success.

    Alexander Goncharov (@alexandergoncharov)
    Anyway, have any better way to test code push in debug mode?

  22. gamsim commented on May 16, 2019

    @gamsim

    I'm getting the same with latest RN.

    "react-native": "0.59.8"
    "react-native-code-push": "5.6.0"

  23. rendomnet commented on May 29, 2019

    @rendomnet

    same issue
    "react-native-code-push": "^5.6.0",
    "react-native": "^0.59.8",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions