NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

[Bug] Frequent HMR frequent failures #1095

Open NathanaelA opened 4 years ago

NathanaelA commented 4 years ago

Environment

Describe the bug HMR fails the majority of time

To Reproduce

  1. tns create testvue (Create empty vue stock app)
  2. tns run android
  3. Change the css background value

Notes: @vakrilov and I surmise this might be a issue on Linux machine(s), we both did the exact same steps, both of us created a new stock vue app -- his machine HMR worked perfectly. My machine HMR failed.

Expected behavior Always works :grinning:

Sample project Just create a stock vue app

Additional context Showed issue to @vakrilov at jsmobile conf

--- Log for working

Successfully transferred bundle.3edc8fff861c882d1c39.hot-update.js on device emulator-5554.
Successfully transferred 3edc8fff861c882d1c39.hot-update.json on device emulator-5554.
JS: HMR: Checking for updates to the bundle with hmr hash 3edc8fff861c882d1c39.
Refreshing application on device emulator-5554...
JS: HMR: The following modules were updated:
JS: HMR:          ↻ ../node_modules/nativescript-dev-webpack/style-hot-loader.js!../node_modules/nativescript-dev-webpack/apply-css-loader.js!../node_modules/css-loader/dist/cjs.js?!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/sass-loader/lib/loader.js!../node_modules/vue-loader/lib/index.js?!./components/Home.vue?vue&type=style&index=0&id=67410f3a&scoped=true&lang=scss&
JS: HMR: Successfully applied update with hmr hash 3edc8fff861c882d1c39. App is up to date.
JS: 'topmost() is deprecated. Use Frame.topmost() instead.'
Successfully synced application org.nativescript.testvue on device emulator-5554.

Log for failing:

File change detected. Starting incremental webpack compilation...
Webpack compilation complete. Watching for file changes.
Webpack build done!
Successfully transferred bundle.js on device emulator-5554.
Restarting application on device emulator-5554...
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
JS: 'NativeScript-Vue has "Vue.config.silent" set to true, to see output logs set it to false.'
JS: HMR: Checking for updates to the bundle with hmr hash 3edc8fff861c882d1c39.
JS: HMR: The following modules were updated:
JS: HMR:          ↻ ../node_modules/nativescript-dev-webpack/style-hot-loader.js!../node_modules/nativescript-dev-webpack/apply-css-loader.js!../node_modules/css-loader/dist/cjs.js?!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/sass-loader/lib/loader.js!../node_modules/vue-loader/lib/index.js?!./components/Home.vue?vue&type=style&index=0&id=67410f3a&scoped=true&lang=scss&
JS: HMR: Successfully applied update with hmr hash 3edc8fff861c882d1c39. App is up to date.
Successfully synced application org.nativescript.testvue on device emulator-5554.
rosen-vladimirov commented 4 years ago

Hey @NathanaelA , Can you send us the output of tns run android --log trace and send us the generated output, so we can investigate the issue. Also, can you try installing nativescript-dev-webpack@next and see if there will be improvement in this area.

NathanaelA commented 4 years ago
  1. Fresh TNS Run then a single CSS change;

Attached is the logs:

JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
JS: 'NativeScript-Vue has "Vue.config.silent" set to true, to see output logs set it to false.'
-----------------------[ Success ] ------------------------
File change detected. Starting incremental webpack compilation...
Hash: ad05e6b3ead1105d6466
Version: webpack 4.27.1
Time: 317ms
Built at: 11/15/2019 12:45:21 PM
                                    Asset      Size   Chunks             Chunk Names
bundle.d7b9c066afdc40f46b81.hot-update.js  3.96 KiB   bundle  [emitted]  bundle
                                bundle.js   358 KiB   bundle  [emitted]  bundle
     d7b9c066afdc40f46b81.hot-update.json  48 bytes           [emitted]  
                               runtime.js  71.4 KiB  runtime  [emitted]  runtime
 + 1 hidden asset
Entrypoint bundle = runtime.js vendor.js bundle.js bundle.d7b9c066afdc40f46b81.hot-update.js
[./ sync ^\.\/app\.(css|scss|less|sass)$] . sync nonrecursive ^\.\/app\.(css|scss|less|sass)$ 175 bytes {bundle} [built]
[./ sync recursive (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$] . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$ 188 bytes {bundle} [built]
    + 252 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Try executing watch action without any preparation of files.
Will execute livesync for files:  [ '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.d7b9c066afdc40f46b81.hot-update.js',
  '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/d7b9c066afdc40f46b81.hot-update.json' ]
spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "ls" "/data/local/tmp/org.nativescript.testvue/hashes"
Result when throw error is false:
{ stdout: '/data/local/tmp/org.nativescript.testvue/hashes\n',
  stderr: '',
  exitCode: 0 }
Shasum of file /home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.d7b9c066afdc40f46b81.hot-update.js is b317b466a444d91017829620c15d0004f4342226
Shasum of file /home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/d7b9c066afdc40f46b81.hot-update.json is aec912df462b11ca25ac1756396f022fee8e38ea
Files to transfer:  [ LocalToDevicePathData {
    filePath:
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.d7b9c066afdc40f46b81.hot-update.js',
    localProjectRootPath:
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app',
    onDeviceFileName: 'bundle.d7b9c066afdc40f46b81.hot-update.js',
    deviceProjectRootPath: '/data/local/tmp/org.nativescript.testvue/sync' },
  LocalToDevicePathData {
    filePath:
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/d7b9c066afdc40f46b81.hot-update.json',
    localProjectRootPath:
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app',
    onDeviceFileName: 'd7b9c066afdc40f46b81.hot-update.json',
    deviceProjectRootPath: '/data/local/tmp/org.nativescript.testvue/sync' } ]
spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "mkdir" "-p" "/data/local/tmp/org.nativescript.testvue"
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }
spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "push" "/tmp/android-device-hash-service-org.nativescript.testvue1191015-13824-1eaunrf.hvqek/hashes" "/data/local/tmp/org.nativescript.testvue/hashes"
Result when throw error is false:
{ stdout:
   '/tmp/android-device-hash-service-org.nativescript.testvue1191015-13824-1eaunrf.hvqek/hashes: 1 file pushed. 0.4 MB/s (353 bytes in 0.001s)\n',
  stderr: '',
  exitCode: 0 }
spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "chmod" "0777" "/data/local/tmp/org.nativescript.testvue"
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }
Successfully transferred bundle.d7b9c066afdc40f46b81.hot-update.js on device emulator-5554.
Successfully transferred d7b9c066afdc40f46b81.hot-update.json on device emulator-5554.
spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "rm" "-rf" "/data/local/tmp/org.nativescript.testvue-livesync-in-progress"
JS: HMR: Checking for updates to the bundle with hmr hash d7b9c066afdc40f46b81.
Found hmr status. { status: null, hash: 'd7b9c066afdc40f46b81' }
JS: HMR: The following modules were updated:
JS: HMR:          ↻ ../node_modules/nativescript-dev-webpack/style-hot-loader.js!../node_modules/nativescript-dev-webpack/apply-css-loader.js!../node_modules/css-loader/dist/cjs.js?!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/sass-loader/lib/loader.js!../node_modules/vue-loader/lib/index.js?!./components/Home.vue?vue&type=style&index=0&id=67410f3a&scoped=true&lang=scss&
JS: HMR: Successfully applied update with hmr hash d7b9c066afdc40f46b81. App is up to date.
Found hmr status. { status: 2, hash: 'd7b9c066afdc40f46b81' }
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }
Refreshing application on device emulator-5554...
Will emit event runOnDeviceExecuted with data { projectDir: '/home/nathanael/projects/NativeScript/testvue',
  deviceIdentifier: 'emulator-5554',
  applicationIdentifier: 'org.nativescript.testvue',
  syncedFiles:
   [ '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.d7b9c066afdc40f46b81.hot-update.js',
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/d7b9c066afdc40f46b81.hot-update.json' ],
  isFullSync: false }
JS: 'topmost() is deprecated. Use Frame.topmost() instead.'
Successfully synced application org.nativescript.testvue on device emulator-5554.
Successfully executed watch action without any preparation of files.
  1. This is the second change; the app actually restarted and still was the color from above's successful change, not this css change.
    --------------------- Failure -----------------------------
    File change detected. Starting incremental webpack compilation...
    Webpack compilation complete. Watching for file changes.
    Webpack build done!
    Try executing watch action without any preparation of files.
    Will execute livesync for files:  [ '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.js' ]
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "ls" "/data/local/tmp/org.nativescript.testvue/hashes"
    Result when throw error is false:
    { stdout: '/data/local/tmp/org.nativescript.testvue/hashes\n',
    stderr: '',
    exitCode: 0 }
    Shasum of file /home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.js is e48d636d10a5f06009e8803936596dff12d93d13
    Files to transfer:  [ LocalToDevicePathData {
    filePath:
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.js',
    localProjectRootPath:
     '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app',
    onDeviceFileName: 'bundle.js',
    deviceProjectRootPath: '/data/local/tmp/org.nativescript.testvue/sync' } ]
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "mkdir" "-p" "/data/local/tmp/org.nativescript.testvue"
    Result when throw error is false:
    { stdout: '', stderr: '', exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "push" "/tmp/android-device-hash-service-org.nativescript.testvue1191015-13824-1eaunrf.hvqek/hashes" "/data/local/tmp/org.nativescript.testvue/hashes"
    Result when throw error is false:
    { stdout:
    '/tmp/android-device-hash-service-org.nativescript.testvue1191015-13824-1eaunrf.hvqek/hashes: 1 file pushed. 0.1 MB/s (148 bytes in 0.001s)\n',
    stderr: '',
    exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "chmod" "0777" "/data/local/tmp/org.nativescript.testvue"
    Result when throw error is false:
    { stdout: '', stderr: '', exitCode: 0 }
    Successfully transferred bundle.js on device emulator-5554.
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "rm" "-rf" "/data/local/tmp/org.nativescript.testvue-livesync-in-progress"
    Result when throw error is false:
    { stdout: '', stderr: '', exitCode: 0 }
    Restarting application on device emulator-5554...
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "am" "force-stop" "org.nativescript.testvue"
    Result when throw error is false:
    { stdout: '', stderr: '', exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "cat /dev/null > /data/local/tmp/org.nativescript.testvue-debugger-started"
    Result when throw error is false:
    { stdout: '', stderr: '', exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "pm" "dump" "org.nativescript.testvue" "|" "grep" "-A" "1" "MAIN"
    Result when throw error is false:
    { stdout:
    '      android.intent.action.MAIN:\n        d5f0fb3 org.nativescript.testvue/com.tns.NativeScriptActivity filter 337b593\n          Action: "android.intent.action.MAIN"\n          Category: "android.intent.category.LAUNCHER"\n--\n  Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000100 cmp=com.google.android.apps.nexuslauncher/.NexusLauncherActivity }\n  frontOfTask=true task=TaskRecord{f92c22b #2 I=com.google.android.apps.nexuslauncher/.NexusLauncherActivity U=0 StackId=0 sz=1}\n--\n      intent={act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000100 cmp=com.google.android.apps.nexuslauncher/.NexusLauncherActivity}\n      realActivity=com.google.android.apps.nexuslauncher/.NexusLauncherActivity\n',
    stderr: '',
    exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "am" "start" "-n" "org.nativescript.testvue/com.tns.NativeScriptActivity"
    Result when throw error is false:
    { stdout:
    'Starting: Intent { cmp=org.nativescript.testvue/com.tns.NativeScriptActivity }\n',
    stderr: '',
    exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "ps"
    Result when throw error is false:
    { stdout:
    'USER           PID  PPID     VSZ    RSS WCHAN            ADDR S NAME                       \nroot             1     0   17440   1660 0                   0 S init\nroot             2     0       0      0 0                   0 S [kthreadd]\nroot             3     2       0      0 0                   0 S [ksoftirqd/0]\nroot             4     2       0      0 0                   0 S [kworker/0:0]\nroot             5     2       0      0 0                   0 S [kworker/0:0H]\nroot             6     2       0      0 0                   0 S [kworker/u8:0]\nroot             7     2       0      0 0                   0 S [rcu_preempt]\nroot             8     2       0      0 0                   0 S [rcu_sched]\nroot             9     2       0      0 0                   0 S [rcu_bh]\nroot            10     2       0      0 0                   0 S [migration/0]\nroot            11     2       0      0 0                   0 S [migration/1]\nroot            12     2       0      0 0                   0 S [ksoftirqd/1]\nroot            13     2       0      0 0                   0 S [kworker/1:0]\nroot            14     2       0      0 0                   0 S [kworker/1:0H]\nroot            15     2       0      0 0                   0 S [migration/2]\nroot            16     2       0      0 0                   0 S [ksoftirqd/2]\nroot            17     2       0      0 0                   0 S [kworker/2:0]\nroot            18     2       0      0 0                   0 S [kworker/2:0H]\nroot            19     2       0      0 0                   0 S [migration/3]\nroot            20     2       0      0 0                   0 S [ksoftirqd/3]\nroot            21     2       0      0 0                   0 S [kworker/3:0]\nroot            22     2       0      0 0                   0 S [kworker/3:0H]\nroot            23     2       0      0 0                   0 S [netns]\nroot            24     2       0      0 0                   0 S [kworker/u8:1]\nroot            26     2       0      0 0                   0 S [perf]\nroot            32     2       0      0 0                   0 S [kworker/u8:2]\nroot            64     2       0      0 0                   0 S [kworker/u8:3]\nroot           378     2       0      0 0                   0 S [khungtaskd]\nroot           379     2       0      0 0                   0 S [writeback]\nroot           381     2       0      0 0                   0 S [crypto]\nroot           382     2       0      0 0                   0 S [bioset]\nroot           384     2       0      0 0                   0 S [kblockd]\nroot           497     2       0      0 0                   0 S [ata_sff]\nroot           517     2       0      0 0                   0 S [md]\nroot           527     2       0      0 0                   0 S [kworker/0:1]\nroot           528     2       0      0 0                   0 S [cfg80211]\nroot           624     2       0      0 0                   0 S [kworker/u8:4]\nroot           646     2       0      0 0                   0 S [kswapd0]\nroot           647     2       0      0 0                   0 S [vmstat]\nroot           720     2       0      0 0                   0 S [fsnotify_mark]\nroot           790     2       0      0 0                   0 S [acpi_thermal_pm]\nroot           816     2       0      0 0                   0 S [hwrng]\nroot           822     2       0      0 0                   0 S [bioset]\nroot           823     2       0      0 0                   0 S [bioset]\nroot           824     2       0      0 0                   0 S [bioset]\nroot           825     2       0      0 0                   0 S [bioset]\nroot           826     2       0      0 0                   0 S [bioset]\nroot           827     2       0      0 0                   0 S [bioset]\nroot           828     2       0      0 0                   0 S [bioset]\nroot           829     2       0      0 0                   0 S [bioset]\nroot           830     2       0      0 0                   0 S [bioset]\nroot           831     2       0      0 0                   0 S [bioset]\nroot           832     2       0      0 0                   0 S [bioset]\nroot           833     2       0      0 0                   0 S [bioset]\nroot           834     2       0      0 0                   0 S [bioset]\nroot           835     2       0      0 0                   0 S [bioset]\nroot           836     2       0      0 0                   0 S [bioset]\nroot           837     2       0      0 0                   0 S [bioset]\nroot           865     2       0      0 0                   0 S [kworker/3:1]\nroot           872     2       0      0 0                   0 S [bioset]\nroot           875     2       0      0 0                   0 S [bioset]\nroot           878     2       0      0 0                   0 S [bioset]\nroot           881     2       0      0 0                   0 S [bioset]\nroot           884     2       0      0 0                   0 S [bioset]\nroot           887     2       0      0 0                   0 S [bioset]\nroot           890     2       0      0 0                   0 S [bioset]\nroot           893     2       0      0 0                   0 S [bioset]\nroot           896     2       0      0 0                   0 S [bioset]\nroot           900     2       0      0 0                   0 S [bioset]\nroot           903     2       0      0 0                   0 S [bioset]\nroot           906     2       0      0 0                   0 S [bioset]\nroot           909     2       0      0 0                   0 S [bioset]\nroot           913     2       0      0 0                   0 S [bioset]\nroot           920     2       0      0 0                   0 S [iscsi_eh]\nroot           940     2       0      0 0                   0 S [scsi_eh_0]\nroot           941     2       0      0 0                   0 S [scsi_tmf_0]\nroot           943     2       0      0 0                   0 S [scsi_eh_1]\nroot           946     2       0      0 0                   0 S [scsi_tmf_1]\nroot           963     2       0      0 0                   0 S [kworker/2:1]\nroot           964     2       0      0 0                   0 S [kworker/u8:5]\nroot          1017     2       0      0 0                   0 S [kworker/1:1]\nroot          1021     2       0      0 0                   0 S [dm_bufio_cache]\nroot          1054     2       0      0 0                   0 S [binder]\nroot          1088     2       0      0 0                   0 S [ipv6_addrconf]\nroot          1103     2       0      0 0                   0 S [deferwq]\nroot          1120     2       0      0 0                   0 S [bioset]\nroot          1126     2       0      0 0                   0 S [kdmflush]\nroot          1128     2       0      0 0                   0 S [bioset]\nroot          1129     2       0      0 0                   0 S [kverityd]\nroot          1130     2       0      0 0                   0 S [bioset]\nroot          1132     2       0      0 0                   0 S [ext4-rsv-conver]\nroot          1183     2       0      0 0                   0 S [ext4-rsv-conver]\nroot          1184     1    4484    600 0                   0 S init\nroot          1185     1    4228    760 0                   0 S init\nroot          1186     1    4868   1080 0                   0 S ueventd\nlogd          1555     1   16088   5216 0                   0 S logd\nsystem        1556     1    7560   3648 0                   0 S servicemanager\nsystem        1557     1   12008   5024 0                   0 S hwservicemanager\nsystem        1558     1    8328   2004 0                   0 S vndservicemanager\nsystem        1559     1   11676   5140 0                   0 S android.hardware.keymaster@3.0-service\nroot          1560     1   20416   6252 0                   0 S vold\nroot          1566     2       0      0 0                   0 S [kauditd]\nsystem        1609     1    8180   2640 0                   0 S android.hidl.allocator@1.0-service\nroot          1610     1    8548   2552 0                   0 S healthd\nsystem        1611     1   17488   4904 0                   0 S vr_hwc\naudioserver   1612     1   26292   4128 0                   0 S android.hardware.audio@2.0-service\naudioserver   1613     1    9668   3160 0                   0 S android.hardware.broadcastradio@1.1-service\ncameraserver  1614     1   25684   5780 0                   0 S android.hardware.camera.provider@2.4-service\nmedia         1615     1   11944   3184 0                   0 S android.hardware.cas@1.0-service\nsystem        1616     1   12028   3472 0                   0 S android.hardware.configstore@1.1-service\nmedia         1617     1   15140   3548 0                   0 S android.hardware.drm@1.0-service\nmedia         1618     1   16092   3556 0                   0 S android.hardware.drm@1.1-service.clearkey\nmedia         1619     1   18912   3136 0                   0 S android.hardware.drm@1.1-service.widevine\nsystem        1620     1   11748   3076 0                   0 S android.hardware.gatekeeper@1.0-service\ngps           1621     1   14340   3652 0                   0 S android.hardware.gnss@1.0-service\nsystem        1622     1   21096   3596 0                   0 S android.hardware.graphics.allocator@2.0-service\nsystem        1624     1    9448   3220 0                   0 S android.hardware.health@2.0-service.goldfish\nsystem        1625     1    9184   3316 0                   0 S android.hardware.power@1.1-service.ranchu\nsystem        1626     1   10912   3300 0                   0 S android.hardware.sensors@1.0-service\nwifi          1627     1   13348   4032 0                   0 S android.hardware.wifi@1.0-service\nroot          1629     1    6996   2020 0                   0 S qemu-props\naudioserver   1630     1   61488  11228 0                   0 S audioserver\nroot          1631     1    6248   2408 0                   0 S lmkd\nsystem        1633     1   11212   3996 0                   0 S thermalserviced\nlogd          1634     1    7048   3324 0                   0 S logcat\nnobody        1639     1    8116   3028 0                   0 S traced\nnobody        1641     1    8116   2928 0                   0 S traced_probes\nroot          1668     2       0      0 0                   0 S [kdmflush]\nroot          1674     2       0      0 0                   0 S [bioset]\nroot          1675     2       0      0 0                   0 S [kcryptd_io]\nroot          1676     2       0      0 0                   0 S [kworker/u9:0]\nroot          1677     2       0      0 0                   0 S [kcryptd]\nroot          1678     2       0      0 0                   0 S [dmcrypt_write]\nroot          1680     2       0      0 0                   0 S [bioset]\nroot          1702     2       0      0 0                   0 S [kworker/u9:1]\nroot          1703     2       0      0 0                   0 S [kworker/u9:2]\nroot          1704     2       0      0 0                   0 S [kworker/u9:3]\nroot          1705     2       0      0 0                   0 S [kworker/u9:4]\nroot          1706     2       0      0 0                   0 S [kworker/3:1H]\nroot          1707     2       0      0 0                   0 S [kworker/1:1H]\nroot          1708     2       0      0 0                   0 S [kworker/2:1H]\nroot          1711     2       0      0 0                   0 S [kworker/0:1H]\nroot          1719     2       0      0 0                   0 D [jbd2/dm-1-8]\nroot          1720     2       0      0 0                   0 S [ext4-rsv-conver]\nsystem        1726     1  153540  10684 0                   0 S surfaceflinger\nroot          1727     1 1357968  93600 0                   0 S zygote\ncameraserver  1728     1   37068   8416 0                   0 S cameraserver\ndrm           1729     1   29536   8620 0                   0 S drmserver\nincidentd     1730     1   12852   4176 0                   0 S incidentd\nroot          1731     1   17572   5592 0                   0 S installd\nkeystore      1732     1   16644   5580 0                   0 S keystore\nmedia         1733     1   21792   5648 0                   0 S mediadrmserver\nmediaex       1734     1   61696  11732 0                   0 S media.extractor\nmedia         1735     1   28100   8356 0                   0 S media.metrics\nmedia         1736     1   75904  14252 0                   0 S mediaserver\nroot          1737     1   38400   5908 0                   0 S netd\nstatsd        1738     1   15280   4848 0                   0 S statsd\nroot          1739     1   16656   4560 0                   0 S storaged\nwifi          1740     1   13480   5328 0                   0 S wificond\nmediacodec    1741     1   41820  10496 0                   0 S media.codec\nradio         1742     1   17280   3088 0                   0 S rild\nsystem        1744     1   13468   4528 0                   0 S gatekeeperd\ntombstoned    1745     1    6180   2108 0                   0 S tombstoned\nsystem        1747     1   10408   3388 0                   0 S android.hardware.biometrics.fingerprint@2.1-service\nroot          1755  1737    7204   3176 0                   0 S iptables-restore\nroot          1756  1737    7216   3212 0                   0 S ip6tables-restore\nroot          1796     2       0      0 0                   0 S [kworker/3:2]\nroot          1816     1    6612    552 0                   0 S createns\nroot          1822     1    7216   2004 0                   0 S netmgr\nroot          1828     2       0      0 0                   0 S [kworker/0:2]\nroot          1843     1    6624   1908 0                   0 S dhcpclient\nroot          1852     1    6880   1996 0                   0 S ipv6proxy\nwifi          1855     1    9404   3228 0                   0 S hostapd_nohidl\nroot          1857     1    6752   2064 0                   0 S dhcpserver\nsystem        1867  1727 1766572 220128 0                   0 S system_server\nsystem        1894     1   84472   6476 0                   0 S android.hardware.graphics.composer@2.1-service\nu0_a60        1992  1727 1567164 133152 0                   0 S com.google.android.inputmethod.latin\nu0_a28        2001  1727 1548464 123584 0                   0 S com.android.systemui\nwebview_zygote 2036 1727 1364844  50732 0                   0 S webview_zygote\nradio         2132  1727 1485896 100344 0                   0 S com.android.phone\nwifi          2193     1   15516   3884 0                   0 S wpa_supplicant\nu0_a34        2204  1727 1441780  77336 0                   0 S com.google.android.ext.services\nu0_a8         2291  1727 1574496 159688 0                   0 S com.google.android.gms.persistent\nu0_a35        2321  1727 1463292  96196 0                   0 S com.google.android.dialer\nu0_a8         2418  1727 1696672 169976 0                   0 S com.google.android.gms\nshell         2444     1   19152   1972 0                   0 S adbd\nmdnsr         2450     1    2612    424 0                   0 S mdnsd\nu0_a8         2454  1727 1452224  80704 0                   0 S com.google.process.gservices\nu0_a37        2470  1727 1514312  82392 0                   0 S com.google.android.googlequicksearchbox:interactor\nsecure_element 2482 1727 1433712  69064 0                   0 S com.android.se\nu0_a45        2542  1727 1431364  67512 0                   0 S com.android.smspush\nu0_a40        2569  1727 1530312 116020 0                   0 S com.google.android.apps.nexuslauncher\nu0_a37        2585  1727 1651508 165996 0                   0 R com.google.android.googlequicksearchbox:search\nu0_a78        2618  1727 1480968  86540 0                   0 S com.google.android.apps.photos\nu0_a8         2705  1727 1442192  78892 0                   0 S com.google.process.gapps\nu0_a36        2896  1727 1434824  77272 0                   0 S com.android.providers.calendar\nu0_a32        3007  1727 1567268 129208 0                   0 S com.android.vending\nu0_a55        3208  1727 1467416  85616 0                   0 S com.google.android.calendar\nu0_a84        3278  1727 1478444  87372 0                   0 S com.google.android.gm\nroot          3427     2       0      0 0                   0 S [kworker/1:2]\nroot          3480     2       0      0 0                   0 S [kworker/2:2]\nu0_a59        3481  1727 1647892 110728 0                   0 S com.google.android.youtube\nu0_a8         3626  1727 1520568 123552 0                   0 S com.google.android.gms.unstable\nu0_a66        3936  1727 1471000  83488 0                   0 S com.google.android.apps.messaging:rcs\nu0_a66        3962  1727 1486828  98012 0                   0 S com.google.android.apps.messaging\nu0_a49        4013  1727 1445992  72968 0                   0 S com.android.chrome:webview_service\nu0_a32        4075  1727 1465396  89240 0                   0 S com.android.vending:download_service\nsystem        4255  1727 1432212  69624 0                   0 S com.android.keychain\nu0_a19        4334  1727 1452652  88520 0                   0 S com.google.android.setupwizard\nu0_a8         4388  1727 1493280 116056 0                   0 S com.google.android.gms.ui\nu0_a83        4474  1727 1481248  97980 0                   0 S com.google.android.videos\nu0_a32        4563  1727 1482848 101500 0                   0 S com.android.vending:instant_app_installer\nu0_a86        4670  1727 1432236  70076 0                   0 R org.nativescript.testvue\nshell         4675  2444    7632   2892 0            ef957b39 R ps\n',
    stderr: '',
    exitCode: 0 }
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "logcat" "--pid=4670"
    spawn: /home/nathanael/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "forward" "--list"
    Result when throw error is false:
    { stdout:
    'emulator-5554 tcp:33735 localabstract:org.nativescript.testvue-livesync\n\n',
    stderr: '',
    exitCode: 0 }
    JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
    JS: 'NativeScript-Vue has "Vue.config.silent" set to true, to see output logs set it to false.'
    JS: HMR: Checking for updates to the bundle with hmr hash d7b9c066afdc40f46b81.
    Found hmr status. { status: null, hash: 'd7b9c066afdc40f46b81' }
    JS: HMR: The following modules were updated:
    JS: HMR:          ↻ ../node_modules/nativescript-dev-webpack/style-hot-loader.js!../node_modules/nativescript-dev-webpack/apply-css-loader.js!../node_modules/css-loader/dist/cjs.js?!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/sass-loader/lib/loader.js!../node_modules/vue-loader/lib/index.js?!./components/Home.vue?vue&type=style&index=0&id=67410f3a&scoped=true&lang=scss&
    JS: HMR: Successfully applied update with hmr hash d7b9c066afdc40f46b81. App is up to date.
    Found hmr status. { status: 2, hash: 'd7b9c066afdc40f46b81' }
    Handle socket connection for app identifier: org.nativescript.testvue with protocol version: 0.2.0.
    Will emit event runOnDeviceExecuted with data { projectDir: '/home/nathanael/projects/NativeScript/testvue',
    deviceIdentifier: 'emulator-5554',
    applicationIdentifier: 'org.nativescript.testvue',
    syncedFiles:
    [ '/home/nathanael/projects/NativeScript/testvue/platforms/android/app/src/main/assets/app/bundle.js' ],
    isFullSync: false }
    Successfully synced application org.nativescript.testvue on device emulator-5554.
    Successfully executed watch action without any preparation of files.
NathanaelA commented 4 years ago

Third Test (Upgraded to @next): nativescript-dev-webpack@1.4.0-next-2019-11-10-212313-01 The first change took, the second change took, the third & forth change did the same thing as above where the app reboots but the color from the last success (i.e. the second change) is what the color is...

DimitarTachev commented 4 years ago

@NathanaelA,

Sorry for the late reply and thanks for the provided logs!

We had a few similar issues in our 6.2 release and that's the main CLI-related improvement in 6.3. The problem was that we were not uploading all files during app restart which leads to an invalid app state with permanent old content (runtime.js which contains the HMR hash was not properly updated).

All of the issues were fixed in the 6.3 release and I suggest you try updating nativescript-dev-webpack, nativescript and your webpack.config.js to our rc versions. The official 6.3 release is planned for this weeks if we don't find any critical issue.

If you have a similar issue with the 6.3 versions, please attach the new log traces in order to allow us to investigate it further.