Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13718] Android: FastDev doesn't work with x86 Android Emulator.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-06-04T14:25:49.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsregression
ReporterJong Eun Lee
AssigneeIngo Muschenetz
Created2013-04-18T11:54:15.000+0000
Updated2014-06-19T12:44:38.000+0000

Description

When I run titanium mobile project on Titanium Studio with Android x86 emulator, I got:
"[WARN] Fastdev enabled, but server isn't running, deploying normally" message and Fastdev doesn't work.
I also got the following message:
"[INFO] [2013-04-18 20:36:01,292] Serving up files for org.cckorea.cc10musician at 0.0.0.0:54923 from /Users/yomybaby/Documents/TiWorkspace/CC10Music"
I followed Android x86 emulator setting which your blog mentioned. (http://developer.appcelerator.com/blog/2013/04/configuring-appcelerator-titanium-to-use-intel-x86-images.html) If choose arm emulator in Ti SDK 3.1.0GA, Fastdev doesn't work too! If choose arm emulator in Ti SDK 3.0.2GA, Fastdev works properly.

Comments

  1. Conny Brunnkvist 2013-04-23

    Fastdev doesn't seem to work neither under x86 or arm after upgrading to Titanium Studio 3.1.0.201304151600 (project on SDK 3.0.0.GA). The process blows up immediately on launch. It was working, and I used it all the time, in the prior Titanium Studio version (3.0.x). LogCat snippet:
       04-23 09:45:15.625: D/TiAssetHelper(4197): Fetching "app.js" with Fastdev...
       04-23 09:45:15.625: D/AndroidRuntime(4197): Shutting down VM
       04-23 09:45:15.625: W/dalvikvm(4197): threadid=1: thread exiting with uncaught exception (group=0xb3ce1908)
       04-23 09:45:15.625: E/TiApplication(4197): (main) [74,212] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{my.mobile.app/my.mobile.app.MyMobileAppActivity}: android.os.NetworkOnMainThreadException; Titanium 3.0.0,2012/12/12 18:49,a5894b3
       04-23 09:45:15.625: E/TiApplication(4197): java.lang.RuntimeException: Unable to start activity ComponentInfo{my.mobile.app/my.mobile.app.MyMobileAppActivity}: android.os.NetworkOnMainThreadException
       
  2. Conny Brunnkvist 2013-04-23

    (additional stack trace)
       04-23 09:45:15.625: E/TiApplication(4197): Caused by: android.os.NetworkOnMainThreadException
       04-23 09:45:15.625: E/TiApplication(4197): 	at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
       04-23 09:45:15.625: E/TiApplication(4197): 	at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)
       04-23 09:45:15.625: E/TiApplication(4197): 	at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
       04-23 09:45:15.625: E/TiApplication(4197): 	at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
       04-23 09:45:15.625: E/TiApplication(4197): 	at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
       04-23 09:45:15.625: E/TiApplication(4197): 	at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.kroll.common.TiFastDev$Session.blockRead(TiFastDev.java:310)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.kroll.common.TiFastDev$Session.readInt(TiFastDev.java:349)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.kroll.common.TiFastDev$Session.readTokenCount(TiFastDev.java:412)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.kroll.common.TiFastDev.openInputStream(TiFastDev.java:214)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:53)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:104)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:152)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:109)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:505)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:145)
       04-23 09:45:15.625: E/TiApplication(4197): 	at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)
       04-23 09:45:15.625: E/TiApplication(4197): 	at android.app.Activity.performCreate(Activity.java:5104)
       04-23 09:45:15.625: E/TiApplication(4197): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
       04-23 09:45:15.625: E/TiApplication(4197): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
       04-23 09:45:15.625: E/TiApplication(4197): 	... 11 more
       04-23 09:45:15.655: E/AndroidRuntime(4197): FATAL EXCEPTION: main
       04-23 09:45:15.655: E/AndroidRuntime(4197): java.lang.RuntimeException: Unable to start activity ComponentInfo{my.mobile.app/my.mobile.app.MyMobileAppActivity}: android.os.NetworkOnMainThreadException
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.ActivityThread.access$600(ActivityThread.java:141)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.os.Handler.dispatchMessage(Handler.java:99)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.os.Looper.loop(Looper.java:137)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.ActivityThread.main(ActivityThread.java:5039)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at java.lang.reflect.Method.invokeNative(Native Method)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at java.lang.reflect.Method.invoke(Method.java:511)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at dalvik.system.NativeStart.main(Native Method)
       04-23 09:45:15.655: E/AndroidRuntime(4197): Caused by: android.os.NetworkOnMainThreadException
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.kroll.common.TiFastDev$Session.blockRead(TiFastDev.java:310)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.kroll.common.TiFastDev$Session.readInt(TiFastDev.java:349)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.kroll.common.TiFastDev$Session.readTokenCount(TiFastDev.java:412)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.kroll.common.TiFastDev.openInputStream(TiFastDev.java:214)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:53)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:104)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:152)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:109)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:505)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:145)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.Activity.performCreate(Activity.java:5104)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
       04-23 09:45:15.655: E/AndroidRuntime(4197): 	... 11 more
       
  3. Allen Yeung 2013-05-23

    I was not able to reproduce this on 3.1.0.GA and the latest master (3.2.0). I launched the x86 emulator, and relaunched with fastdev. I didn't get any errors, and the files updated correctly.
  4. Ingo Muschenetz 2013-05-23

    We are unable to reproduce this issue. Please reopen if it's still an issue.
  5. Chris Lang 2013-06-02

    I am seeing this issue Ti 3.1 GA. Emulator 4.0.3 (x86) - Works fine Emulator 4.1.2 and above (x86) fails.
  6. Ingo Muschenetz 2013-06-03

    Reopening due to some new info.
  7. Hieu Pham 2013-06-04

    Tested it with 4.0.3.x86 4.1.2.x86 and 4.2.2.x86. Cannot reproduce the mentioned crash. It seems to work fine. Can you post your test case?
  8. Chris Lang 2013-06-04

    I tried on a new project and it is working as expected - okay to close again, sorry!
  9. Ingo Muschenetz 2013-06-04

    Re-closing based on customer feedback.

JSON Source