[Bug]: When using API / Third Party Service, Error is throw on Actual API #1619

Closed
opened 2026-02-28 19:48:56 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @delize on GitHub (Nov 25, 2024).

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

When using AI Categorizer, a bug is thrown on the API js file:

$ docker logs -f actual-budget-actual-ai-1                           [22:45:38]

> @sakowicz/actual-ai@1.2.1 prod
> node dist/app.js

Creating model for provider: openai
Application started
Starting classification process
Loading fresh spreadsheet
Syncing since 2024-11-11T19:13:11.782Z-0B0A-9a4fb01dc1f12cbb 0 (attempt: 0)
Got messages from server 4560
Budget downloaded
Syncing bank accounts
Bank accounts synced
1/36 Processing transaction NAMEHERE I NAMEHERE / -422700
Syncing since 2024-11-25T21:45:37.897Z-0003-910c580594eb0e9b 6 (attempt: 0)
Got messages from server 0
1/36 Guess: BRF
2/36 Processing transaction NAMEHERE / NAMEHERE / -419900
/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39219
                        throw new Error(`“${field}” is required for table “${table}”: ${JSON.stringify(obj)}`);
                              ^

Error: “account” is required for table “transactions”: {"id":"b821bf2f-1cee-43c4-932b-e9d0c080ea52","starting_balance_flag":null,"cleared":null}
    at /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39219:31
    at Array.map (<anonymous>)
    at conform (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39209:60)
    at convertForUpdate (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39270:24)
    at updateWithSchema (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:43827:93)
    at Module.updateTransaction (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:44188:24)
    at /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:36664:68
    at Array.map (<anonymous>)
    at /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:36655:51
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.20.5

This in turn caused a different issue, as the tool would constantly attempt to run a sync on every startup, causing me to hit rate-limits.

When opening up a Github Issue with the dev, they mentioned that this is likely due to a new version.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome, Other

Operating System

Linux

Originally created by @delize on GitHub (Nov 25, 2024). ### Verified issue does not already exist? - [X] I have searched and found no existing issue - [X] I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file) ### What happened? When using [AI Categorizer](https://github.com/sakowicz/actual-ai), a bug is thrown on the API js file: ``` $ docker logs -f actual-budget-actual-ai-1 [22:45:38] > @sakowicz/actual-ai@1.2.1 prod > node dist/app.js Creating model for provider: openai Application started Starting classification process Loading fresh spreadsheet Syncing since 2024-11-11T19:13:11.782Z-0B0A-9a4fb01dc1f12cbb 0 (attempt: 0) Got messages from server 4560 Budget downloaded Syncing bank accounts Bank accounts synced 1/36 Processing transaction NAMEHERE I NAMEHERE / -422700 Syncing since 2024-11-25T21:45:37.897Z-0003-910c580594eb0e9b 6 (attempt: 0) Got messages from server 0 1/36 Guess: BRF 2/36 Processing transaction NAMEHERE / NAMEHERE / -419900 /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39219 throw new Error(`“${field}” is required for table “${table}”: ${JSON.stringify(obj)}`); ^ Error: “account” is required for table “transactions”: {"id":"b821bf2f-1cee-43c4-932b-e9d0c080ea52","starting_balance_flag":null,"cleared":null} at /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39219:31 at Array.map (<anonymous>) at conform (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39209:60) at convertForUpdate (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:39270:24) at updateWithSchema (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:43827:93) at Module.updateTransaction (/opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:44188:24) at /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:36664:68 at Array.map (<anonymous>) at /opt/node_app/node_modules/@actual-app/api/dist/app/bundle.api.js:36655:51 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v18.20.5 ``` This in turn caused a different issue, as the tool would constantly attempt to run a sync on every startup, causing me to hit rate-limits. When opening up a [Github Issue with the dev](https://github.com/sakowicz/actual-ai/issues/45), they mentioned that this is likely due to a new version. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Chrome, Other ### Operating System Linux
GiteaMirror added the bug label 2026-02-28 19:48:56 -06:00
Author
Owner

@youngcw commented on GitHub (Nov 25, 2024):

Have you reached out to to the categorizer dev? It looks like the api is not being used properly, or that you aren't passing in some needed value.

@youngcw commented on GitHub (Nov 25, 2024): Have you reached out to to the categorizer dev? It looks like the api is not being used properly, or that you aren't passing in some needed value.
Author
Owner

@delize commented on GitHub (Nov 25, 2024):

Yes, near the bottom of my post, I have linked the GitHub issue in their repo.

On mobile so a bit more of a struggle to copy and paste atm.

@delize commented on GitHub (Nov 25, 2024): Yes, near the bottom of my post, I have linked the GitHub issue in their repo. On mobile so a bit more of a struggle to copy and paste atm.
Author
Owner

@youngcw commented on GitHub (Nov 25, 2024):

make sure both server and api are the same version, but other than that you will need to work with that dev, or reach out on discord for tech support.

@youngcw commented on GitHub (Nov 25, 2024): make sure both server and api are the same version, but other than that you will need to work with that dev, or reach out on discord for tech support.
Author
Owner

@delize commented on GitHub (Nov 26, 2024):

I did reach out on discord, and was asked to make a issue by one of the other members/contributors.

@delize commented on GitHub (Nov 26, 2024): I did reach out on discord, and was asked to make a issue by one of the other members/contributors.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1619