[TIMOB-13801] LiveView: iOS and Android: Server not found on launch
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-05-18T03:24:01.000+0000 |
Affected Version/s | Release 3.1.1 |
Fix Version/s | 2013 Sprint 10 JS, 2013 Sprint 10, Release 3.1.2, Release 3.2.0 |
Components | LiveView |
Labels | qe-3.1.1, qe-testadded |
Reporter | Eric Merriman |
Assignee | Christian Sullivan |
Created | 2013-05-09T18:14:45.000+0000 |
Updated | 2014-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 StudioResult:
Runtime error if android iOS hang on splash - errors in consoleExpected Result:
The simulator/emulator launches, and liveview functionsAttachments
File | Date | Size |
---|---|---|
Screen Shot 2013-05-09 at 11.08.49 AM.png | 2013-05-09T18:14:45.000+0000 | 206753 |
Screen Shot 2013-05-09 at 11.09.14 AM.png | 2013-05-09T18:14:45.000+0000 | 294490 |
This is an issue with Studio. The problem is the bin/liveview-server file has the incorrect permissions.
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
what do you get for
ti config
This works as well: /Applications/Appcelerator\ Studio/plugins/com.appcelerator.titanium.liveview.core_1.0.0.1368080563/node_modules/liveview/bin/liveview-server status
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$
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
I'm still getting this in 0.1.16:
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?
Resolved in 0.1.17 https://github.com/appcelerator/liveview/tree/0.1.17
This is actually now broken for me again. If I run 0.1.17, I get:
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.
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.
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.
FWIW, moving Appcelerator Studio to a location where the hook had no spaces in the path worked for me:
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
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.I ran:
and now it works.
I believe the fix for this was for LiveView to call 'liveview-server stop' to clear all PIDs when starting a new session.
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.