Reputation: 13266
I'm seeing intermittent error reports from my end users' devices like:
java.net.ConnectException: Permission denied
at sun.nio.ch.Net.connect0(Net.java)
at sun.nio.ch.Net.connect(Net.java:466)
at sun.nio.ch.DatagramChannelImpl.connect(DatagramChannelImpl.java:759)
at tech.httptoolkit.android.vpn.SessionManager.createNewUDPSession(SessionManager.java:159)
That last line is here: https://github.com/httptoolkit/httptoolkit-android/blob/2d514dce3079d23b7a500580b202ae4f7767eaaa/app/src/main/java/tech/httptoolkit/android/vpn/SessionManager.java#L152.
The application does already request INTERNET permission, and connections do work in general, they just fail like this intermittently.
I don't have much more information on the exact request that's failing, and I can't easily reproduce the issue myself for testing, so I'm debugging blind.
What are the possible causes of this error?
Upvotes: 0
Views: 145
Reputation: 1307
It is being refused permission to connect, by the local operating system.
Try to disable IPv6 on both server and client machines. (For android you can select IPv4, inside your "Mobile network" under the voice "APN Protocol")
Upvotes: 1