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

Node crashing out if GPS not immediately connected. #6

Open
ketchuphed opened this issue Sep 19, 2024 · 0 comments
Open

Node crashing out if GPS not immediately connected. #6

ketchuphed opened this issue Sep 19, 2024 · 0 comments

Comments

@ketchuphed
Copy link

I am having an issue where the tool is completely crashing if it doesn't detect the speed right away (when it reads a new email/session before the watch's GPS kicks in). Shouldn't this just be setting it to 0 if the speed isn't defined yet?

[9/18/2024] [11:01:48 PM] [Core] » i  info      Fetching https://livetrack.garmin.com/services/session/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/trackpoints?requestTime=1726714908248
D:\LiveTrack-OBS\garmin-livetrack-obs-master\garmin-livetrack-obs-master\index.js:76
    latestData.speed = latestData.speed || 0;
                                  ^

TypeError: Cannot read properties of undefined (reading 'speed')
    at Timeout._onTimeout (D:\LiveTrack-OBS\garmin-livetrack-obs-master\garmin-livetrack-obs-master\index.js:76:35)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.17.0
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

1 participant