[Bug]: GoCardless token expires before completion on long imports #3590
Labels
bank sync
Related to automatic bank syncing
bug
Something isn't working
help wanted
Extra attention is needed
server
Verified issue does not already exist?
What happened?
Hello,
When importing accounts with a long history (390 days) and a lot of transactions, the GoCardless JWT token actually expires before the sync completes, but isn't refreshed in all the operations that make API calls to GoCardless, leading to an exception in the logs and the UI crashing (and the account never being imported).
Here's the relevant part of the stacktrace:
I imagine this can crash in multiple places, but we can see for example in the getDetailedAccount call, it doesn't call setToken.
I don't see any downsides to calling setToken before each API call (especially if the expiration time is cached so it doesn't need to be decoded every time), so that should fix the issue, unfortunately I don't have the infrastructure setup to test the fix myself.
Thanks.
Where are you hosting Actual?
Docker
What browsers are you seeing the problem on?
Any
Operating System
Any
The text was updated successfully, but these errors were encountered: