Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Error: Could not bind to socket #49

Closed
eleventigers opened this issue Feb 20, 2015 · 4 comments · Fixed by #53
Closed

Error: Could not bind to socket #49

eleventigers opened this issue Feb 20, 2015 · 4 comments · Fixed by #53

Comments

@eleventigers
Copy link

Upon starting an app, stetho fails to setup a server here:

https://github.com/facebook/stetho/blob/69a9ec51b93dc7eed122900ca5bbb823e6aa4ab9/stetho/src/main/java/com/facebook/stetho/server/LocalSocketHttpServer.java#L287

Not sure what I am doing wrong and whether there is anything particular needed to be configured on my test device (Nexus 5/6)?

@eleventigers
Copy link
Author

It seems that you can not have a debugger attached at the same time as having devtools open hence "Address already in use" error.

@jasta
Copy link
Contributor

jasta commented Feb 20, 2015

I've noticed this bug myself but I think it's actually harmless. The binding error appears to be the result of a logic bug that tries to bind twice, with the second time of course failing. The first bind works and the system should remain functional.

I'm going to see about fixing this properly today.

@jasta
Copy link
Contributor

jasta commented Feb 20, 2015

Facepalm: while (retries-- > 0) { ... bind(); }

jasta pushed a commit to jasta/stetho that referenced this issue Feb 20, 2015
This caused all invocations to print a stack trace indicating a serious
sounding error when in fact everything was working fine.  Added a log
statement to clarify that everything is fine :)

Closes facebookarchive#49
@jasta jasta closed this as completed in #53 Feb 20, 2015
longinoa pushed a commit to longinoa/stetho that referenced this issue Mar 11, 2015
This caused all invocations to print a stack trace indicating a serious
sounding error when in fact everything was working fine.  Added a log
statement to clarify that everything is fine :)

Closes facebookarchive#49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@jasta @eleventigers and others