GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

Crash while fetching network location from WIFIonICE moving wifi network

Open TimoWilken opened this issue 1 year ago • 0 comments

Describe the bug

When on an ICE train in Germany and connected to the "WIFIonICE" network, I never get a network location from microG that is identical to the train's GPS location (as reported by the API).

To Reproduce

Steps to reproduce the behavior:

  1. Get on an ICE train (or stand next to on in a station?), connect to its WIFIonICE network and log into the network
  2. Start a logcat app, e.g. "Logcat Reader", and start recording messages
  3. Open any app that requests a location (e.g. a maps app)
  4. See error in logcat: "Failed retrieving location for current moving wifi WIFIonICE: java.net.SocketException: Binding socket to network 101 failed: EPERM (Operation not permitted)" (see traceback below)

Expected behavior

I expect the maps app to show my location identical with the train's location almost immediately, with an appropriate accuracy (judging by microG code, that would be 100m).

Screenshots

N/A

System

  • Android Version: 14 (AP2A.240905.003)
  • Custom ROM: LineageOS 21-20241211-microG-FP4 (from lineage.microg.org)
  • microG Services app: 0.3.6.244735 (244735012), from microG F-Droid repo

Additional context

Failed retrieving location for current moving wifi WIFIonICE
java.net.SocketException: Binding socket to network 101 failed: EPERM (Operation not permitted)
	at android.net.Network.bindSocket(Network.java:442)
	at android.net.Network.bindSocket(Network.java:409)
	at android.net.Network$NetworkBoundSocketFactory.createSocket(Network.java:269)
	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:114)
	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
	at org.microg.gms.location.network.wifi.MovingWifiHelper$retrieveMovingLocation$2.invokeSuspend(MovingWifiHelper.kt:140)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: android.system.ErrnoException: Binding socket to network 101 failed: EPERM (Operation not permitted)
	at android.net.Network.bindSocket(Network.java:441)
	... 22 more

TimoWilken avatar Dec 27 '24 11:12 TimoWilken