Skip to content

NativeScript debugger encountered Error Domain=NSPOSIXErrorDomain Code=48 "Address already in use". #1916

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
alexziskind1 opened this issue Jul 8, 2016 · 14 comments
Labels

Comments

@alexziskind1
Copy link

I get this error when trying to start debugging using the iOS emulator:

NativeScript debugger encountered Error Domain=NSPOSIXErrorDomain Code=48 "Address already in use".

Versions:
El Capitan 10.11.5
XCode 7.3.1
NativeScript 2.1.1

What else can I get you?
Thanks,
Alex

@enchev
Copy link
Contributor

enchev commented Jul 11, 2016

Hey @alexziskind1,

Do you get this error every time when you run the debugger?

Hey @vchimev @dtopuzov @SvetoslavTsenov can you confirm this?

@alexziskind1
Copy link
Author

@enchev - I got this error EVERY time I ran debug and whether I started the app in debugging or attached to it. This also happens on two of my Macs- a MacBookPro and an iMac. After I restarted the machine, the problem went away.

@enchev
Copy link
Contributor

enchev commented Jul 11, 2016

Hey @alexziskind1,

We believe that this was caused by the fact the both iOS and Android debuggers were using the same port. We resolved this recently here:
#1902

@alexziskind1
Copy link
Author

@enchev I hope that fixes it. However, I want to add that when I get this error, I am not running the android emulator, just the iOS simulator alone. Also, I haven't restarted my other machine (iMac) and still getting the error on that one. Let me know if there is some kind of trace or something I can do that can help diagnose.

@enchev
Copy link
Contributor

enchev commented Jul 12, 2016

Can you pull our master branch, use it instead the official CLI and let us know if you still have the same problems?

@alexziskind1
Copy link
Author

Sure. Can you point me to a set of instructions on how to do that?

@enchev
Copy link
Contributor

enchev commented Jul 13, 2016

@alexziskind1
Copy link
Author

Can of worms :)
I get stuck at this step with an error:

$ git submodule update --init
Submodule 'lib/common' ([email protected]:telerik/mobile-cli-lib.git) registered for path 'lib/common'
Cloning into 'lib/common'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of '[email protected]:telerik/mobile-cli-lib.git' into submodule path 'lib/common' failed

I also tried using sudo with the same results

@ErjanGavalji
Copy link
Contributor

@alexziskind1
Alex, this error is typical when you don't have an SSH key setup and the submodule is added via the smart git protocol

Can you try setting one up?

Cheers,
Erjan

@alexziskind1
Copy link
Author

Thanks @ErjanGavalji
I've successfully built v2.2.0 from the master repo
The first run of the debug command resulted in the same error.
Then I reset content and settings of the simulator and quit the program. I deleted the platforms folder. I executed the ../nativescript-cli/bin/tns debug ios --emulator command again, but I get the same error.

@alexziskind1
Copy link
Author

Frontend client connected.
Backend socket created.
Jul 13 10:10:15 --- last message repeated 1 time ---
Jul 13 10:10:15 Alexander-Mac testdebug[75521]: NativeScript debugger encountered Error Domain=NSPOSIXErrorDomain Code=48 "Address already in use".
Jul 13 10:10:16 Alexander-Mac backboardd[75471]: SecTaskCopyDebugDescription: testdebug[75521]
Jul 13 10:10:16 Alexander-Mac backboardd[75471]: SecTaskCopyDebugDescription: testdebug[75521]
Jul 13 10:10:16 Alexander-Mac backboardd[75471]: SecTaskCopyDebugDescription: testdebug[75521]
Jul 13 10:10:16 Alexander-Mac backboardd[75471]: SecTaskCopyDebugDescription: testdebug[75521]
Jul 13 10:10:16 Alexander-Mac backboardd[75471]: SecTaskCopyDebugDescription: testdebug[75521]
Jul 13 10:10:16 Alexander-Mac testdebug[75521]: assertion failed: 15F34 13B137: libxpc.dylib + 71730 [D938B614-A290-3D25-8032-8DEF8A01913A]: 0x7d
Frontend socket closed!

@enchev
Copy link
Contributor

enchev commented Jul 18, 2016

Hey @SvetoslavTsenov @vchimev can you check this?

@dtopuzov
Copy link
Contributor

dtopuzov commented Jul 27, 2016

Still can not reproduce.

@alexziskind1 can you try "tns debug ios --emulator --log trace" and post the log (may be part after *** BUILD SUCCEEDED *** will be enough).

--log trace will show the port used by debugger and you can check if something else also try to use this port.
--log trace will also give us info for tns-ios-inspector package which is important part for debugging. It might happen that you use latest {N} CLI, runtime and modules, but inspector is old. If that is the case clean npm cache might solve the problem.

@alexziskind1
Copy link
Author

Unfortunately my machine restarted due to a power outage so I lost the ability to reproduce.

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

No branches or pull requests

4 participants