Closed petelacey closed 2 years ago
I am receiving a similar message. On a Raspberry Pi Zero running nerves (1.7.13) Elixir 1.13.2 Goth 1.3.0-rc.3
As soon as the device boots (after a fresh firmware update) I see this message repeated for some period of time (perhaps 1-2 minutes) then it appears to resolve and cease.
I was able to reproduce the exact same error by turning my clock backwards for couple hours and starting Goth. It makes sense, the token would be way in the past and so Google rejects it with 400. I believe something like this might happen when a computer wakes up from the sleep, it'd use the "old" clock for a while before it catches up with NTP and such.
There's nothing we can do about this particular error per se. What we can do is improve our retry logic to be more robust and give the system more time to self heal.
Closing in favour of #123.
This is most likely an issue on my end, but the solution is not obvious to me.
I previously used Goth 1.2 without any issues. After upgrading to 1.3.0-rc.3 and configuring it exactly as the readme says, I have the following problem.
When developing, if my laptop suspends for longer than the token expiration window, when resuming, Goth will attempt to get a token from Google using the already expired cached refresh token. Google replies with a 400, which causes Goth to raise and fail. However, when the supervisor restarts it, Goth does not ask for a new token using the service account credentials, but instead uses the stale refresh token again. This repeats every second until I restart the app.
At least that's how it appears to me.
Here's what I see in my logs. Formatted for legibility:
Any assistance you can give would be appreciated.