microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.67k stars 1.73k forks source link

Location database bug #2635

Open Pitoucol opened 3 days ago

Pitoucol commented 3 days ago

Hello

I still have the location bug, even after latest version. I'm on 0.3.4.240913.

Before this update, I had the bug, but only when opening some particular apps. But now, after the update, it's more more frequent. With many apps, like brave or Firefox...

To Reproduce Steps to reproduce the behavior: Just open brave or Firefox but may other apps Wait about 20-30 seconds. Information that microg just crashed appears. Here is a log if you can deal with it... https://paste.crdroid.net/a0d4PK

Android 14. Rom crdroid base on lineage os.

Thanks

mar-v-in commented 3 days ago

Do you use the official version (from the microG F-Droid repository) or some other version? Did you upgrade from 0.3.2 to 0.3.4 or did you use any other version before?

Pitoucol commented 3 days ago

Yes I use the official from fdroid repo. I was on 3.3 before and just upgrade yesterday

ale5000-git commented 3 days ago

@Pitoucol Is it possible that your phone crashed and corrupted the database?

Pitoucol commented 3 days ago

No idea. How do I check this? My phone didn't crash recently or yesterday, or before.. Can I do something to test or to bring you informations?

zd3sf commented 2 days ago

Can you try to see if the location works in "Satstat" or "my location" apps from Fdroid?. Those are the 2 that actually displays network location. The bug is resolved for me on Crdroid android 15.

You can export the database from Microg settings>location>3 dots menu

ale5000-git commented 2 days ago

Since the paste link may disappear I will post his error here just to be sure:

time: 1731929649460
msg: android.database.sqlite.SQLiteException: no such column: alt (code 1 SQLITE_ERROR): , while compiling: SELECT lat, lon, acc, alt, alt_acc, time, prec FROM cells WHERE mcc = ? AND mnc = ? AND type = ? AND lac = ? AND cid = ? AND psc = ?
stacktrace: android.database.sqlite.SQLiteException: no such column: alt (code 1 SQLITE_ERROR): , while compiling: SELECT lat, lon, acc, alt, alt_acc, time, prec FROM cells WHERE mcc = ? AND mnc = ? AND type = ? AND lac = ? AND cid = ? AND psc = ?
    at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    at android.database.sqlite.SQLiteConnection.-$$Nest$smnativePrepareStatement(Unknown Source:0)
    at android.database.sqlite.SQLiteConnection$PreparedStatementCache.createStatement(SQLiteConnection.java:1562)
    at android.database.sqlite.SQLiteConnection.acquirePreparedStatementLI(SQLiteConnection.java:1098)
    at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1126)
    at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:686)
    at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:614)
    at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:62)
    at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
    at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
    at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1827)
    at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1659)
    at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1516)
    at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1701)
    at org.microg.gms.location.network.LocationDatabase.query(LocationDatabase.kt:138)
    at org.microg.gms.location.network.LocationDatabase.getCellLocation(LocationDatabase.kt:141)
    at org.microg.gms.location.network.NetworkLocationService$queryCellLocationFromDatabase$2.invoke(NetworkLocationService.kt:303)
    at org.microg.gms.location.network.NetworkLocationService$queryCellLocationFromDatabase$2.invoke(NetworkLocationService.kt:303)
    at org.microg.gms.location.network.NetworkLocationService.queryLocationFromRetriever(NetworkLocationService.kt:315)
    at org.microg.gms.location.network.NetworkLocationService.queryCellLocationFromDatabase(NetworkLocationService.kt:303)
    at org.microg.gms.location.network.NetworkLocationService.queryCellLocation(NetworkLocationService.kt:421)
    at org.microg.gms.location.network.NetworkLocationService.access$queryCellLocation(NetworkLocationService.kt:39)
    at org.microg.gms.location.network.NetworkLocationService$onCellDetailsAvailable$3.invokeSuspend(NetworkLocationService.kt:472)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)
    at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
    at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
    at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
    at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
    at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
    at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1)
    at org.microg.gms.location.network.NetworkLocationService.onCellDetailsAvailable(NetworkLocationService.kt:471)
    at org.microg.gms.location.network.cell.CellDetailsSource$startScan$1.onCellInfo(CellDetailsSource.kt:31)
    at android.telephony.TelephonyManager$4.lambda$onCellInfo$0(TelephonyManager.java:7146)
    at android.telephony.TelephonyManager$4$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8601)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:583)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:863)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@6f1ec39, Dispatchers.Main.immediate]
Pitoucol commented 2 days ago

I can get location with osm, or satstats and my location, but only with GPS. With my location, network location doesn't work. Even with toggle on, in red you can see "turned off"