"microG Services keeps stopping" dialog error whenever Location Services enabled (java.lang.NullPointerException)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 3.2k
- Avg merge
- 12d 11h
- Merged PRs (30d)
- 4
Description
Describe the bug
I am getting repeated dialog errors "microG Services keeps stopping" whenever I enable Location Services on my phone.
To Reproduce
I enable flight mode with Location services Disabled. I kill all running apps and get no error.
I Enable Location Services: error starts within a few minutes and repeats approx every 4 minutes.
Expected behavior
To be able to use location services without repeated dialog errors.
Screenshots
N/A but the errors show like this in the logs:
08-10 09:32:00.336 9614 9642 E AndroidRuntime: FATAL EXCEPTION: NetworkLocationService
08-10 09:32:00.336 9614 9642 E AndroidRuntime: Process: com.google.android.gms, PID: 9614
08-10 09:32:00.336 9614 9642 E AndroidRuntime: java.lang.NullPointerException
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at org.microg.gms.location.network.wifi.ExtensionsKt.toWifiDetails(SourceFile:2)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at org.microg.gms.location.network.NetworkLocationService.scan(Unknown Source:355)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at org.microg.gms.location.network.NetworkLocationService.highPowerScanRunnable$lambda$0(Unknown Source:6)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at org.microg.gms.location.network.NetworkLocationService.h(SourceFile:1)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at org.microg.gms.location.network.e.run(SourceFile:1)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:942)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
08-10 09:32:00.336 9614 9642 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67)
System
Phone: Pixel 5
OS: Android 13 /e/ OS 3.0.4-t-20250709507786-official-redfin
MicroG Services: 0.3.6.244735-17 (049740c)
Additional context
Obviously I am not on the latest version of MicroG Services but limited to what is supplied with e/OS
Error occurs in flight mode or on 3g/4g/5g or on WiFi.
Error occurs even if no apps with location permissions are running.
This error has been happening for months (with the last few versions of /e/OS too).
MicroG Self-Check shows a tick against every item in the list apart from these which are unchecked:
- Permission to read the contents of your shared storage.
- Permission to modify or delete the contents of your shared storage.
- Permission to find accounts on the device.
- Permission to read phone status and identity.
- Permission to receive text messages (SMS).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash by enabling Location Services and inspect the NetworkLocationService.scan path shown in the trace, especially org.microg.gms.location.network.wifi.ExtensionsKt.toWifiDetails. Use the supplied Android log and device conditions to identify the null value; done means location services remain enabled without repeated microG crash dialogs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100