Closed RobertWojtowicz closed 4 years ago
Looks like Garmin is having performance issues? Once it is possible to load the data, once not :( It looks like Garmin is temporarily banning the number of sessions and public IP addresses ?
I never encountered a similar error, but this is not officially supportet, so this is maybe the fault. Do you have another thought on this?
I did the tests again, unfortunately now I have the same errors. Regardless of whether I run it through my script or manually from the command line. I can send it for a few tries.
Maybe it would be good to compile a version with all dependent libraries ?, just do not know how to do it.
This looks like a communication problem with additional libraries ("github.com/abrander/garmin-connect", "github.com/tormoder/fit", "github.com/davidkroell/bodycomposition", "golang.org/x/crypto/ssh/terminal "," github.com/spf13/cobra", "github.com/davidkroell/bodycomposition/cmd") or with Garmin Connect (throttling cloud?), because today I sent correctly after 4 attempt.
For example, the 7th time it was not possible to send another sample (3 next samples the same errors - from this topic), but this time Garmin temporarily banned me (Authentication failed).
I found a total of three types of failure messages:
Garmin temporarily banned: ... uploading weight Authentication failed
Problem with bodycomposition and dependent libraries ? ... uploading weight panic: social profile not found in HTML
Problem with bodycomposition and dependent libraries ? ... uploading weight panic: forbidden
I am thinking with my colleague about the condition if the program displays only "... uploading weight" without any additional characters, we assume that the file has been sent correctly and is archived so as not to send it again. If there are additional information, do not archive, but retry sending in 1 minute (cron)
Hi, @RobertWojtowicz
I currently work on improving this CLI tool, since a dependent library got an awesome update (with API change). Furthermore I worked on this issue and asked the maintainer or the dependecy.
I also implemented a more convienient error handling and came to the point that maybe a parameter --max-tries
or something would overcome this issue. Just try as long as it works 🤔
Regards, David
Currently I have created a workaround in a script and checked for errors: https://github.com/RobertWojtowicz/miscale2garmin/blob/master/import_mqtt.sh
Ok, this should no longer be necessary if the new version is released. I also want to add a non-zero exit status in case of error for better third-party integration
What do you think about such a parameter?
I don't fully understand, but it sounds good :)
Okay, I'm waiting for the new version, when it's ready, I will test it :)
Everything works fine, I have improved my scripts for the new version. I also checked -max-tries parameter, it works fine, but it's easy to get banned by Garmin :)
panic: social profile not found in HTML
goroutine 1 [running]: github.com/davidkroell/bodycomposition.BodyComposition.uploadFitFile(0x0, 0xed6e53c22, 0xc9f1c0, 0x404cc66666666666, 0x402a8a3d70a3d70a, 0x404dc00000000000, 0x4012000000000000, 0x40548f5c28f5c28f, 0x4013eb851eb851ec, 0x4018000000000000, ...) /home/davidk/go/src/github.com/davidkroell/bodycomposition/main.go:78 +0x1c4 github.com/davidkroell/bodycomposition.BodyComposition.UploadWeight(0x0, 0xed6e53c22, 0xc9f1c0, 0x404cc66666666666, 0x402a8a3d70a3d70a, 0x404dc00000000000, 0x4012000000000000, 0x40548f5c28f5c28f, 0x4013eb851eb851ec, 0x4018000000000000, ...) /home/davidk/go/src/github.com/davidkroell/bodycomposition/main.go:97 +0x21d github.com/davidkroell/bodycomposition/cmd.glob..func1(0xc12e80, 0xc000084b00, 0x0, 0x16) /home/davidk/go/src/github.com/davidkroell/bodycomposition/cmd/upload.go:47 +0x4a6 github.com/spf13/cobra.(Command).execute(0xc12e80, 0xc0000849a0, 0x16, 0x16, 0xc12e80, 0xc0000849a0) /home/davidk/go/src/github.com/spf13/cobra/command.go:845 +0x2ae github.com/spf13/cobra.(Command).ExecuteC(0xc12be0, 0xc000080100, 0xc000080100, 0xc000080100) /home/davidk/go/src/github.com/spf13/cobra/command.go:946 +0x318 github.com/spf13/cobra.(*Command).Execute(...) /home/davidk/go/src/github.com/spf13/cobra/command.go:886 github.com/davidkroell/bodycomposition/cmd.Execute() /home/davidk/go/src/github.com/davidkroell/bodycomposition/cmd/root.go:24 +0x32 main.main() /home/davidk/go/src/github.com/davidkroell/bodycomposition/cmd/bodycomposition/main.go:8 +0x20