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

Client errors out when accuracy is not provided #165

Closed
krystiancha opened this issue Feb 16, 2021 · 1 comment · Fixed by #169
Closed

Client errors out when accuracy is not provided #165

krystiancha opened this issue Feb 16, 2021 · 1 comment · Fixed by #169
Labels
bug Something isn't working

Comments

@krystiancha
Copy link
Contributor

I was playing with the API and I stumbled upon an issue where if you don't include the acc field in a request the web client errors out.
Comments in post.php seem to suggest that including acc should be optional.

    // Not all devices report speed and accuracy, but if available, report them
    // too.

Steps to reproduce:

curl -X POST -d "pwd=demo&dur=60&int=1" "https://apps.varden.info/demo/hauk/api/create.php"

open share link in browser, copy session ID and paste in place of sessionid below

curl -X POST -d "sid=sessionid&lat=50&lon=20&time=$(date +%s)" "https://apps.varden.info/demo/hauk/api/post.php"

web client shows

Share expired
This location share has expired.
[Dismiss]

browser console:

TypeError: Cannot read property 'setStyle' of null
    at processUpdate (main.js:71)
    at main.js:31
    at XMLHttpRequest.xhr.onreadystatechange (main.js:14)
@bilde2910
Copy link
Owner

Thanks for the report, and sorry for the delay in getting back to you. This appears to be an error on the frontend wherein the map script at one point assumes that all users will have an accuracy value associated with them, even though, as you noted, the accuracy is supposed to be optional. Will make sure this gets fixed ASAP.

@bilde2910 bilde2910 added the bug Something isn't working label Mar 30, 2021
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

Successfully merging a pull request may close this issue.

2 participants