Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27602] [Windows - Android] Liveview crashes application and throws error before reloading

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-11-18T18:17:54.000+0000
Affected Version/sRelease 8.3.0
Fix Version/sRelease 8.3.0
ComponentsAndroid
LabelsengSchedule
ReporterSamir Mohammed
AssigneeGary Mathews
Created2019-11-14T18:50:59.000+0000
Updated2019-11-18T18:17:54.000+0000

Description

When using Liveview and saving a JS file the following error can be seen in Studio (Alloy App):
[LiveView] Client disconnected
[INFO] :   [LiveView] Reloading App
[WARN] :   TiApplication: (main) [4696,12084] Registering module with name already in use.
[WARN] :   TiApplication: (main) [1,12085] Registering module with name already in use.
[ERROR] :  TiAssetHelper: Error while reading asset "Resources/ti.main.js":
[ERROR] :  TiAssetHelper: java.io.FileNotFoundException: Resources/ti.main.js
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.openAsset(Native Method)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:374)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:348)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.util.KrollAssetHelper.readAssetBytes(KrollAssetHelper.java:182)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiApplication.softRestart(TiApplication.java:823)
[ERROR] :  TiAssetHelper: 	at ti.modules.titanium.app.AppModule$1.run(AppModule.java:227)
[ERROR] :  TiAssetHelper: 	at android.os.Handler.handleCallback(Handler.java:790)
[ERROR] :  TiAssetHelper: 	at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] :  TiAssetHelper: 	at android.os.Looper.loop(Looper.java:164)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
[ERROR] :  TiAssetHelper: 	at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiAssetHelper: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
[ERROR] :  TiAssetHelper: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
[ERROR] :  TiAssetHelper: Error while reading asset "Resources/ti.main.js":
[ERROR] :  TiAssetHelper: java.io.FileNotFoundException: Resources/ti.main.js
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.openAsset(Native Method)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:374)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:348)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.util.KrollAssetHelper.readAssetBytes(KrollAssetHelper.java:182)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModuleBytes(Native Method)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModuleBytes(V8Runtime.java:162)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiApplication.softRestart(TiApplication.java:823)
[ERROR] :  TiAssetHelper: 	at ti.modules.titanium.app.AppModule$1.run(AppModule.java:227)
[ERROR] :  TiAssetHelper: 	at android.os.Handler.handleCallback(Handler.java:790)
[ERROR] :  TiAssetHelper: 	at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] :  TiAssetHelper: 	at android.os.Looper.loop(Looper.java:164)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
[ERROR] :  TiAssetHelper: 	at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiAssetHelper: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
[ERROR] :  TiAssetHelper: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
[ERROR] :  v8:
[ERROR] :  v8:
[ERROR] :  v8: #
[ERROR] :  v8: # Fatal error in , line 0
[ERROR] :  v8: #
[ERROR] :  v8: unreachable code
[ERROR] :  v8:
[ERROR] :  v8: #
[ERROR] :  v8: #
[ERROR] :  v8: #
[ERROR] :  v8: #FailureMessage Object: 0xbf9fa090
[INFO] :   v8: # 00x8b4a1685
[INFO] :   v8: # 10x8b49832a
[INFO] :   v8: # 20x8ba3786b
[INFO] :   v8: # 30x8ba3752b
[INFO] :   v8: # 40x8ba217cd
[INFO] :   v8: # 50x8b597af3
[INFO] :   v8: # 60x8b599233
[INFO] :   v8: # 70x8b4b9bdc
[INFO] :   v8: # 80x8b4ba203
[INFO] :   v8: # 90x8b4bb7d0
[INFO] :   v8: #100x8b27c3bb
[INFO] :   v8: #110x8b27ad23
[INFO] :   v8: #120x8b53d0c6
[INFO] :   v8: #130x8b53c6e5
[INFO] :   v8: #140x8b53bac8
[INFO] :   v8: #150x8b53b7a0
[INFO] :   v8: #160x8aa82323
[INFO] :   v8:
*Test Steps*

Open APPC studio

Create an Alloy application

Enable liveview

Run application (Device or Sim)

Open the index.xml

Change the Hello world text to something else.

*Actual Result* Above error is seen. *Expected Result* Live view should reload the app and changes made in .js file should be present.

Comments

  1. Ewan Harris 2019-11-14

    Running with DEBUG="liveview:*" there doesn't look to be a request making it to the liveview server so I don't think this is a liveview thing but maybe something with the android runtime lifecycle/Ti.App._restart() function cc [~gmathews]
  2. Gary Mathews 2019-11-14

    8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11338
  3. Samir Mohammed 2019-11-15

    FR passed for 8_3_X, waiting on Jenkins. [~gmathews]. Will this need to be fixed on Master as well?
  4. Christopher Williams 2019-11-15

    Merged to 8_3_X, cherry-picked to master.
  5. Samir Mohammed 2019-11-18

    *Closing ticket*. Fix verified in SDK versions 8.3.0.v20191115162504 and 9.0.0.v20191117201259 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11338

JSON Source