Skip to content

Commit

Permalink
add error message about finishConnect() permissions error
Browse files Browse the repository at this point in the history
Error below:
java.net.ConnectException: Permission denied: no further information
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(Unknown Source)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(Unknown Source)
	at net.runelite.launcher.Launcher.getBootstrap(Launcher.java:489)
	at net.runelite.launcher.Launcher.postInstall(Launcher.java:929)
	at net.runelite.launcher.Launcher.main(Launcher.java:265)
Caused by: java.net.ConnectException: Permission denied: no further information
	at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Unknown Source)
	at java.net.http/jdk.internal.net.http.PlainHttpConnection$ConnectEvent.handle(Unknown Source)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.handleEvent(Unknown Source)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$3(Unknown Source)
	at java.base/java.util.ArrayList.forEach(Unknown Source)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(Unknown Source)
Caused by: java.net.SocketException: Permission denied: no further information
	at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
  • Loading branch information
Adam- committed Nov 10, 2024
1 parent 7545556 commit 928b05d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/net/runelite/launcher/FatalErrorDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.ConnectException;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.security.GeneralSecurityException;
Expand Down Expand Up @@ -224,11 +225,19 @@ public static void showNetErrorWindow(String action, Throwable err)
message += " Cannot assign requested address. This error is most commonly caused by \"split tunneling\" support in VPN software." +
" If you are using a VPN, try turning \"split tunneling\" off.";
}
// connect() returning SOCKET_ERROR:
// WSAEACCES error formatted by NET_ThrowNew()
else if (err.getMessage().equals("Permission denied: connect"))
{
message += " Your internet access is blocked. Firewall or antivirus software may have blocked the connection.";
}
// finishConnect() waiting for connect() to finish:
// Java_sun_nio_ch_SocketChannelImpl_checkConnect throws the error, either from select() returning WSAEACCES
// or SO_ERROR being WSAEACCES. NET_ThrowNew adds on the "no further information".
else if (err instanceof ConnectException && err.getMessage().equals("Permission denied: no further information"))
{
message += " Your internet access is blocked. Firewall or antivirus software may have blocked the connection.";
}
else
{
message += " Please check your internet connection.";
Expand Down

0 comments on commit 928b05d

Please sign in to comment.