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

[Bug]: Account linking process with Gocardless times out before completion #4460

Open
1 task done
andregulbrandsen opened this issue Feb 26, 2025 · 13 comments
Open
1 task done
Labels
bank sync Related to automatic bank syncing bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed user interface Related to the user interface

Comments

@andregulbrandsen
Copy link

andregulbrandsen commented Feb 26, 2025

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

After having added secrets from Gocardless to Actual and trying to create a new linked account or link an existing account (both equally end with the same problem) a new tab opens for Gocardless. I go through the regular process and end up authenticating and authorizing the connection with my bank. After successfully authorizing the connection, the tab hangs for several minutes (normally ~15 minutes) before closing. After 10 minutes (ie. before the bank tab closes) the Actual tab reports that the process has timed out.

I have verified that Gocardless can connect to my bank as it works in the Gocardless developer portal. I reached out to Gocardless support that verified my connection and told me that authorization with the bank works fine and that they succesfully get data back from my linking request, but before that happens, Actual has timed out. Gocardless suggests increasing the time-out window to allow for a slow integration between Gocardless and the bank. I have tried setting a starting balance on the account in the hopes that that would reduce the number of transactions and thus reduce the required time frame for linking, but it makes no difference.

I have attempted to reach out to the Discord community to no avail.

How can we reproduce the issue?

Link an existing account or create a new linked account. Go through the process and if the loading from the bank back to Gocardless takes more than 10 minutes, Actual times out regardless of (later) success.

I've tried both with local docker hosting as well as Pikapods. I've tried with multiple browsers; Edge, Chrome, Firefox and Edge Android, same result.

Where are you hosting Actual?

Pikapods

What browsers are you seeing the problem on?

Microsoft Edge

Operating System

Windows 11

@andregulbrandsen andregulbrandsen added the bug Something isn't working label Feb 26, 2025
@Scandiravian
Copy link

I'm experiencing the same issue with "bank sync". I have three linked accounts and each time I try to sync them, at most one of the accounts are getting synced.

@PhilippCh
Copy link

Same thing happens for me since today. Yesterday the initial linking was working fine, today - testing in a new Actual instance, it stays forever on the 'Waiting for GoCardless' screen with tons of POST requests to /account-data in the server logs.

Image

@bheart3k
Copy link

Same thing for me. I am able to synchronize ing, but Ibercaja (spain bank) always ends up in time out.

@andregulbrandsen
Copy link
Author

andregulbrandsen commented Mar 11, 2025

Issue persists in v25.3.1. Have not found a workaround.

@MatissJanis
Copy link
Member

👋 Hey folks!

Have you reached out to gocardless about the issue? If they don't "ping" back Actual with success status then there is not much we can do on our end.

@MatissJanis MatissJanis added the needs info We need more information from the OP before continuing label Mar 28, 2025
@andregulbrandsen
Copy link
Author

@MatissJanis thanks for reaching out on this issue. I have indeed been in touch with gocardless about this. From what I understood, they are returning a positive signal, but not until they get the load from the bank, by which time Actual has already timed out and is no longer listening for data from Gocardless. I'm more than happy to provide additional details, but would need some guidance on what you need and how to gather the information.

@MatissJanis
Copy link
Member

That's very helpful; thanks!

The timeout logic is here:

if (Date.now() - startTime >= 1000 * 60 * 10) {

It's currently set to 10 minutes - which is already quite long. I would find it surprising if raising it even more solved the issue.

@andregulbrandsen
Copy link
Author

andregulbrandsen commented Mar 28, 2025

What would be the best way to verify if it does indeed help to increase the timeout for someone not well versed in the technical components involved in building the app from source?

@MatissJanis
Copy link
Member

@andregulbrandsen you can use this demo link. I raised the timeout to 1h there.

Link it to your server and try running bank sync. Just remember to back-up your budget file before doing that in case something goes wrong.

Though - even if this does in fact solve the issue for you - I don't think we'd merge the change. 1h timeout is an absurdly long time.

@andregulbrandsen
Copy link
Author

@MatissJanis Just tested with the demo link, and would you know, after ~12 mins it linked the accounts just beautifully :D Perhaps merging with 1h timeout is excessive, but extending perhaps to 20 minutes would help with scenarios such as mine? Or even better some kind of mechanism for use configurable timeout for these corner cases?

@MatissJanis
Copy link
Member

20 minutes is quite excessive too. TBH I find the current timeout of 10 minutes too high as well. Nobody should be forced to wait so long for the accounts to link.

However, I get that GoCardless sometimes is exceptionally slow due to downstream bank constraints.. so I think a good solution here would be to keep (or possibly reduce) the default 10 minute timeout. And then have a better handling of the timeout. Instead of fully stopping the polling operation - continue doing it, but add another informational message to the UI. Something along the lines of:

Linking this account is taking longer than expected. You can keep this page open with hopes that eventually it will work, but it's quite likely that something has gone wrong downstream in Gocardless and thus linking this account at this time is not possible.

@andregulbrandsen
Copy link
Author

I think that's a fair solution, as it will keep the user informed while still allowing for extremely slow cases such as mine. Perhaps add a note that the user should reach out to gocardless for support?

@MatissJanis MatissJanis added good first issue Good for newcomers help wanted Extra attention is needed user interface Related to the user interface bank sync Related to automatic bank syncing and removed needs info We need more information from the OP before continuing labels Mar 31, 2025
@MatissJanis
Copy link
Member

Yea, I think that's a good idea. Either way - I'm not committing to doing this myself. We now have a proposed path forward and anyone in the community can pick this up an send a PR with the improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bank sync Related to automatic bank syncing bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed user interface Related to the user interface
Projects
None yet
Development

No branches or pull requests

5 participants