Failed to upload to Garmin Connect - call failed with status code 401 (unauthorised) #566
chrisweeks92
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have been really enjoying being able to get Peloton workouts onto Garmin recently.
Two issues i am currently having is, firstly via the windows app i have been getting an error code 401 and it won't upload the workouts to garmin connect. Below is the output from the console when using the windows version of P2G so I have tried the docker installation route and that does work and correctly sync's the data into garmin from Peloton.
Secondly, when i use Docker and want to set up a custom device info xml, it shows a red box in top corner with "DeviceInfo path is either not accessible or does not exist." is there a particular location it needs to be in order for it to be accessible? I have a Venu2 and was hoping using this sync would allow the extra details such as cycle vo2max to be included in my garmin data. not sure if this is possible with my venu2 though.
Below is the output console from using the windows app getting the 401 error.
`[10:48:14 INF] *********************************************
[10:48:14 INF] P2G Version: p2g_console 3.6.1
[10:48:14 INF] Operating System: Win32NT
[10:48:14 INF] OS Version: Microsoft Windows NT 10.0.22621.0
[10:48:14 INF] DotNet Runtime: Microsoft Windows NT 10.0.22621.0
[10:48:14 INF] Docker Deployment: False
[10:48:14 INF] Config path: C:\Users\chris\Desktop\p2g\configuration.local.json
[10:48:14 INF] *********************************************
[10:48:14 INF] *********************************************
[10:48:14 INF] *********************************************
[10:48:15 INF] Found 3 completed workouts.
[10:48:17 INF] Found 3 workouts remaining after filtering ExcludedWorkoutTypes.
[10:48:17 INF] Converting workouts...
[10:48:17 INF] [@Format] Backed up file Fit
[10:48:17 INF] [@Format] Backed up file Fit
[10:48:17 INF] [@Format] Backed up file Fit
[10:48:17 INF] Uploading workouts to Garmin...
[10:48:18 INF] HTTP Request: POST - https://sso.garmin.com/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed - User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
Origin: https://sso.garmin.com
Referer: https://sso.garmin.com/sso/signin
NK: NT
Cookie: SESSION=f594c718-f05b-4f1f-b2f3-62df7ea103a4; __cf_bm=08fFhIHXL3H.QQJr5HaGjndIshbZ_Xz7WcmAWNhN86Q-1700909297-0-AVru1I/PY8EhNwgT0qRqPGLbeWjkEKYFIcWur3qf7zgvhLFyESOF7+UOlHerfRSrvXB3nk6b2HvHkOXhYk/0uto=; __cflb=0H28vqK2vhBdjKAHtvuCwMDwSuWW87ZJzWmDQTN4Hgg; _cfuvid=Wlnmi6FbYXE1VDPYRz.Hs5R4iXOByvThaDOVROTRVTQ-1700909297652-0-604800000; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en; VCAP_ID=64cc9818-85e1-43b9-4cbc-dd0c
Accept-Encoding: gzip, deflate
[10:48:18 INF] HTTP Response: Unauthorized - POST - https://sso.garmin.com/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed - Date: Sat, 25 Nov 2023 10:48:18 GMT
Transfer-Encoding: chunked
Connection: keep-alive
CF-Ray: 82b95187ddf276bf-LHR
CF-Cache-Status: DYNAMIC
Access-Control-Allow-Origin: https://sso.garmin.com
Set-Cookie: org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en; Path=/, __cfruid=e27f14fc092c01ee27764c4cfb23f10bd54ad432-1700909298; path=/; domain=.sso.garmin.com; HttpOnly; Secure; SameSite=None
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers
Access-Control-Allow-Methods: GET,POST,OPTIONS
X-Application-Context: casServer:cloud,prod,prod-US_Olathe:1
X-B3-Traceid: 091a246fb70cb9f02261ca7226a63a00
X-Robots-Tag: noindex
X-Vcap-Request-Id: fe2311b5-79a3-4946-5027-744ce4c2b958
Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=VFA80k3hDi88ILYMmKO8VRxtHez9fZtU8hadcJusjzAgzRxrYOGsa5QlonUJh5%2FR4I599PRwOaaEolb4Mb8jeeVS4D69ViL5QVFMP4CgvjKQo66IJ0ayhCBNMIJpt9Wb"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
Vary: Accept-Encoding
Server: cloudflare
[10:48:18 ERR] Failed to upload workouts to Garmin Connect. You can find the converted files at ./output \n You can manually upload your files to Garmin Connect, or wait for P2G to try again on the next sync job.
Flurl.Http.FlurlHttpException: Call failed with status code 401 (Unauthorized): POST https://sso.garmin.com/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed
at Flurl.Http.FlurlRequest.HandleExceptionAsync(FlurlCall call, Exception ex, CancellationToken token)
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Flurl.Http.ResponseExtensions.ReceiveString(Task
1 response) at Garmin.ApiClient.SendCredentialsAsync(GarminApiAuthentication auth, Object queryParams, Object loginData, CookieJar jar) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\ApiClient.cs:line 58 at Garmin.Auth.GarminAuthenticationService.RefreshGarminAuthenticationAsync() in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\Auth\GarminAuthenticationService.cs:line 129 at Garmin.Auth.GarminAuthenticationService.GetGarminAuthenticationAsync() in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\Auth\GarminAuthenticationService.cs:line 54 at Garmin.GarminUploader.UploadAsync(String[] files, Settings settings) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\GarminUploader.cs:line 96 at Garmin.GarminUploader.UploadToGarminAsync() in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\GarminUploader.cs:line 84 at Sync.SyncService.SyncAsync(IEnumerable
1 workoutIds, ICollection1 exclude) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Sync\SyncService.cs:line 170 [10:48:18 INF] Done [10:48:18 INF] Sleeping for 86400 seconds...
Beta Was this translation helpful? Give feedback.
All reactions