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

Sometimes notes are missing location even when enabled #12

Open
qcasey opened this issue Jan 8, 2023 · 6 comments
Open

Sometimes notes are missing location even when enabled #12

qcasey opened this issue Jan 8, 2023 · 6 comments

Comments

@qcasey
Copy link
Contributor

qcasey commented Jan 8, 2023

Location tracking on notes works about half the time on two of my devices, when it's missing there is a console error of:

Non-fatal location error Position acquisition timed out

Bumping the timeout to 6000 ms appears to fix this.

Is anyone else experiencing this?

EDIT: Actually on my Android phone 6000 gets a fix ~80% of the time, 9000+ seems to work better from a cold start. I'll try pre-fetching location on initial load as well

@donalmacanri
Copy link
Collaborator

I hadn't noticed this issue before. Will try to reproduce ...

@donalmacanri
Copy link
Collaborator

I'm able to reproduce this now. The downside of increasing the timeout is that the note potentially waits that long before saving, which makes things feel quite laggy.

It would be nice to save the note immediately and save the location asynchronously, in the background, if necessary. However, I need to get more familiar with the storage implementations before attempting it.

@qcasey
Copy link
Contributor Author

qcasey commented Jan 18, 2023

That is true, the many seconds of delay is annoying.

It would be nice to save the note immediately and save the location asynchronously, in the background, if necessary. However, I need to get more familiar with the storage implementations before attempting it.

This is the right way IMO. In the meantime I'm trying a fix where the location is fetched (and cached) on load. So far it's working OK.

@donalmacanri
Copy link
Collaborator

Nice, that should reduce the occurrence of the problem.

@donalmacanri
Copy link
Collaborator

@qcasey How has the fix been working out for you since - mind creating a PR?

@qcasey
Copy link
Contributor Author

qcasey commented Feb 1, 2023

It's been working well for the most part. Sometimes (maybe 1 in 20) the location isn't fetched on load so I end up waiting the full 9 second timeout I configured like before. Still an improvement though.

The image I'm using is on ghcr.io/qcasey/nomie6-oss:fix-location-timeout-longer. I'll create a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants