Skip to content

tns debug ios times out #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tjvantoll opened this issue Jul 10, 2015 · 14 comments
Closed

tns debug ios times out #636

tjvantoll opened this issue Jul 10, 2015 · 14 comments
Assignees
Milestone

Comments

@tjvantoll
Copy link
Contributor

Since 1.1.2 (maybe before?) the tns debug ios --debug-brk command times out for me on iOS—with and without the --emulator flag.

The command successfully deploys the app to the iOS simulator / device, and successfully launches the web inspector, but I just end up getting stuck on

2015-07-10 16:19:08.779 sampleGroceries[1134:21324] NativeScript waiting for debugger.
And then eventually I get:

Session ended without errors.
tns debug ios --start does not appear to work either. It launches the web inspector but cannot connect to the app.

Any help on this would be appreciated.

+@toddanglin as he hit this issue too

@dtopuzov dtopuzov modified the milestones: 1.3.0, 1.2.0 Jul 21, 2015
@Fatme
Copy link
Contributor

Fatme commented Jul 21, 2015

Hi @tjvantoll,

I wasn't able to reproduce the timeout issue on my machine. Can you give us more information about your osx version and your safari version?

@tjvantoll
Copy link
Contributor Author

Hi @Fatme,

I'm running Safari 8.0.7 and OS X 10.10.4. I just tried this on https://github.com/NativeScript/sample-Groceries, adding the iOS platform from scratch, and I can still recreate the problem.

@ligaz ligaz modified the milestones: 1.2.1, 1.2.0 Jul 23, 2015
@Fatme Fatme modified the milestones: 1.2.2, 1.2.1 Jul 27, 2015
@dtopuzov dtopuzov closed this as completed Aug 6, 2015
@Fatme
Copy link
Contributor

Fatme commented Aug 11, 2015

Hi @tjvantoll,

We've released 1.2.2 version of {N} CLI and introduced --timeout option for debug command. The default timeout is 90sec. Please give it a try a let me know if this works for you.

@tjvantoll
Copy link
Contributor Author

Hey @Fatme,

Unfortunately I'm still not able to use the {N} inspector as of 1.2.2. I've tried running tns debug ios --emulator with various --timeout settings, and I continue to see:

2015-08-12 11:19:52.066 helloworld[73238:5952923] NativeScript waiting for debugger.
Session ended without errors.

@teobugslayer
Copy link
Contributor

@tjvantoll please run tns debug ios --emulator --timeout 90 --log trace > log.txt and send us the log.txt file.

@tjvantoll
Copy link
Contributor Author

Hey @teobugslayer,

Here's the log from running on a newly created project with 1.2.2: https://gist.github.com/tjvantoll/ebde3c16998c117814f5.

And here's a short video of what I see on my end: https://www.dropbox.com/s/nkw8hpdwhmqzdqk/debug-timeout-issue.mov?dl=0.

Thanks!

@Fatme
Copy link
Contributor

Fatme commented Aug 13, 2015

@tjvantoll can you check if port 8080 is available on your machine?

@tjvantoll
Copy link
Contributor Author

@Fatme I believe that it is. OS X's Network Utility tells me that it is at least:

Port Scanning host: 127.0.0.1

     Open TCP Port:     8080        http-alt

@toddanglin, by chance are you still having the same issue with tns debug ios --emulator? I'm trying to determine if this issue is affecting just me.

@toddanglin
Copy link

Just tested with 1.2.2 on OSX 10.10.5 and experienced the same problem.

I created a new project (tns create), added iOS platform (tns platform add ios) and then tried to debug (tns debug ios --emulator). The app builds, the iOS emulator starts, the {N} debug window opens and then I see "NativeScript waiting for debugger."

Actually, it's identical to what @tjvantoll shows in his short video above.

@toddanglin
Copy link

I don't know if it means anything, but I noticed in my --log trace and @tjvantoll's that the NativeScript Inspector path is referencing v1.2.1 (despite the fact we're both using v1.2.2):

Exec open -a '/Users/toddanglin/.npm/tns-ios/1.2.1/package/WebInspectorUI/NativeScript Inspector.app' --args '/Users/toddanglin/.npm/tns-ios/1.2.1/package/WebInspectorUI/Safari/Main.html' 'NSTest'

Maybe the wrong version of the Inspector is being used by the CLI on Mac? Long shot. No idea how the Inspector is versioned or if the versions are supposed to match.

@Fatme
Copy link
Contributor

Fatme commented Aug 18, 2015

@toddanglin,

{N} Inspector path is correct - /Users/toddanglin/.npm/tns-ios/1.2.1/package/WebInspectorUI/NativeScript. {N} CLI uses the latest ios-runtime which version is 1.2.1.

@toddanglin
Copy link

Can we re-open this issue? I'm still experiencing the original problem with {N} v1.2.3.

Have you been able to reproduce the problem on a Mac?

@toddanglin
Copy link

This still failed for me initially with NativeScript 1.3 on Mac, but 1.3 did reveal that something else was trying to use port 8080. Upon further investigation, the offending process using port 8080 was:

node /usr/local/lib/node_modules/nativescript/node_modules/node-inspector/bin/inspector --debug-port 53121

I manually killed this process and re-attempted debugging an iOS app running in the emulator. And success! The debug tools opened and connected.

@tjvantoll: Do you still have this problem with 1.3? If so, does the same solution work for you?

@tjvantoll
Copy link
Contributor Author

It works! I didn't even have to kill a process. The 1.3 update (and/or the new Xcode 7 command line tools) seem to have magically fixed this. Now I have some gifs to make :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants