Uploaded image for project: 'Appcelerator Studio'
  1. Appcelerator Studio
  2. TISTUD-5225

Liveview: iOS: Second launch of LV enabled project in iOS simulator fails


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: LiveView
    • Labels:
    • Environment:

      Mac OS 10.8.4
      Xcode 4.6.2
      CLI: 3.1.2-alpha
      Alloy: 1.2.0-alpha6
      Appcelerator Studio, build:
      Titanium SDK version 3.1.2.v20130807171139

    • Story Points:
    • Sprint:
      2013 Sprint 16



      When launching a Liveview enabled simulator session, it works as expected. When you attempt to rebuild the project again, the simulator fails to launch and this error presented:

      [INFO] :   Finished building the application in 1s 97ms
      [LiveView] Closing file/event server process id: 34204
      [INFO] :   Running application in iOS Simulator
      [LiveView] version 0.1.32
      [LiveView] File Server Started on Port 8324
      [LiveView] Event Server Started on Port 8323
      [INFO] :   Launching application in iOS Simulator
      [INFO] :   Focusing the iOS Simulator
      [ERROR] :  Failed to focus the iPhone Simulator window
      [ERROR] :  /Users/emerriman/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130807171139/iphone/iphone_sim_activate.scpt: execution error: iPhone Simulator got an error: Connection is invalid. (-609)
      [INFO] :   Application has exited from iOS Simulator
      [INFO] :   Project built successfully in 3s 58ms

      This occurs with both the iPad and iPhone simulators. The order of the console output may vary slightly.

      Also note that the behavior prevents the user from turning off LV and then launching on the first attempt. The first launch with LV off after encountering this error will fail with the same console output. The second launch with LV off seems to work fine. This may be a clue as to root cause.

      Steps to reproduce:

      1) Create a default classic project in Studio
      2) Enable Liveview and launch in the simulator
      3) Make some edits if you wish
      4) Relaunch the simulator - leaving liveview enabled


      Project fails to launch correctly in the simulator. Turning off LV and launching will also fail, but will work on the next and subsequent launches with LV off.

      Expected Result:

      Project launches as expected and allows real-time editing


      I monitored the processes here, and it may be expected but subsequent launches of Liveview were killing the existing node PID and launching a new one.

      Process list:
      Normal non-LV launch:

      39786   1.6  0.8  3104976  67028   ??  S     3:07PM   0:02.09 node /usr/local/bin/titanium --no-colors --no-prompt build --platform ipad --sdk 3.1.2.v20130807171139 --log-level trace --target simulator --ios-version 6.1 --device-family ipad --skip-js-minify

      Normal LV enabled launch

      39891   1.5  0.2  3063424  19808   ??  Ss    3:08PM   0:13.73 /usr/local/bin/node /Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1375925433/node_modules/liveview/bin/liveview-server start --project-dir /Users/emerriman/Documents/anewworkspace/Yuntastic --platform ios --no-colors
      39873   1.8  1.1  3120336  96244   ??  S     3:08PM   0:16.16 node /usr/local/bin/titanium --no-colors --no-prompt build --platform ipad --sdk 3.1.2.v20130807171139 --log-level trace --target simulator --ios-version 6.1 --device-family ipad --skip-js-minify --liveview --deploy-type development

      Failed LV enabled launch:

      39978   1.6  0.2  3053660  17976   ??  Ss    3:24PM   0:00.29 /usr/local/bin/node /Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1375925433/node_modules/liveview/bin/liveview-server start --project-dir /Users/emerriman/Documents/anewworkspace/Yuntastic --platform ios --no-colors
      39959   0.0  0.7  3102660  58440   ??  S     3:24PM   0:02.03 node /usr/local/bin/titanium --no-colors --no-prompt build --platform ipad --sdk 3.1.2.v20130807171139 --log-level trace --target simulator --ios-version 6.1 --device-family ipad --skip-js-minify --liveview --deploy-type development

      First launch non LV failure:
      No processes

      Second launch non LV:

      40678   2.5  0.7  3102660  58916   ??  S     3:26PM   0:01.99 node /usr/local/bin/titanium --no-colors --no-prompt build --platform ipad --sdk 3.1.2.v20130807171139 --log-level trace --target simulator --ios-version 6.1 --device-family ipad --skip-js-minify


          Issue Links



              • Assignee:
                mxia Michael Xia
                emerriman Eric Merriman
              • Watchers:
                3 Start watching this issue


                • Created: