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

Can't upload more than 1 activity to Garmin at a time #121

Closed
akramer115 opened this issue Jun 16, 2021 · 6 comments
Closed

Can't upload more than 1 activity to Garmin at a time #121

akramer115 opened this issue Jun 16, 2021 · 6 comments

Comments

@akramer115
Copy link

Hi there - first of all thank you so much for the improvements and work on v2! Excited to keep it running in the background. I am using this on my mac and ran into the below error. I got my most recent workout to sync, but when I increased the "NumWorkoutsToDownload" to 10, I hit this snag:

[20:37:25 ERR] Failed to upload workouts. GUpload had exit code of 1
[20:37:25 ERR] GUpload returned an error code. Failed to upload workouts.
Garmin.GarminUploadException: GUpload Exit Code: 1 - GUpload returned an error code. Failed to upload workouts.
   at Garmin.GarminUploader.UploadViaPython(String[] files) in /Users/akramer/Desktop/p2g_v2/src/Garmin/GarminUploader.cs:line 117
   at Garmin.GarminUploader.UploadToGarmin() in /Users/akramer/Desktop/p2g_v2/src/Garmin/GarminUploader.cs:line 54
   at PelotonToGarminConsole.Program.RunAsync(Configuration config) in /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/Program.cs:line 160
[20:37:25 WRN] GUpload failed to upload files. You can find the converted files at ./output 
 You can manually upload your files to Garmin Connect, or wait for P2G to try again on the next sync job.
@philosowaffle
Copy link
Owner

I think this is an existing issue related to the ongoing Garmin authentication issues, see this particular comment: #109 (comment)

That comment was from a user still on V1, so it seems like a consistent problem for both V1 & V2. I have reached out to the gupload project to get some help and see if this is a problem on my end or not.

@philosowaffle philosowaffle changed the title Error code 1 - Mac v2 Upload failed Can't upload more than 1 activity to Garmin at a time Jun 16, 2021
@philosowaffle
Copy link
Owner

@jrussell11 dedicated ticket for the issue you reported a little bit ago.

@philosowaffle
Copy link
Owner

@akramer115 if you get a chance, can you switch this line to "Debug" and run again, then paste the output here. I just want to check exactly what command is being run when it attempts to upload to Garmin.

@akramer115
Copy link
Author

@philosowaffle yes of course!

[20:29:34 DBG] P2G Version: 2.0.0
[20:29:34 DBG] Operating System: Unix 11.0.0
[20:29:34 DBG] DotNet Runtime: 5.0.7
[20:29:36 DBG] Write peloton workout details to file for 59de1281fb684bc4abee77aeec634139.
[20:29:37 DBG] Write peloton workout details to file for 904344a8643a4b7c922cbb61810bc4cc.
[20:29:37 DBG] Workout e49717f6968649dca842d00afdedf183 already downloaded, skipping.
[20:29:37 DBG] Workout e4355f83a73d4dc292c2a248cf6deb59 already downloaded, skipping.
[20:29:37 DBG] Workout fe26d493095a4d80877f750ea376a919 already downloaded, skipping.
[20:29:37 DBG] Workout 4e6127be36e14ef4a682352ae391e472 already downloaded, skipping.
[20:29:37 DBG] Workout 65f7f5f4006e4cc0a7f81818a272cf12 already downloaded, skipping.
[20:29:37 DBG] Workout 778e2d7dcea547be8087cffcfb7d62b6 already downloaded, skipping.
[20:29:37 DBG] Workout ac036784877c4c53b1b0a4bbbf97ddfd already downloaded, skipping.
[20:29:37 DBG] Workout 71328a9626f54ccf85cc2c67012ff977 already downloaded, skipping.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/59de1281fb684bc4abee77aeec634139_5_min_Post-Ride_Stretch_with_Jess_King.fit
[20:29:37 INF] Backed up file ./output/fit/59de1281fb684bc4abee77aeec634139_5_min_Post-Ride_Stretch_with_Jess_King.fit
[20:29:37 DBG] Prepped fit file ./working/upload/59de1281fb684bc4abee77aeec634139_5_min_Post-Ride_Stretch_with_Jess_King.fit for upload.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/65f7f5f4006e4cc0a7f81818a272cf12_10_min_Core_Strength_with_Jess_Sims.fit
[20:29:37 INF] Backed up file ./output/fit/65f7f5f4006e4cc0a7f81818a272cf12_10_min_Core_Strength_with_Jess_Sims.fit
[20:29:37 DBG] Prepped fit file ./working/upload/65f7f5f4006e4cc0a7f81818a272cf12_10_min_Core_Strength_with_Jess_Sims.fit for upload.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/2377605a6f9a42a9a13e5c4be78fa09b_10_min_Arms_&_Shoulders_Strength_with_Selena_Samuela.fit
[20:29:37 INF] Backed up file ./output/fit/2377605a6f9a42a9a13e5c4be78fa09b_10_min_Arms_&_Shoulders_Strength_with_Selena_Samuela.fit
[20:29:37 DBG] Prepped fit file ./working/upload/2377605a6f9a42a9a13e5c4be78fa09b_10_min_Arms_&_Shoulders_Strength_with_Selena_Samuela.fit for upload.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/fe26d493095a4d80877f750ea376a919_10_min_Yoga_Flow_with_Kirra_Michel.fit
[20:29:37 INF] Backed up file ./output/fit/fe26d493095a4d80877f750ea376a919_10_min_Yoga_Flow_with_Kirra_Michel.fit
[20:29:37 DBG] Prepped fit file ./working/upload/fe26d493095a4d80877f750ea376a919_10_min_Yoga_Flow_with_Kirra_Michel.fit for upload.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/35bdabdf76594c0386ff49f0202a1e6c_10_min_Glutes_&_Legs_Strength_with_Selena_Samuela.fit
[20:29:37 INF] Backed up file ./output/fit/35bdabdf76594c0386ff49f0202a1e6c_10_min_Glutes_&_Legs_Strength_with_Selena_Samuela.fit
[20:29:37 DBG] Prepped fit file ./working/upload/35bdabdf76594c0386ff49f0202a1e6c_10_min_Glutes_&_Legs_Strength_with_Selena_Samuela.fit for upload.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/904344a8643a4b7c922cbb61810bc4cc_45_min_Sweat_Steady_Ride_with_Jess_King.fit
[20:29:37 INF] Backed up file ./output/fit/904344a8643a4b7c922cbb61810bc4cc_45_min_Sweat_Steady_Ride_with_Jess_King.fit
[20:29:37 DBG] Prepped fit file ./working/upload/904344a8643a4b7c922cbb61810bc4cc_45_min_Sweat_Steady_Ride_with_Jess_King.fit for upload.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/e4355f83a73d4dc292c2a248cf6deb59_10_min_Upper_Body_Strength_with_Selena_Samuela.fit
[20:29:37 INF] Backed up file ./output/fit/e4355f83a73d4dc292c2a248cf6deb59_10_min_Upper_Body_Strength_with_Selena_Samuela.fit
[20:29:37 DBG] Prepped fit file ./working/upload/e4355f83a73d4dc292c2a248cf6deb59_10_min_Upper_Body_Strength_with_Selena_Samuela.fit for upload.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No distance slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No speed slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/ac036784877c4c53b1b0a4bbbf97ddfd_10_min_Full_Body_Stretch_with_Matty_Maggiacomo.fit
[20:29:37 INF] Backed up file ./output/fit/ac036784877c4c53b1b0a4bbbf97ddfd_10_min_Full_Body_Stretch_with_Matty_Maggiacomo.fit
[20:29:37 DBG] Prepped fit file ./working/upload/ac036784877c4c53b1b0a4bbbf97ddfd_10_min_Full_Body_Stretch_with_Matty_Maggiacomo.fit for upload.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 DBG] No incline slug found.
[20:29:37 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/778e2d7dcea547be8087cffcfb7d62b6_20_min_Recovery_Ride_with_Matt_Wilpers.fit
[20:29:37 INF] Backed up file ./output/fit/778e2d7dcea547be8087cffcfb7d62b6_20_min_Recovery_Ride_with_Matt_Wilpers.fit
[20:29:37 DBG] Prepped fit file ./working/upload/778e2d7dcea547be8087cffcfb7d62b6_20_min_Recovery_Ride_with_Matt_Wilpers.fit for upload.
[20:29:38 DBG] No speed slug found.
[20:29:38 DBG] No incline slug found.
[20:29:38 DBG] No speed slug found.
[20:29:38 DBG] No distance slug found.
[20:29:38 DBG] No speed slug found.
[20:29:38 DBG] No speed slug found.
[20:29:38 DBG] No incline slug found.
[20:29:38 DBG] No incline slug found.
[20:29:38 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/71328a9626f54ccf85cc2c67012ff977_10_min_Full_Body_Stretch_with_Jess_Sims.fit
[20:29:38 INF] Backed up file ./output/fit/71328a9626f54ccf85cc2c67012ff977_10_min_Full_Body_Stretch_with_Jess_Sims.fit
[20:29:38 DBG] Prepped fit file ./working/upload/71328a9626f54ccf85cc2c67012ff977_10_min_Full_Body_Stretch_with_Jess_Sims.fit for upload.
[20:29:38 DBG] No incline slug found.
[20:29:38 DBG] No incline slug found.
[20:29:38 DBG] No incline slug found.
[20:29:38 INF] Encoded FIT file /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/working/4e6127be36e14ef4a682352ae391e472_15_min_Feel_Good_Ride_with_Ally_Love.fit
[20:29:38 INF] Backed up file ./output/fit/4e6127be36e14ef4a682352ae391e472_15_min_Feel_Good_Ride_with_Ally_Love.fit
[20:29:38 DBG] Prepped fit file ./working/upload/4e6127be36e14ef4a682352ae391e472_15_min_Feel_Good_Ride_with_Ally_Love.fit for upload.
[20:29:38 INF] Beginning Garmin Upload.
[20:29:38 DBG] Uploading to Garmin with the following parameters: gupload -u **email** -p **password** "./working/upload/35bdabdf76594c0386ff49f0202a1e6c_10_min_Glutes_&_Legs_Strength_with_Selena_Samuela.fit" "./working/upload/2377605a6f9a42a9a13e5c4be78fa09b_10_min_Arms_&_Shoulders_Strength_with_Selena_Samuela.fit" "./working/upload/904344a8643a4b7c922cbb61810bc4cc_45_min_Sweat_Steady_Ride_with_Jess_King.fit" "./working/upload/4e6127be36e14ef4a682352ae391e472_15_min_Feel_Good_Ride_with_Ally_Love.fit" "./working/upload/ac036784877c4c53b1b0a4bbbf97ddfd_10_min_Full_Body_Stretch_with_Matty_Maggiacomo.fit" "./working/upload/e4355f83a73d4dc292c2a248cf6deb59_10_min_Upper_Body_Strength_with_Selena_Samuela.fit" "./working/upload/65f7f5f4006e4cc0a7f81818a272cf12_10_min_Core_Strength_with_Jess_Sims.fit" "./working/upload/71328a9626f54ccf85cc2c67012ff977_10_min_Full_Body_Stretch_with_Jess_Sims.fit" "./working/upload/59de1281fb684bc4abee77aeec634139_5_min_Post-Ride_Stretch_with_Jess_King.fit" "./working/upload/778e2d7dcea547be8087cffcfb7d62b6_20_min_Recovery_Ride_with_Matt_Wilpers.fit" "./working/upload/fe26d493095a4d80877f750ea376a919_10_min_Yoga_Flow_with_Kirra_Michel.fit"
[20:29:39 DBG] Error: Invalid credentials

[20:29:39 INF] GUpload: 2021-06-16 20:29:38,698 [INFO] Try to login on GarminConnect...
2021-06-16 20:29:39,325 [CRITICAL] Login Failure: Authentification failed.

[20:29:39 ERR] Failed to upload workouts. GUpload had exit code of 1
[20:29:39 ERR] GUpload returned an error code. Failed to upload workouts.
Garmin.GarminUploadException: GUpload Exit Code: 1 - GUpload returned an error code. Failed to upload workouts.
   at Garmin.GarminUploader.UploadViaPython(String[] files) in /Users/akramer/Desktop/p2g_v2/src/Garmin/GarminUploader.cs:line 117
   at Garmin.GarminUploader.UploadToGarmin() in /Users/akramer/Desktop/p2g_v2/src/Garmin/GarminUploader.cs:line 54
   at PelotonToGarminConsole.Program.RunAsync(Configuration config) in /Users/akramer/Desktop/p2g_v2/src/PelotonToGarminConsole/Program.cs:line 160
[20:29:39 WRN] GUpload failed to upload files. You can find the converted files at ./output 
 You can manually upload your files to Garmin Connect, or wait for P2G to try again on the next sync job.
[20:29:39 INF] Sleeping for 86400 seconds...

@philosowaffle philosowaffle added the research needed needs more research by developer label Jun 17, 2021
@philosowaffle
Copy link
Owner

For anyone else who stumbles this ticket, I'm not sure I'll have a quick fix for this, I need to do some research and see if I can reproduce (which will be tricky because Garmin won't even let me upload one workout, let alone multiple 😢 ).

In the meantime the recommended workaround is to upload manually, you'll be able to find the converted files in the Output directory you setup in your config file.

@philosowaffle
Copy link
Owner

philosowaffle commented Jun 26, 2021

I have just added a new experimental feature you can try out #131

To test this out you will need to:

  1. Get the latest version of the code
    1. If using Source, pull the latest version of the master branch
    2. If using Docker, pull the latest image tag
    3. If using Windows Exe, download latest from here
  2. Delete the App.PythonAndGUploadInstalled line from your config file.
  3. Add a new config value Garmin.UploadStrategy and set it to 2.

I was able to validate that multiple workouts can be uploaded using this new strategy if you're able to successfully authenticate.

@philosowaffle philosowaffle added ready to test and removed research needed needs more research by developer labels Jun 26, 2021
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