Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13801] LiveView: iOS and Android: Server not found on launch

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-05-18T03:24:01.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 10 JS, 2013 Sprint 10, Release 3.1.2, Release 3.2.0
ComponentsLiveView
Labelsqe-3.1.1, qe-testadded
ReporterEric Merriman
AssigneeChristian Sullivan
Created2013-05-09T18:14:45.000+0000
Updated2014-02-24T23:54:05.000+0000

Description

Description:

I attempted to start an iOS simulator session with liveview and the app sits on the splash and the following is returned in the console for iOS:
[ERROR] :  [LiveView] Event Sever unavailable. Connection Refused
[ERROR] :  [LiveView] Event Sever unavailable. Connection Refused
For Android I get a runtime error, see attachment. The same behavior occurs with CLI and Studio.

Steps to reproduce:

1) Create a new project with services enabled 2) Launch a liveview session in simulator or emulator via CLI or Studio

Result:

Runtime error if android iOS hang on splash - errors in console

Expected Result:

The simulator/emulator launches, and liveview functions

Attachments

FileDateSize
Screen Shot 2013-05-09 at 11.08.49 AM.png2013-05-09T18:14:45.000+0000206753
Screen Shot 2013-05-09 at 11.09.14 AM.png2013-05-09T18:14:45.000+0000294490

Comments

  1. Christian Sullivan 2013-05-09

    This is an issue with Studio. The problem is the bin/liveview-server file has the incorrect permissions.
  2. Eric Merriman 2013-05-09

    Here is the list of permissions from bin up. Which one looks bad? Contents of my bin: -rwxr-xr-x 1 emerriman admin 2149 May 8 16:49 liveview -rwxr-xr-x 1 emerriman admin 562 May 3 10:02 liveview-help -rwxr-xr-x 1 emerriman admin 1305 May 3 10:02 liveview-install -rwxr-xr-x 1 emerriman admin 1065 May 3 10:02 liveview-rm -rwxr-xr-x 1 emerriman admin 1550 May 3 10:02 liveview-run -rwxr-xr-x 1 emerriman admin 1274 May 8 16:49 liveview-server My bin folder: drwxr-xr-x 8 emerriman admin 272 May 9 09:15 bin My liveview folder: drwxr-xr-x 13 emerriman admin 442 May 9 09:15 liveview Node module: drwxr-xr-x 4 emerriman admin 136 May 9 09:15 node_modules The plugin: drwxr-xr-x 7 emerriman admin 238 May 9 09:15 com.appcelerator.titanium.liveview.core_1.0.0.1368080563 The plugin folder: drwxr-xr-x@ 322 emerriman admin 10948 May 9 09:15 plugins And the application folder: drwxr-xr-x@ 17 emerriman admin 578 May 9 09:17 Appcelerator Studio
  3. Christian Sullivan 2013-05-09

    what do you get for ti config
  4. Eric Merriman 2013-05-09

    This works as well: /Applications/Appcelerator\ Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368080563/node_modules/liveview/bin/liveview-server status
  5. Eric Merriman 2013-05-09

    emerrimanMBP:~ emerriman$ ti config android.ndkPath = "/Users/emerriman/android-ndk-r8d" android.sdkPath = "/Users/emerriman/Android_SDK" app.sdk = "3.1.1.v20130509083909" app.workspace = "~/Documents/workspace/" cli.colors = true cli.completion = false cli.failOnWrongSDK = false cli.logLevel = "trace" cli.prompt = true cli.quiet = false paths.commands = [] paths.hooks = ["/Applications/Appcelerator Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368080563/node_modules/liveview/hook"] paths.modules = [] paths.plugins = [] user.email = "emerriman@appcelerator.com" user.locale = "en" user.name = "Eric Merriman" emerrimanMBP:~ emerriman$
  6. Christian Sullivan 2013-05-10

    This is caused by spaces not being escaped in the bin path Resolved in 0.1.6 https://github.com/appcelerator/liveview/tree/0.1.16
  7. Ingo Muschenetz 2013-05-11

    I'm still getting this in 0.1.16:
       [LiveView] Server is already running
       -- Start simulator log -------------------------------------------------------
       [INFO] :   Application started
       [INFO] :   TestLVAlloy/1.0 (3.1.1.v20130509173053.ea47c2a)
       [ERROR] :  [LiveView] Event Server unavailable. Connection Refused
       [ERROR] :  [LiveView] Event Server unavailable. Connection Refused
       [ERROR] :  Terminating in response to SpringBoard's termination.
       -- End simulator log ---------------------------------------------------------
       [INFO] :   Application has exited from iOS Simulator
       [INFO] :   Project built successfully in 48s 594ms
       
    Note that I just restarted Studio, so there shouldn't be anything running. I also don't see any node processes. Is this an errant .pid file?
  8. Christian Sullivan 2013-05-11

    Resolved in 0.1.17 https://github.com/appcelerator/liveview/tree/0.1.17
  9. Ingo Muschenetz 2013-05-12

    This is actually now broken for me again. If I run 0.1.17, I get:
       [DEBUG] Terminating all iOS simulators
       [DEBUG] Removing old log file: /Users/ingo/Library/Application Support/iPhone Simulator/6.1/Applications/813047AD-4E93-4952-BA30-BDF782565ED9/Documents/a38800e6-a563-40d3-b5eb-b391f85bb73a.log
       
       module.js:340
       throw err;
       ^
       Error: Cannot find module '/Applications/Appcelerator\ Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368309321/node_modules/liveview/bin/liveview-server'
       at Function.Module._resolveFilename (module.js:338:15)
       at Function.Module._load (module.js:280:25)
       at Module.runMain (module.js:492:10)
       at process.startup.processNextTick.process._tickCallback (node.js:245:9)
       [INFO] Launching application in iOS Simulator
       [TRACE] Simulator environment: DYLD_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks:/Applications/Xcode.app/Contents/OtherFrameworks
       [DEBUG] Simulator command: "/Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/3.1.1.v20130509173053/iphone/ios-sim" launch "/Users/ingo/Documents/Appcelerator_Studio_Workspace/TestLV1/build/iphone/build/Debug-iphonesimulator/TestLV1.app" --sdk 6.1 --family iphone
       [INFO] Focusing the iOS Simulator
       [DEBUG] Found iPhone Simulator log file: /Users/ingo/Library/Application Support/iPhone Simulator/6.1/Applications/813047AD-4E93
       
    If I instead revert back to 0.1.16, it works, though I am able to get myself into a situation where it comes back again.
  10. Ingo Muschenetz 2013-05-12

    Sometimes it's a bad PID file. Suggest writing out console.log(FServer.pids()) as part of debug messaging for around line 147 of fserver.js Deleting the .pid file allowed me to recontinue.
  11. Christian Sullivan 2013-05-12

  12. Christian Sullivan 2013-05-12

    To ensure a fresh install execute liveview-server stop from the bin folder of the node_modules/liveview to make sure all the pids are cleared before testing a new version.
  13. Ingo Muschenetz 2013-05-12

  14. Ingo Muschenetz 2013-05-13

    FWIW, moving Appcelerator Studio to a location where the hook had no spaces in the path worked for me:
        Ingos-MacBook-Pro:com.appcelerator.titanium.liveview.core_1.0.0.1368309321 ingo$ ti config
        app.sdk             = "latest"
        app.workspace       = ""
        cli.colors          = true
        cli.completion      = false
        cli.failOnWrongSDK  = false
        cli.httpProxyServer = ""
        cli.logLevel        = "trace"
        cli.prompt          = true
        cli.quiet           = false
        paths.commands      = []
        paths.hooks         = ["/Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368309321/node_modules/liveview/hook"]
        paths.modules       = []
        paths.plugins       = []
        paths.sdks          = []
        
  15. Dustin Hyde 2013-05-16

    I don't have any spaces in the hook path. This was working yesterday when LiveView Version: 0.1.20 was up. This is not working anymore. LiveView Version: 0.1.21 Titanium SDK: 3.1.1.v20130509140103 Android Emulator: Google APIs 2.3.3
        DHydeMBP:~ dhyde$ ti config paths.hooks
        /Applications/Appcelerator/Appcelerator_Studio_3.1.1/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368654722/node_modules/liveview/hook
        
  16. Christian Sullivan 2013-05-16

    Try running /Applications/Appcelerator/Appcelerator_Studio_3.1.1/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368654722/node_modules/liveview server stop then test again just to ensure all old pids have been cleared.
  17. Dustin Hyde 2013-05-16

    I ran:
        /Applications/Appcelerator/Appcelerator_Studio_3.1.1/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368654722/node_modules/liveview/bin/liveview server stop
        
    and now it works.
  18. Ingo Muschenetz 2013-05-17

    I believe the fix for this was for LiveView to call 'liveview-server stop' to clear all PIDs when starting a new session.
  19. Michael Xia 2013-08-14

    Able to run app with LiveView on iOS simulator and Android emulator on Appcelerator Studio, build: 3.1.2.201308091728, OSX 10.8.3. Consider verified and closing.

JSON Source