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

New version identified but is not installing on-demand #1436

Closed
lnfnunes opened this Issue Oct 22, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@lnfnunes

lnfnunes commented Oct 22, 2018

The App is not installing last updated version after user accepted in the modal dialog. The new version is only shown after restarting!
Obs: I've tried both normal and mandatory releases
Obs2: I've tried installModes: IMMEDIATE, ON_APP_RESUME, ON_APP_SUSPEND

Steps to Reproduce

  1. react-native init codepushdemo
  2. replace App.js to with the master's example
  3. Change some string in the App.js
  4. Publish a new version to app center (CodePush)
  5. In the app, click on the button Press for dialog-driven sync

Expected Behavior

What you expected to happen?

  1. Identifies the new version
  2. Download the bundle
  3. Update the app in the foreground
  4. Restart the app

Actual Behavior

What actually happens?

  1. Identifies the new version
  2. Download the bundle
  3. Update the app in the foreground ❗️
  4. Restart the app ❗️

Environment

  • react-native-code-push version: 5.4.2
  • react-native version: 0.57.3
  • iOS/Android/Windows version: Android (not tested on iOS)
  • Does this reproduce on a debug build or release build? release apk
  • Does this reproduce on a simulator, or only on a physical device? physical device

(The more info the faster we will be able to address it!)

@alexandergoncharov

This comment has been minimized.

Member

alexandergoncharov commented Oct 23, 2018

Hi @lnfnunes ,
Thanks for reporting!

Could you please also share logs during update?
For Android you can get it with Android Studio or with adb logcat command.

Thanks,
Alexander

@lnfnunes

This comment has been minimized.

lnfnunes commented Oct 23, 2018

@alexandergoncharov

adb logcat | grep codepush
10-23 17:07:52.702  3649  3740 I WindowManager: Destroying surface Surface(name=Splash Screen com.rncodepush) called by com.android.server.wm.WindowStateAnimator.destroySurface:2501 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:985 com.android.server.wm.WindowState.destroyOrSaveSurfaceUnchecked:3680 com.android.server.wm.WindowState.destroySurface:3628 com.android.server.wm.AppWindowToken.destroySurfaces:722 com.android.server.wm.AppWindowToken.destroySurfaces:706 com.android.server.wm.WindowState.onExitAnimationDone:5335 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:550
10-23 17:07:52.702  3199  3221 I SurfaceFlinger: id=37320 Removed Splash Screen com.rncodepush#0 (3/7)
10-23 17:07:52.707  3649  3790 D MdnieScenarioControlService:  packageName : com.rncodepush    className : com.rncodepush.MainActivity
10-23 17:07:52.707  3199  3333 I SurfaceFlinger: id=37320 Removed Splash Screen com.rncodepush#0 (-2/7)
10-23 17:07:52.713  3199  3199 I Layer   : id=37320 onRemoved Splash Screen com.rncodepush#0
10-23 17:07:53.120  3649  4634 D GameManagerService: identifyGamePackage. com.rncodepush
10-23 17:07:53.120  3649  4634 D GamePkgDataHelper: getGamePkgData(). com.rncodepush
10-23 17:07:58.107  3649  9280 D GameManagerService: identifyGamePackage. com.rncodepush
10-23 17:07:58.107  3649  9280 D GamePkgDataHelper: getGamePkgData(). com.rncodepush
10-23 17:11:00.803 20167 20167 I oneconnect[1.7.16-25_03]: Util.isQcTopProcess - false [package]com.samsung.android.oneconnect [topProcess]com.rncodepush
10-23 17:11:15.779 20167 20167 I oneconnect[1.7.16-25_03]: Util.isQcTopProcess - false [package]com.samsung.android.oneconnect [topProcess]com.rncodepush



// THE MOMENT WHEN I CLICK TO VERIFY NEW VERSION \\


10-23 17:12:06.767  3649  4366 V WindowManager: Relayout Window{3732043 u0 com.rncodepush/com.rncodepush.MainActivity}: viewVisibility=0 req=1366x643 WM.LayoutParams{(0,0)(wrapxwrap) gr=#11 sim=#120 ty=2 fl=#1820002 fmt=-3 wanim=0x10302fe surfaceInsets=Rect(112, 112 - 112, 112) needsMenuKey=2 colorMode=0 naviIconColor=0}
10-23 17:12:06.793  3199  3199 D SurfaceFlinger: duplicate layer name: changing com.rncodepush/com.rncodepush.MainActivity to com.rncodepush/com.rncodepush.MainActivity#1
10-23 17:12:06.800  3199  3199 I SurfaceFlinger: id=37322 createSurf (1590x867),1 flag=4, com.rncodepush/com.rncodepush.MainActivity#1
10-23 17:12:06.954  3649  3660 V WindowManager: finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING Window{3732043 u0 com.rncodepush/com.rncodepush.MainActivity} in Surface(name=com.rncodepush/com.rncodepush.MainActivity)
10-23 17:12:07.074  3199  3199 D SurfaceFlinger:        HWC | 72b7a2da80 | 0000 | 0020 | 00 | 0100 | RGBA_8888   |    0.0,    0.0, 1440.0, 2560.0 |    0,    0, 1440, 2560 | com.rncodepush/com.rncodepush.MainActivity#0
10-23 17:12:07.074  3199  3199 D SurfaceFlinger:        HWC | 72b7a2df00 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |   75.0,    0.0, 1515.0,  867.0 |    0,  888, 1440, 1755 | com.rncodepush/com.rncodepush.MainActivity#1
10-23 17:12:07.111  3199  3199 D SurfaceFlinger:        HWC | 72b7a2da80 | 0000 | 0020 | 00 | 0100 | RGBA_8888   |    0.0,    0.0, 1440.0, 2560.0 |    0,    0, 1440, 2560 | com.rncodepush/com.rncodepush.MainActivity#0
10-23 17:12:07.111  3199  3199 D SurfaceFlinger:        HWC | 72b7a2df00 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |   75.0,    0.0, 1515.0,  867.0 |    0,  888, 1440, 1755 | com.rncodepush/com.rncodepush.MainActivity#1
10-23 17:12:10.569 27355 27391 D InputEventReceiver: channel '3732043 com.rncodepush/com.rncodepush.MainActivity (client)' ~ Disposing input event receiver.
10-23 17:12:10.569 27355 27391 D InputEventReceiver: channel '3732043 com.rncodepush/com.rncodepush.MainActivity (client)' ~NativeInputEventReceiver.
10-23 17:12:10.767  3199  3199 D SurfaceFlinger:        HWC | 72b3730c40 | 0000 | 0020 | 00 | 0100 | RGBA_8888   |    0.0,    0.0, 1440.0, 2560.0 |    0,    0, 1440, 2560 | com.rncodepush/com.rncodepush.MainActivity#0
10-23 17:12:10.916  3649  3740 I WindowManager: Destroying surface Surface(name=com.rncodepush/com.rncodepush.MainActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2501 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:985 com.android.server.wm.WindowState.destroyOrSaveSurfaceUnchecked:3680 com.android.server.wm.WindowState.destroySurface:3628 com.android.server.wm.AppWindowToken.destroySurfaces:722 com.android.server.wm.AppWindowToken.destroySurfaces:706 com.android.server.wm.WindowState.onExitAnimationDone:5335 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:550
10-23 17:12:10.916  3199  3221 I SurfaceFlinger: id=37322 Removed com.rncodepush/com.rncodepush.MainActivity#1 (4/7)
10-23 17:12:10.929  3199  3199 I Layer   : id=37322 onRemoved com.rncodepush/com.rncodepush.MainActivity#1
10-23 17:12:10.952  3199  3199 D SurfaceFlinger:        HWC | 72b3730c40 | 0000 | 0020 | 00 | 0100 | RGBA_8888   |    0.0,    0.0, 1440.0, 2560.0 |    0,    0, 1440, 2560 | com.rncodepush/com.rncodepush.MainActivity#0
10-23 17:12:12.181 27355 29416 D ReactNative: [CodePush] Verifying hash for folder path: /data/user/0/com.rncodepush/files/CodePush/fcb785fa25bba4853d44668b2b3699d68dd1ffabb5611484e537d05c12dd8f32
10-23 17:12:12.446 27355 27391 D ReactNative: [CodePush] Loading JS bundle from "/data/user/0/com.rncodepush/files/CodePush/fcb785fa25bba4853d44668b2b3699d68dd1ffabb5611484e537d05c12dd8f32/CodePush/index.android.bundle"
10-23 17:12:12.549  3649  4227 V WindowManager: Relayout Window{7a5a665 u0 com.rncodepush/com.rncodepush.MainActivity}: viewVisibility=0 req=1440x2560 WM.LayoutParams{(0,0)(fillxfill) sim=#110 ty=1 fl=#80810100 pfl=0x20000 wanim=0x10302fd vsysui=0x600 needsMenuKey=2 colorMode=0 naviIconColor=0}

After clicked, CodePush verify and identifies the new mandatory version, but the message says it will be applyed only after the restart

This is the app after restarted!

image

This is the App.js I'm using in the tests!

https://gist.github.com/lnfnunes/9569912f1be3d89bc11cc21abdd8f470

@alexandergoncharov

This comment has been minimized.

Member

alexandergoncharov commented Oct 29, 2018

@lnfnunes , Thanks for logs and screens and sorry for delay.

So, I would like to clarify, your issue is that app doesn't installing update at all or just installing update only after restart app in case when should be installed IMMEDIATE?

@lnfnunes

This comment has been minimized.

lnfnunes commented Oct 30, 2018

@alexandergoncharov Installing only after restart

I clicked in the button "Press for dialog-driven sync" and accepted to update, CodePush could identify there´s a new version, downloaded it, my screen blinks like it has installed but instead of the new version I receive the version shown in the print "Update installed and will be applyed after restart."

I expected to see the new version immediately instead of having to restart the app.

@alexandergoncharov

This comment has been minimized.

Member

alexandergoncharov commented Oct 30, 2018

@lnfnunes, Yeah, even IMMEDIATE setting has state when it waiting the restart as update can be applied only after restart. But in this case restart should be called from CodePush, not from user action.
Could you please try to wait a few seconds in this state? The app should be restarted automatically.
Please let me know your results.

@alexandergoncharov

This comment has been minimized.

Member

alexandergoncharov commented Nov 6, 2018

Hi @lnfnunes ,

I'm going to close this issue for now as I haven't heard from you in a while unfortunately.
Please fell free to reopen it if you have any questions.

Thanks,
Alexander

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