Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18600] LiveView: Building to an Android emulator fails with [LiveView] File Server unavailable. Host Unreachable

GitHub Issuen/a
TypeBug
PriorityHigh
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.5.1
Fix Version/sn/a
ComponentsAndroid, LiveView
Labelscb-tooling, engTriage, qe-3.5.1
ReporterEwan Harris
AssigneeUnknown
Created2015-02-20T21:38:13.000+0000
Updated2020-01-08T19:03:45.000+0000

Description

Description

When attempting to build to an Android emulator the build fails with.
 [ERROR] :  TiExceptionHandler: (main) [9499,9499] ----- Titanium Javascript Runtime Error -----
    [ERROR] :  TiExceptionHandler: (main) [1,9500] - In app.js:567,13
    [ERROR] :  TiExceptionHandler: (main) [1,9501] - Message: Uncaught Error: [LiveView] File Server unavailable. Host Unreachable @ 172.16.0.216:8324
    [ERROR] :  TiExceptionHandler: [LiveView] Please ensure your device and computer are on the same network and the port is not blocked.
I *do not believe this is a regression* as it has been reported in previous versions of LiveView To workaround just disable LiveView and the build will be fine Building to device with LiveView works fine and I am able to make changes with no errors Checking the log output shows that the LiveView server has started
[LiveView] version 1.0.7
[LiveView] File Server Started on Port 8324
[LiveView] Alloy project monitor started
[LiveView] Event Server Started on Port 8323
This issue is not reliant on a node version, it occurs in node 0.12 as well as 0.10.32

Steps To Reproduce

1. Build to an Android emulator from Studio with LiveView enabled

Actual Result

The build fails with the error above

Expected Result

The build should not fail and LiveView should be working as expected

Comments

  1. Praveen Innamuri 2015-02-21

    When I tried to reproduce on my machine, the app launches successfully with liveview on Android emulator (with 5.0.1). The issue seems to happen only on Android AVD with v4.4
  2. Praveen Innamuri 2015-02-24

    I am unable to reproduce the app/simulator crash when I attempt to run app with liveview enabled on Android 5.x and 4.4 emulator.
  3. Praveen Innamuri 2015-02-24

    This turns out to be happening randomly even on the previous Titanium stable release with Node 0.10.x.
  4. Ingo Muschenetz 2015-06-18

    What's the latest thoughts on this?
  5. Ingo Muschenetz 2015-06-18

    We are going to defer this in favor of working on refactoring the debugger to work with the built-in JS Core.
  6. Fokke Zandbergen 2015-07-03

    This is not just Android. I can reproduce this with: * Mac OS X 10.10.4 * NodeJS v0.12.0, v0.12.6 * iOS Simulator 8.4, XCode 6.4 * SDK 4.1.0.v20150701131146 It works when I switch back to NodeJS v0.10.39 so it seems like its related to NodeJS?
  7. Michael Kellogg 2016-02-29

    Hello Everyone! This issue is still open? I was looking online for a solution to this issue and found an interesting consistency. It seems that on all of my Android 6.0 SDK emulators the liveview functionality doesn't work, BUT when I tried liveview with android 5.0.1 sdk emulators it worked. Please let me know if you guys can replicate this behavior. Here is some sytem info from my end: Host OS: Mac OS X OS Version: 10.10.5 OS Arch: x86_64 JRE Version: 1.8.0_72 Appcelerator Studio Version: 4.5.0.201602170821 XCode Version: 7.2.1 Android SDK: I have both 6.0 and 5.0.1 Node.JS Version: v4.3.1 [LiveView] version 1.0.9 also not sure if this matters, but I made some minor changes as specified in this link and wanted to make sure you could keep that in mind: http://www.jasonified.com/post/62705976173/fix-for-appcelerator-platform-liveview-connection
  8. Chee Kiat Ng 2016-03-02

    [~mkellogg91@gmail.com] Thanks for the feedback. That's an interesting find, I'll get someone to take a look at it. We haven't addressed, or actually updated this ticket because we haven't been seeing this issue in the latest versions.
  9. Ashraf Abu 2016-03-02

    Tried this with Android 6.0 on a Nexus 6 with 5.2.0.GA with an Alloy application. Using Mac OS X. No issues for me. (If it matters, my node is v0.10.37)
  10. Ingo Muschenetz 2016-03-02

    I didn't think we still officially supported Node 0.10.73. I thought we mandated 0.12.X and above?
  11. Ashraf Abu 2016-03-02

    Will get my Node updated and check to see if this occurs.
  12. Ashraf Abu 2016-03-02

    Updated node. Tried this with:- Node.js Node.js Version = 0.12.10 npm Version = 2.14.9 Titanium CLI CLI Version = 5.0.6 Titanium SDK SDK Version = 5.2.0.GA No issues. Works correctly.
  13. Michael Kellogg 2016-03-02

    I was using one of the Nodejs LTS installations hence the nodejs version: 4.3.1 I'm not sure if this would change my experience, but my suspicion is that it would. I've since gone out and installed nodejs 0.12.10 since I saw that others were using that instead. Also, since writing my previous post I am using Genymotion for Android emulators and they only support up to android build 22 (sdk 6.0 is build 23 and build 23 was what I was previously having trouble with). At any rate I have my liveview working now.
  14. Simon Buckingham 2020-01-02

    This is still a problem. There is more than 1 ticket for this problem so not sure which one is the most up to date. It mainly happens when switching between using LiveView on the iOS simulator and then trying Android in Genymotion (or vice-versa as iOS can stop working too). Try Android using Genymotion and get: [ERROR] TiExceptionHandler: Error: [LiveView] File Server unavailable. Host Unreachable @ 192.168.0.12:8324 [ERROR] TiExceptionHandler: [LiveView] Please ensure your device and computer are on the same network and the port is not blocked. I have tried: - resetting and closing the iOS simulator (which sometimes seems to work, but can't see any pattern) - $ killall node - Restarting Genymotion - Running the Android project for the first time without the --liveview flag - Quitting the terminal PS Using Ti SDK 8.3.0 PPS If I start afresh in the morning after a computer startup it seems to work on the first platform that I test on eg Android or iOS. So there is obviously something that has to be reset for this to work. Is this a node problem? I have node version 8.16.2

JSON Source