[PR #4007] [CLOSED] Fix sync errors when Simplefin account removed #58802

Closed
opened 2026-05-06 23:32:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4007
Author: @greatwitenorth
Created: 12/18/2024
Status: Closed

Base: masterHead: fix-simplefin-unlinked-account-error


📝 Commits (3)

  • b948467 first check to see if download is empty to prevent failure
  • 863095d added release note
  • d21e590 Merge branch 'master' into fix-simplefin-unlinked-account-error

📊 Changes

2 files changed (+10 additions, -0 deletions)

View changed files

📝 packages/loot-core/src/server/accounts/sync.ts (+4 -0)
upcoming-release-notes/4007.md (+6 -0)

📄 Description

Recently I had to remove and then add again my bank account in the Simplefin admin due to syncing issues on their end. Once I completed this, I tried syncing my accounts before relinking them and the sync just hung, showing the message "Syncing 18 accounts remaining". The console revealed this error:

sync.ts:856 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'error_code')
    at gZ (sync.ts:856:18)
    at async _7.simplefin-batch-sync (main.ts:1181:15)
gZ @ sync.ts:856
await in gZ
_7.simplefin-batch-sync @ main.ts:1181
await in _7.simplefin-batch-sync
oZ @ mutators.ts:67

It seems like once there are orphaned accounts in my Actual database which don't exist anymore in Simplefin, that the sync fails completely.

I've added in a check to ensure that download is not empty before proceeding. This seems to resolve the issue.

Note, this also surfaced another issue with Simplefin where if there was a single missing account, it would return all accounts as missing. This has been reported to them and resolved.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/4007 **Author:** [@greatwitenorth](https://github.com/greatwitenorth) **Created:** 12/18/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-simplefin-unlinked-account-error` --- ### 📝 Commits (3) - [`b948467`](https://github.com/actualbudget/actual/commit/b9484678827b85bb280a2c87e78b067a3a4fea96) first check to see if download is empty to prevent failure - [`863095d`](https://github.com/actualbudget/actual/commit/863095d96f63e1b79d3ee56f6d59e218428b8548) added release note - [`d21e590`](https://github.com/actualbudget/actual/commit/d21e590313de8a1c0abb67b6822a8098fd3cd8d2) Merge branch 'master' into fix-simplefin-unlinked-account-error ### 📊 Changes **2 files changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/accounts/sync.ts` (+4 -0) ➕ `upcoming-release-notes/4007.md` (+6 -0) </details> ### 📄 Description Recently I had to remove and then add again my bank account in the Simplefin admin due to syncing issues on their end. Once I completed this, I tried syncing my accounts before relinking them and the sync just hung, showing the message "Syncing 18 accounts remaining". The console revealed this error: ``` sync.ts:856 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'error_code') at gZ (sync.ts:856:18) at async _7.simplefin-batch-sync (main.ts:1181:15) gZ @ sync.ts:856 await in gZ _7.simplefin-batch-sync @ main.ts:1181 await in _7.simplefin-batch-sync oZ @ mutators.ts:67 ``` It seems like once there are orphaned accounts in my Actual database which don't exist anymore in Simplefin, that the sync fails completely. I've added in a check to ensure that `download` is not empty before proceeding. This seems to resolve the issue. Note, this also surfaced another issue with Simplefin where if there was a single missing account, it would return **all** accounts as missing. This has been reported to them and resolved. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 23:32:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#58802