Skip to content

Instantly share code, notes, and snippets.

@rgladwell
Created April 27, 2014 15:53
Show Gist options
  • Save rgladwell/11349027 to your computer and use it in GitHub Desktop.
Save rgladwell/11349027 to your computer and use it in GitHub Desktop.
Stacktrace for mockwebserver running in instrumentation test
java.net.SocketException: socket failed: EACCES (Permission denied)
at libcore.io.IoBridge.socket(IoBridge.java:583)
at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
at java.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:38)
at java.net.ServerSocket.<init>(ServerSocket.java:98)
at java.net.ServerSocket.<init>(ServerSocket.java:69)
at com.squareup.okhttp.mockwebserver.MockWebServer.play(MockWebServer.java:245)
at com.squareup.okhttp.mockwebserver.MockWebServer.play(MockWebServer.java:232)
at com.foo.bar.android.test.HelloAndroidActivityTest.testActivity(HelloAndroidActivityTest.java:17)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
at libcore.io.Posix.socket(Native Method)
at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
at libcore.io.IoBridge.socket(IoBridge.java:568)
... 21 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment