Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNSS fix #42

Closed
lemmerk opened this issue Oct 9, 2019 · 18 comments
Closed

GNSS fix #42

lemmerk opened this issue Oct 9, 2019 · 18 comments
Labels
bug Something isn't working

Comments

@lemmerk
Copy link
Contributor

lemmerk commented Oct 9, 2019

i've been using hauk since version 1.0 and the GNSS fix worked until version 1.1 for me. the more recent versions (1.1.1 and 1.2) hauk doesn't seem to access the location anymore on my device.

the location icon in the status bar at the top doesn't appear any more. as soon as i open a different app that requires the location (such as osmand or gpstest), the icon appears and all apps apart from hauk get a location fix.

one thing i noticed was, is that when i reinstall the app, the more recent versions don't request permission from the 'privacy guard', whereas the previous versions did.

@bilde2910
Copy link
Owner

Hi, and thanks for reporting this! v1.1.1 introduced a patch for a GNSS-fix-related issue, in that it from that version onwards will use both network (coarse) location and GNSS (fine) location to try and get a location, instead of only GNSS. Coarse location access requires a different permission than fine location, but usually Android will implicitly also allow coarse location access if fine location access has been granted. If I were to guess, this isn't the case for Privacy Guard.

One of my testing devices runs LineageOS 14 and I cannot seem to reproduce this issue on that device. I can try to add an additional check for both permissions instead of just the fine one, and you can see if that might solve the issue.

If you want to want to help test it quickly, I can send you a compiled APK for testing (I can't reproduce this issue), otherwise I'll just include it in v1.2.1 if nothing problematic happens during testing.

@lemmerk
Copy link
Contributor Author

lemmerk commented Oct 10, 2019 via email

@hurradiegams
Copy link
Contributor

Same problem here, i'm on LOS 16 official for the Oneplus 6.
If needed I can provide log files and test an apk.

@bilde2910
Copy link
Owner

I don't know if this will work, but I declared the additional coarse location permission in the app manifest on this one, and request permission from the system for both permissions.

Attached: app-debug.apk.gz

@hurradiegams
Copy link
Contributor

I don't know if this will work, but I declared the additional coarse location permission in the app manifest on this one, and request permission from the system for both permissions.

Doesn't work for me, I've still got waiting for GNSS

@lemmerk
Copy link
Contributor Author

lemmerk commented Oct 14, 2019

I don't know if this will work, but I declared the additional coarse location permission in the app manifest on this one, and request permission from the system for both permissions.

unfortunately this did not work for me either. still the same message waiting for initial GNSS fix and no GPS icon appears in the top status line.

@bilde2910
Copy link
Owner

And just to verify, it doesn't work if you completely uninstall then reinstall the debug app either?

It would indeed be nice to have logs. It can help me visualize program flow and see what gets called where in the code. I don't know what causes this issue to happen, and I can't reproduce the issue myself, but I'll do some digging around and see if I can find others with this issue and see what kind of fix they implemented for it.

@bilde2910 bilde2910 added the bug Something isn't working label Oct 14, 2019
@bilde2910
Copy link
Owner

Can you also double check that all location permissions in Privacy Guard are set to either "always ask" or "allowed" for Hauk?

I can try installing a more recent version of LineageOS tomorrow and see if I can reproduce it on 15 or 16.

@lemmerk
Copy link
Contributor Author

lemmerk commented Oct 15, 2019

Can you also double check that all location permissions in Privacy Guard are set to either "always ask" or "allowed" for Hauk?

I can try installing a more recent version of LineageOS tomorrow and see if I can reproduce it on 15 or 16.

seems like some of the permissions you are seeing in LOS 14 are not requested on LOS 16. screenshot privacy guard LOS 16

And just to verify, it doesn't work if you completely uninstall then reinstall the debug app either?

Confirmed. I had to uninstall the previous version of Hauk due to the signature of the app.

@bilde2910
Copy link
Owner

I upgraded to LOS 16 and I can now reproduce the issue. I'll try to debug what causes it.

@bilde2910
Copy link
Owner

An update on this.

I installed LOS 16, allowed access to network based location and enabled Privacy Guard during setup. I installed Hauk and upon initial launch Privacy Guard asked for permission to use location services three times (I allowed all of them). The location icon did not show up in the status bar. However, as soon as I went outside, I could get a GPS fix in Hauk despite the location icon now showing.

Can you verify using a GPS checking app like SatStat (F-Droid) or GPS Test (Play Store) that you are getting a GPS fix from satellites? I'm not sure why it doesn't pick up network based location for me, but I needed a clear view of the sky and being outside solved that reception issue and I got a location fix in Hauk right away.

Can you also try to disable Privacy Guard for Hauk and see if that has any effect?

@lemmerk
Copy link
Contributor Author

lemmerk commented Oct 15, 2019

I installed LOS 16, allowed access to network based location and enabled Privacy Guard during setup. I installed Hauk and upon initial launch Privacy Guard asked for permission to use location services three times (I allowed all of them). The location icon did not show up in the status bar. However, as soon as I went outside, I could get a GPS fix in Hauk despite the location icon now showing.

Can you verify using a GPS checking app like SatStat (F-Droid) or GPS Test (Play Store) that you are getting a GPS fix from satellites? I'm not sure why it doesn't pick up network based location for me, but I needed a clear view of the sky and being outside solved that reception issue and I got a location fix in Hauk right away.

Can you also try to disable Privacy Guard for Hauk and see if that has any effect?

i disabled privacy guard for Hauk, used SatStat and GPSTest to confirm that i was getting a GPS signal but Hauk still wasn't getting a GPS fix and (obviously) didn't update the server. all screenshots were taken after each other as you can tell from the time.

@bilde2910
Copy link
Owner

That's very strange.

At this point I think I need logs to be able to proceed. From a computer, with your phone connected and set to allow USB debugging, you can run adb logcat -e info.varden.hauk to get logs related to Hauk. Can you try running that command, then starting a share and see if something pops up after you tap the Start button?

@lemmerk
Copy link
Contributor Author

lemmerk commented Oct 16, 2019

That's very strange.

At this point I think I need logs to be able to proceed. From a computer, with your phone connected and set to allow USB debugging, you can run adb logcat -e info.varden.hauk to get logs related to Hauk. Can you try running that command, then starting a share and see if something pops up after you tap the Start button?

in the logs: uninstalled the debug version you provided, installed your debug version again and then started the app and started sharing: pastebin

@bilde2910
Copy link
Owner

Thanks a lot, that log was very helpful! I believe I have a fix for this now. Attached is a test APK if you want to try. The issue seems to be that your device doesn't have a network location provider. This is a constant in the Android SDK, so I didn't know that could happen. I'll make sure this patch makes it in the upcoming v1.3 release.

Attached: app-debug.apk.gz

@lemmerk
Copy link
Contributor Author

lemmerk commented Oct 16, 2019

Thanks a lot, that log was very helpful! I believe I have a fix for this now. Attached is a test APK if you want to try. The issue seems to be that your device doesn't have a network location provider. This is a constant in the Android SDK, so I didn't know that could happen. I'll make sure this patch makes it in the upcoming v1.3 release.

just tested the new debug version and on my phone it is working now.
thank you so much for spending the time to fix this issue. i really like your app - especially since you added the group feature.

@bilde2910
Copy link
Owner

Thanks a lot for confirming that it worked - and thank you for taking the time to help me fix the issue! I probably wouldn't be able to solve this without your help.

The patch has been committed and will be in v1.3. F-Droid will not auto update it while you have the debug version installed because of the incompatible signature between the debug APK and the F-Droid release. After I've published the v1.3 release tag, it could take anywhere from a couple of days to a week before the updated version is live.

@hurradiegams
Copy link
Contributor

Thank you for your work and the really quick reaction and fix! :)
And thanks to lemmerk who did help you, I would have found the time only today or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants