nativescript-dev-webpack
nativescript-dev-webpack copied to clipboard
HMR : app not reloading after app switching or screen off (android)
Environment
√ Component nativescript has 6.0.0 version and is up to date. √ Component tns-core-modules has 6.0.1 version and is up to date. √ Component tns-android has 6.0.0 version and is up to date. √ Component tns-ios has 6.0.1 version and is up to date. "nativescript-dev-webpack": "1.0.1"
Describe the bug
Testing on an Android device (9.0 Pie) and Android Emulator (API 25) : HMR is working well, but if you switch to another application or to the home screen and come back to the nativescript application HMR seems working on CLI but application is not refreshing on device. same behavior when the screen goes to sleep, after unlocking HMR seems working on CLI but application is not refreshing.
To Reproduce
Just create a new fresh projet tns create hmr-test --ng
and tns run android
and try to modify some code after application switch or screen lock / unlock.
Hey @jbarnabe , Thanks for your report. Does the HMR apply after unlocking the device and making a new change in your code?
Hi, @rosen-vladimirov Thanks for your reply.
No, unfortunaly no change after unlock, in the console everything seems to be OK : after each save on editor all things seems to be generated and synchronized to the device (according to the console messages). But nothing happens on the device. Everything works normally as long as the screen is not locked or I don't switch the application.
I don't know if I'm clear ? I have the problem with a blank Angular project, are you able to reproduce it ?
I am able to reproduce this in an emulator:
-
tns debug android
- Click home button
- Click square button and bring back the application from the background
- Try editing the code
HMR kicks in but the device is not refreshed.
Is there a fix in sight or a workaround available? This bug unfortunately makes developing with Nativescript really unpleasant.
did anyone solve this somehow? I have the exact same problem. strange thing is - on one page of the app it does it - on the other not...
Additional Info: I just have some buttons that you can click and should change colors in certain ways. after locking the tap events still fire in the console- but fire multiple times in random numbers it seems but noting happens on the screen.
now notably if i lock and unlock again everything goes back to normal!
I also hooked all possible android events to the page and on the first unlock the resume event fires many times but also random numbers it seems
I'm having the exact same issue has this been resolved?
Has this been fixed yet?