[TIMOB-24381] IOS: Console log hangs on trying to connect to log server.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2017-02-08T16:58:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Sharif AbuDarda |
Assignee | Chris Barber |
Created | 2017-02-07T19:23:26.000+0000 |
Updated | 2017-02-09T15:38:53.000+0000 |
Description
Hello, When run "ti build -p ios" in studio terminal, The console log hangs on "trying to connect on log server ....". The app loads fine in the simulator but the console log stuck and never shows the
-- Start simulator log -------------------------------------------------------
and the rest of app activity in console. It just sits there. But the app works fine.
Environment:
Operating System
Name = Mac OS X
Version = 10.12.3
Architecture = 64bit
CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 4.7.0
npm Version = 2.15.11
Titanium CLI
CLI Version = 5.0.7
Titanium SDK
SDK Version = 6.0.1.GA
Target Platform = iphone, ipad
Xcode 8.2.1
iOS 10.2 simulators
Sample code:
var win = Ti.UI.createWindow({
backgroundColor : "#fff"
});
var abutton = Ti.UI.createButton({
title : "click"
});
win.add(abutton);
abutton.addEventListener('click', function(e) {
Ti.API.info("########### Info");
Ti.API.warn("########### Warn");
Ti.API.error("########### Error");
});
win.open();
The console doesn't show anything clicking on the button.
Attachments
File | Date | Size |
---|---|---|
Screen+Shot+2017-02-06+at+17.32.47.png | 2017-02-07T19:21:01.000+0000 | 3013635 |
[~sdarda] You couldn't reproduce the issue right? Maybe the port is used by some other application, but then the log-server should check for another one (which it would [here](https://github.com/appcelerator/ioslib/blob/master/lib/simulator.js#L1561) if the connection gets refused), but it doesn't.
Hello [~hansknoechel], Yes, I wasn't able to reproduce. For the customer it works on his another machine under same network connection.
Thx! Oh, and I forgot: Can they try specifying an own port in the tiapp.xml to use? An example of the tiapp section:
I am unable to reproduce this with 6.0.1.GA, latest 6_0_X build (6.0.2), and latest master build (6.1.0). Waiting for QE to try before resolving this as cannot reproduce. You should only have to set the
<log-server-port>
if you are consistently having problems, but generally you just need to quit (or reset) the iOS Simulator.I also am unable to reproduce this issue with 6.0.1.GA, 6.0.2, or 6.1.0 SDKs.
Thank you [~ewieber]! Resolving as cannot reproduce.
It is unfortunate the issue can not be replicated your end. If it makes any difference when I run xCode 7.3 with 5.5 GA the console logs work fine, however on xCode 8.2.1 with 6.0.1 GA it does not show any console logs or Ti.API.info messages. I have also created a stack overflow item under: http://stackoverflow.com/questions/42072477/ti-api-info-not-writing-to-console I am going to re-install the system from scratch, then I hope it will work. will just install Appcelerator and its dependancies and run a default Classic project with no other applications installed. then 'if' it works, will install application one after the other to see if there are any port issues arising - Can't see why as Appcelerator is supposed to be intelligent enough to use a different port if the current port is in use. Thanks, Quinton
[~qsheppard] Actually, it is: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L2373-L2431. Again, reset the iOS Simulator and try again.
I'd also like to know if it always tries to connect to port 19920. If so, check which service is using this port (
netstat -anp tcp | grep 19920
). But if the port would be used, the log-sever would try another one.I did the above command in the terminal during the build running in the simulator and after I quite the simulator. During: tcp4 0 0 127.0.0.1.19920 *.* LISTEN and after came back with nothing. however I do get 19920 port coming up each time I run it.
[~qsheppard] Here's another idea, the following is a Node.js client that connects to the app and streams the logs:
Save that to
client.js
and run itnode client.js 19920
. I'd be curious if that works.Thanks Chris for that, I get the following in response... ARKDEV25:test_proj quintons_local$ node client.js 19920 error! { [Error: connect ECONNREFUSED ::1:19920] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 19920 }
and if the following helps... ps aux | grep node quintons_local 48962 0.9 0.0 2432804 2028 s000 S+ 3:22pm 0:00.00 grep node quintons_local 1853 0.0 0.7 3158080 58516 ?? S 11:44am 0:01.56 /Applications/Utilities/Adobe Creative Cloud/CCLibrary/CCLibrary.app/Contents/MacOS/../libs/node /Applications/Utilities/Adobe Creative Cloud/CCLibrary/CCLibrary.app/Contents/MacOS/../js/server.js quintons_local 923 0.0 0.6 3124056 47832 ?? S 11:33am 0:01.79 /Applications/Utilities/Adobe Creative Cloud/CCXProcess/CCXProcess.app/Contents/MacOS/../libs/node /Applications/Utilities/Adobe Creative Cloud/CCXProcess/CCXProcess.app/Contents/MacOS/../js/main.js root 104 0.0 0.1 2469688 5076 ?? Ss 11:30am 0:10.73 /System/Library/CoreServices/ionodecache -k /var/db/ionodecache.json
If you can't connect, then the app isn't running. You need to launch the app before trying to connect with the client. Have you tried resetting your iOS Simulator?