microg / UnifiedNlp

Alternative network location provider for Android, with plugin interface to easily integrate third-party location providers.
968 stars 209 forks source link

No UnifiedNlp location was provided by the system within 10 seconds (how to debug) #178

Open AllesMeins opened 4 years ago

AllesMeins commented 4 years ago

Unfortunately I can't get the location backend to work and I'm a bit lost to find the reason. I've installed the latest UnifiedNlp (GAPPS Version, since I've playstore installed), the XposedUnifiedNlp Module and the IchnaeaNlpBackend 1.4.0 configured and activated. I also tried the Deja Vu Backend.

According to the SelfTest everything is in order and should work but at the bottom of the screen this message is displayed: "No UnifiedNlp location was provided by the system within 10 seconds".

Now I'm a bit lost on how to find the problem. There are no error messages and logcat doesn't show any related errors. Are there any other ways to debug this problem? Or is this a known behaviour?

Im using Lineage 16.0 on an Sony Xperia XZ1Compact

IzzySoft commented 4 years ago

I've had the same issue on LOS 15 for quite a while. Tried the same things you did. I'm also using AFWall+ – and though this should not be related, tried with some rules there as well. I've no idea what finally did it: it suddenly started to work.

Should have kept a log of each step I performed. Unfortunately I didn't, and now don't even remember every single thing…

AllesMeins commented 4 years ago

With help I did some mor digging and found that the backend seems to report an accuarte location but it somehow gets lost somewhere along the way.

The attached logs are filtered by "nlp" and "Ichnaea". Both contain my accurate location (I replaced it by XX,XXXXX and YY,YYYYY) and the Mac address of several wifi access points araound me. logcat_nlp.txt logcat_Ichnaea.txt

fbellet commented 4 years ago

The problem for me in that case was that the selfcheck function tests if location is non null, but ALSO if location contains .getExtras() data (boolean hasKnown). LineageOS 16 in my case just silently sanitizes the location when a COARSE location is requested, and removes all the content of this .getExtras() stuff, causing the test to fail.

Just testing if location is non null seems to be sufficient for me.