UdsChannelBuilder
does not work with WiFi Proxy on Android
#11922
Milestone
UdsChannelBuilder
does not work with WiFi Proxy on Android
#11922
UdsChannelBuilder
does not work with WiFi Proxy on Android.What version of gRPC-Java are you using?
1.70.0
What is your environment?
Android
What did you expect to see?
gRPC connection to work
What did you see instead?
TRANSIENT_FAILURE
Steps to reproduce the bug
Setup
UdsChannelBuilder
and connect to a server.Connect to a WiFi on Android
On the WiFi you are connected press the pen symbol to add a proxy
Add a dummy proxy
The UdsChannelBuilder will be unable to connect and ends up in
TRANSIENT_FAILURE
state.I've managed to find a workaround by setting
proxyDetector
to benull
:Adding a log to the proxy detector I can see that a lookup happens:
Proxy detector invoked for: 127.0.0.1/<unresolved>:80
I believe the bug goes as follows:
Under the hood the
UdsChannelBuilder
uses aManagedChannelImpl
, however it with a bit of a hack uses127.0.0.1
, see heregrpc-java/android/src/main/java/io/grpc/android/UdsChannelBuilder.java
Line 79 in 57124d6
By default if no
ProxyDetector
is set but if none is set a default is applied inManagedChannelImpl
heregrpc-java/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java
Line 579 in 57124d6
So default proxy detector will then yield an error when trying to lookup
127.0.0.1
, maybe because internet didn't work through the proxy? My guess is that this is then emitted as an error and thus it enters heregrpc-java/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java
Line 1836 in 57124d6
TransientFailure
.The text was updated successfully, but these errors were encountered: