-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
17
-
Cause Known
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Windows 10
Java 17
Microsoft Store application / APPX application running within <rescap:Capability Name="runFullTrust" /> classic application sandbox (the kind that mostly gives full system access but redirects file system calls; registry calls; etc)
A DESCRIPTION OF THE PROBLEM :
I've switched from URL.openConnection() to the new HttpClient API, and some of my users report that HTTP requests always fail with the following error message:
java.io.UncheckedIOException: java.io.IOException: Unable to establish loopback connection
at net.filebot.web.WebRequest.httpClient(Unknown Source)
...
Caused by: java.io.IOException: Unable to establish loopback connection
... 16 more
Caused by: java.net.SocketException: Invalid argument: connect
... 16 more
The issue seems to be exclusive to the app running inside the Microsoft Store / APPX sandbox. The issue has not been reported by users running the same app in the Win32 context.
Notably, the legacy URL.openConnection() API just works.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Difficult. I cannot reproduce the problem on my Windows 11 machine, but the issue has been reported independently by quite a number of customers:
* https://www.filebot.net/forums/viewtopic.php?t=13750
* https://www.filebot.net/forums/viewtopic.php?t=13753
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Creating a new HttpClient not fail unexpectedly before even sending a HTTP request, and should work just as well as URL.openConnection() and certainly should not fail with "Unable to establish loopback connection" when trying to establish a connection to a remote host.
ACTUAL -
HttpClient does not work. URL.openConnection() just works.
---------- BEGIN SOURCE ----------
private static synchronized HttpClient httpClient() {
if (httpClient == null) {
httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_2).followRedirects(HttpClient.Redirect.NORMAL).connectTimeout(TIMEOUT).cookieHandler(new CookieManager(null, CookiePolicy.ACCEPT_ALL)).build();
}
return httpClient;
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
The legacy URL.openConnection() works.
FREQUENCY : always
Windows 10
Java 17
Microsoft Store application / APPX application running within <rescap:Capability Name="runFullTrust" /> classic application sandbox (the kind that mostly gives full system access but redirects file system calls; registry calls; etc)
A DESCRIPTION OF THE PROBLEM :
I've switched from URL.openConnection() to the new HttpClient API, and some of my users report that HTTP requests always fail with the following error message:
java.io.UncheckedIOException: java.io.IOException: Unable to establish loopback connection
at net.filebot.web.WebRequest.httpClient(Unknown Source)
...
Caused by: java.io.IOException: Unable to establish loopback connection
... 16 more
Caused by: java.net.SocketException: Invalid argument: connect
... 16 more
The issue seems to be exclusive to the app running inside the Microsoft Store / APPX sandbox. The issue has not been reported by users running the same app in the Win32 context.
Notably, the legacy URL.openConnection() API just works.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Difficult. I cannot reproduce the problem on my Windows 11 machine, but the issue has been reported independently by quite a number of customers:
* https://www.filebot.net/forums/viewtopic.php?t=13750
* https://www.filebot.net/forums/viewtopic.php?t=13753
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Creating a new HttpClient not fail unexpectedly before even sending a HTTP request, and should work just as well as URL.openConnection() and certainly should not fail with "Unable to establish loopback connection" when trying to establish a connection to a remote host.
ACTUAL -
HttpClient does not work. URL.openConnection() just works.
---------- BEGIN SOURCE ----------
private static synchronized HttpClient httpClient() {
if (httpClient == null) {
httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_2).followRedirects(HttpClient.Redirect.NORMAL).connectTimeout(TIMEOUT).cookieHandler(new CookieManager(null, CookiePolicy.ACCEPT_ALL)).build();
}
return httpClient;
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
The legacy URL.openConnection() works.
FREQUENCY : always