Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16387] LiveView: unexpected behavior when running LiveView on device without terminating the existing launch

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-02-15T00:08:19.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 03, 2014 Sprint 03 Tooling, Release 3.2.3, Release 3.3.0
ComponentsLiveView
Labelsliveview, qe-3.2.1, qe-closed-3.2.3, qe-testadded
ReporterSamuel Dowse
AssigneeChristian Sullivan
Created2014-02-06T00:43:35.000+0000
Updated2014-03-13T21:23:51.000+0000

Description

Description

If I build an Android project to device from Studio with LiveView enabled then everything works fine. Code changes are acknowledged and the device updates accordingly. However if I was to switch to another project without disabling LiveView the new project will not work as expected. Either I get an error in the console, or the previous application will install again in place of the new project. On top of this a new node process is created without killing the previous node process. Because that process is still running I get the following error information in the console:
[LiveView] version 1.0.2
[LiveView] {[Error: listen EADDRINUSE] code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen' }
[LiveView] File Server Started on Port 8324
Address in use, retrying...
[LiveView] [Error: Not running]

Steps To Reproduce

1. Create an alloy project 2. Enable LiveView and run on device 3. Create a classic project 4. With LiveView still enabled, run the classic application on device

Expected Result

The classic app should be running on the phone

Actual Result

Either I get the above error, or the alloy project continues to display on the phone. +Extra Information+ This happens on both Android and iOS on both Windows and Mac. +Even More Information!+ *Windows 8.1 32bit* 1) Appcelerator Studio 3.2.0 Node processes are +not+ killed 2) Appcelerator Studio 3.2.1 Node processes are +not+ killed *Mac OSX 10.9.1* 1) Appcelerator Studio 3.2.0 Node processes are killed 2) Appcelerator Studio 3.2.1 Node processes are +not+ killed

Comments

  1. Michael Xia 2014-02-06

    The workaround is to terminate the previous launch from the Console view before launching the new app with LiveView.
  2. Christian Sullivan 2014-02-06

    [~mxia] I think this may be something to do with studio. I am so far unable to reproduce via cli on OS X 10.9.1
  3. Christian Sullivan 2014-02-06

    [~mxia] I was unable to reproduce the error via cli, so please test the pr below to see if this resolves the issue. PR [MASTER] https://github.com/appcelerator/liveview/pull/76
  4. Michael Xia 2014-02-15

    Merged the PR and included in Appcelerator Studio 3.2.3/3.3.0.
  5. Olga Romero 2014-03-13

    Tested and verified the fix with Appcelerator Studio, build: 3.2.2.201403061827 Titanium SDK, build: 3.2.3.v20140312170355 CLI 3.2.1 LiveView Version: 1.0.3 Device: Nexus4 Android version 4.4 Switching apps with live view enabled from Alloy to Classic project does not return the error, reported in original description.
       [LiveView] version 1.0.3
       [LiveView] File Server Started on Port 8324
       [LiveView] Event Server Started on Port 8323
       [LiveView] Client connected
       
  6. Olga Romero 2014-03-13

    To add to the previous comment Mac osx 10.9.2 Mavericks Node.JS Version: v0.10.13 NPM Version: 1.3.2 /usr/local/lib ├── acs@1.0.14 ├── alloy@1.3.1 ├── npm@1.3.2 ├── titanium@3.2.1 └── titanium-code-processor@1.1.0

JSON Source