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
The workaround is to terminate the previous launch from the Console view before launching the new app with LiveView.
[~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
[~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
Merged the PR and included in Appcelerator Studio 3.2.3/3.3.0.
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.
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