You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OkHttpServer defaults to using ipv6 addresses, but during Google CTS testing, system applications are not allowed to use ipv6, resulting in CTS being unable to pass
#597
Open
SJLBenjamin opened this issue
Apr 28, 2024
· 1 comment
return NewServerBuilderResult.serverBuilder(
...
//todo defaults to using an ipv6 address
new OkHttpServerBuilder(new InetSocketAddress(port), result.factory));
}
}
CTS Test:
java.lang.AssertionError: on-device tests failed:
android.appsecurity.cts.listeningports.ListeningPortsTest#testNoAccessibleListeningPorts:
android.appsecurity.cts.listeningports.ListeningPortsTest$ListeningPortsAssertionError:
Found port listening on addr=::, port=55231, UID=1000 [....]
at android.appsecurity.cts.listeningports.ListeningPortsTest.testNoAccessibleListeningPorts(ListeningPortsTest.java:170)
at android.appsecurity.cts.Utils.runDeviceTests(Utils.java:129)
at android.appsecurity.cts.Utils.runDeviceTests(Utils.java:75)
at android.appsecurity.cts.Utils.runDeviceTests(Utils.java:63)
at android.appsecurity.cts.ListeningPortsTest.assertNoAccessibleListeningPorts(ListeningPortsTest.java:225)
at android.appsecurity.cts.ListeningPortsTest.testNoRemotelyAccessibleListeningTcp6Ports(ListeningPortsTest.java:101)
Please provide a method of using only IPV4 as the server
The text was updated successfully, but these errors were encountered:
grpc-kotlin doesn't involve itself with this. This issue should be discussed on the grpc-java repository.
The server should be listening on all addresses. Disallowing IPv6 and allowing IPv4 sounds suspicious. Why do you think IPv4 would work?
You can use OkHttpServerBuilder.forPort(SocketAddress, ServerCredentials) to bind to IPv4-only. Make a SocketAddress with the specific IP you want to bind to.
GRPC create HttpServer:
public final class OkHttpServerProvider extends ServerProvider {
@OverRide
protected NewServerBuilderResult newServerBuilderForPort(int port, ServerCredentials creds) {
}
}
CTS Test:
java.lang.AssertionError: on-device tests failed:
android.appsecurity.cts.listeningports.ListeningPortsTest#testNoAccessibleListeningPorts:
android.appsecurity.cts.listeningports.ListeningPortsTest$ListeningPortsAssertionError:
Found port listening on addr=::, port=55231, UID=1000 [....]
at android.appsecurity.cts.listeningports.ListeningPortsTest.testNoAccessibleListeningPorts(ListeningPortsTest.java:170)
at android.appsecurity.cts.Utils.runDeviceTests(Utils.java:129)
at android.appsecurity.cts.Utils.runDeviceTests(Utils.java:75)
at android.appsecurity.cts.Utils.runDeviceTests(Utils.java:63)
at android.appsecurity.cts.ListeningPortsTest.assertNoAccessibleListeningPorts(ListeningPortsTest.java:225)
at android.appsecurity.cts.ListeningPortsTest.testNoRemotelyAccessibleListeningTcp6Ports(ListeningPortsTest.java:101)
Please provide a method of using only IPV4 as the server
The text was updated successfully, but these errors were encountered: