portmapper
portmapper copied to clipboard
Caused by java.net.ConnectException
keep crashing my android app, below is the exception
Fatal Exception: java.lang.RuntimeException java.net.ConnectException: failed to connect to /fe80::12be:f5ff:fe1a:d414 (port 49152): connect failed: EINVAL (Invalid argument) com.offbynull.portmapper.gateways.network.NetworkRunnable.run (SourceFile:134) java.lang.Thread.run (Thread.java:818)
Caused by java.net.ConnectException failed to connect to /fe80::12be:f5ff:fe1a:d414 (port 49152): connect failed: EINVAL (Invalid argument) libcore.io.IoBridge.connect (IoBridge.java:124) arrow_drop_down java.nio.SocketChannelImpl.connect (SocketChannelImpl.java:199) com.offbynull.portmapper.gateways.network.NetworkRunnable.processMessage (SourceFile:366) com.offbynull.portmapper.gateways.network.NetworkRunnable.run (SourceFile:127) java.lang.Thread.run (Thread.java:818)
Caused by android.system.ErrnoException connect failed: EINVAL (Invalid argument) libcore.io.Posix.connect (Posix.java) libcore.io.BlockGuardOs.connect (BlockGuardOs.java:111) libcore.io.IoBridge.connectErrno (IoBridge.java:137) libcore.io.IoBridge.connect (IoBridge.java:122) libcore.io.IoBridge.connect (IoBridge.java:110) java.nio.SocketChannelImpl.connect (SocketChannelImpl.java:199) arrow_right com.offbynull.portmapper.gateways.network.NetworkRunnable.processMessage (SourceFile:366) com.offbynull.portmapper.gateways.network.NetworkRunnable.run (SourceFile:127) java.lang.Thread.run (Thread.java:818)
This looks like a core OS error. What phone maker/model? What version of Android?
Do you have logs? You need to add in an android logger for slf4j and enable trace logging.
Hi, The crash is at NetworkRunnable class line 366 ==> channel.connect(dst);
Crash happened on this phone:
-
phone model: asus ZenFone 2 (ZE550ML) OS: Android 5.0
-
phone model: Huawei Nexus 6P OS: Android 8.0.0
I have tested it on Samsung Galaxy Duos Android 4.2.2 and Emulator Android 8.0.0, it's not crashing my app.
I don't have a log for this issue now.
I can wrap the connect call in a try/catch and have it ignore errors, but there's probably something wrong with how the Android build was set up or how the parsing of OS commands is happening. If you can get logs, it would help me with finding what the core issue is.
Ok, I will get the log for you later.
Thanks. I'll take a look at this shortly.
did you find the problem
It's hard to narrow down without access to the device. If you're encountering problems, your best bet is to debug it and submit a patch. I don't have as much free time anymore to put into this project.