aard2-android icon indicating copy to clipboard operation
aard2-android copied to clipboard

net::ERR_CONNECTION_REFUSED http://127.0.0.1:8013/slob/faf802e3-4a0d-4913-b23a-72b4ce467319/arbitrate?blob=22-95

Open GoogleIsEvil opened this issue 1 year ago • 2 comments

First time user: I installed some freedict libraries and get this error when search

net::ERR_CONNECTION_REFUSED http://127.0.0.1:8013/slob/faf802e3-4a0d-4913-b23a-72b4ce467319/arbitrate?blob=22-95

This is on WSA.

It is clearly finding the definitions in the dicts I've installed since it lists them. Also if I click the icon in the upper left(the book with globe) it also gives the error.

It seems that it's not able to load whatever page is presenting the definitions and this seems to be due to how it is trying to access them locally. Not sure if this is a problem with WSA, the app, or a combination. Again, given that it actually does seem to search the dicts to find the possible definitions suggests it's just something to do with how it is trying to host the presentation.

GoogleIsEvil avatar Jan 31 '25 21:01 GoogleIsEvil

My money is on WSA. Looks like it blocks network connections even if they are to localhost (article content is served by local embedded web server). Perhaps you need to turn on Local network access in Experimental features section on the Advanced settings page (suggested here) ?

itkach avatar Jan 31 '25 22:01 itkach

https://github.com/microsoft/WSA/issues/503

I have to turn off the local network access.

I don't know if that will cause any problems currently or in the future or if there is a workaround in your app.

It seems rather than merging the android localhost with the host's localhost they replace it when "local network access" is set. I'm not sure if they rename the android's localhost to a different IP or not.

https://developer.android.com/studio/run/emulator-networking

says that 10.0.2.2 is the renamed host's localhost for an emulator. Not sure if something similar is taking place with WSA or not.

Maybe how ever you are binding the web server to the localhost can be changed. Maybe enabling one to optionally set the ip(defaults to 127.0.0.1 but allows override). Also could check and see if the ip is working or not and if not try to find others. Maybe allow multiple ip's to be set such as 127.0.0.1;10.0.0.2 and it tries to find one that does not give a connection error.

There is also this

https://github.com/microsoft/WSA/issues/213

which led me to the other one. None of the stuff in 213 worked.

In particular,

Running the command nc -s 127.0.0.1 -lp 1234 starts a server port in the lo interface. In this case, we can connect to the port using the command nc 127.0.0.1 1234. Running the command nc -s 0.0.0.0 -lp 1234 starts a server port that should listen to all interfaces. In this case, we can connect to the port using the command nc 127.0.0.1 1234.

GoogleIsEvil avatar Feb 01 '25 16:02 GoogleIsEvil