Skip to content

Conversation

matt-fidd
Copy link
Member

From feedback in #4253

@matt-fidd Some edge cases Ive found testing in my instance.

Old transactions don't pick up the raw data from the sync so only new data is available to use for the mapper. (this is a cause of below)
If there is only data for Payments and not Deposits, you can open the account mapper settings and change to Deposits, but cant change back to Payments. This is because there are no Deposits that have raw data so you get the message about needing data. (The selection box for switching between Payment and Deposit should either always show, or show if either of them have data)

@actual-github-bot actual-github-bot bot changed the title update mapping data for existing synced transactions and always show direction dropdown [WIP] update mapping data for existing synced transactions and always show direction dropdown Feb 18, 2025
Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 8678187
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67b509e0293dff0007e210f6
😎 Deploy Preview https://deploy-preview-4403.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Feb 18, 2025

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
17 6.93 MB → 6.93 MB (+478 B) +0.01%
Changeset
File Δ Size
src/components/banksync/FieldMapping.tsx 📈 +852 B (+20.88%) 3.99 kB → 4.82 kB
src/components/banksync/EditSyncAccount.tsx 📉 -374 B (-5.88%) 6.22 kB → 5.85 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 4.31 MB → 4.31 MB (+478 B) +0.01%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/en-GB.js 99.42 kB 0%
static/js/en.js 100.54 kB 0%
static/js/de.js 111.72 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/nl.js 98.54 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/fr.js 72.19 kB 0%
static/js/workbox-window.prod.es5.js 5.69 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/pt-BR.js 106.43 kB 0%
static/js/uk.js 111.11 kB 0%
static/js/AppliedFilters.js 10.52 kB 0%
static/js/useAccountPreviewTransactions.js 1.69 kB 0%
static/js/narrow.js 85.57 kB 0%
static/js/wide.js 102.8 kB 0%
static/js/ReportRouter.js 1.59 MB 0%

Copy link
Contributor

github-actions bot commented Feb 18, 2025

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.33 MB → 1.33 MB (+138 B) +0.01%
Changeset
File Δ Size
packages/loot-core/src/server/accounts/sync.ts 📈 +436 B (+1.56%) 27.38 kB → 27.8 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.33 MB → 1.33 MB (+138 B) +0.01%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

@matt-fidd matt-fidd requested a review from youngcw February 18, 2025 21:08
@matt-fidd matt-fidd changed the title [WIP] update mapping data for existing synced transactions and always show direction dropdown update mapping data for existing synced transactions and always show direction dropdown Feb 18, 2025
Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Walkthrough

The pull request introduces changes across both the desktop client and server modules. In the desktop client, the EditSyncAccount.tsx file has removed the conditional rendering that previously displayed a message when no mappable fields were found, allowing the FieldMapping component to render directly. Conversely, the FieldMapping.tsx component now implements a conditional rendering mechanism that shows a translated message when the fields array is empty, replacing the static rendering of table headers and rows. In the server module, the sync.ts file modifies the reconcileTransactions function by adding a new property, raw_synced_data, to the updates object, which ensures the preservation or updating of relevant raw data during transaction reconciliation. No alterations to the declarations of exported or public entities have been made.

Suggested labels

:sparkles: Merged

Suggested reviewers

  • youngcw

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7dae019 and 8678187.

📒 Files selected for processing (1)
  • packages/loot-core/src/server/accounts/sync.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/loot-core/src/server/accounts/sync.ts
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: Wait for Netlify build to finish
  • GitHub Check: Analyze

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

youngcw
youngcw previously approved these changes Feb 18, 2025
@matt-fidd
Copy link
Member Author

/update-vrt

Not sure why this would have changed, looks like an issue with the CSV import screen

@youngcw
Copy link
Member

youngcw commented Feb 18, 2025

Hmm. There was a PR I merged earlier that modified the ofx parser. VRT worked there, so it would be strange that the csv page is being weird because of that

@matt-fidd
Copy link
Member Author

Hmm. There was a PR I merged earlier that modified the ofx parser. VRT worked there, so it would be strange that the csv page is being weird because of that

Found it, the importer was finding changes because raw_synced_data was updated from undefined to null

@matt-fidd matt-fidd force-pushed the bank-sync-update-existing branch 5 times, most recently from 381ee1c to 0f4791d Compare February 18, 2025 22:25
@matt-fidd matt-fidd force-pushed the bank-sync-update-existing branch from 0f4791d to 8678187 Compare February 18, 2025 22:29
@matt-fidd matt-fidd requested a review from youngcw February 18, 2025 22:37
@matt-fidd matt-fidd merged commit a4d3f27 into actualbudget:master Feb 18, 2025
21 checks passed
@matt-fidd matt-fidd deleted the bank-sync-update-existing branch February 18, 2025 23:06
lelemm added a commit to lagoom-br/actual that referenced this pull request Feb 20, 2025
* 🐛  Fix Initializing the connection to the local database hang (actualbudget#4375)

* fix initializing to the local db

* release notes

* Add percentage adjustments to schedule templates (actualbudget#4098) (actualbudget#4257)

* add percentage adjustments to schedule templates

* update release note

* remove unecessary parentheses

* Update packages/loot-core/src/server/budget/goalsSchedule.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* PR comments addressed

* Linting fixes

* Updated error handling, added tests

* Linting fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Custom mapping and import settings for bank sync providers (actualbudget#4253)

* barebones UI

* add saving and prefs

* add last sync functionality

* use mapping for synced transactions

* note

* jest -u

* Update VRT

* Coderabbit

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* add new fields

* rename migration, newer in master

* lint

* coderabbit

* update snapshots

* GoCardless handlers fallback and notes

* expose new fields from SimpleFIN

* update tests

* update instructions on GoCardless handlers

* lint

* feedback

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Add fallback value for payeename: 'undefined' - CBC Bank (actualbudget#4384)

* Add fallback value for payename: 'undefined'

* docs: add release note

* Add fallback value for payename: 'undefined' (for negative amounts)

* [TypeScript] Convert test page models to TS (actualbudget#4218)

* Dummy commit

* Delete js snapshots

* Move extended expect and test to fixtures

* Fix wrong commit

* Update VRT

* Dummy commit to run GH actions

* Convert test page models to TS

* Release notes

* Fix typecheck errors

* New page models to TS

* Fix typecheck error

* Fix page name

* Put awaits on getTableTotals

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* rename two migrations to realign with convention (actualbudget#4343)

* Updating sync server package name to @actual-app/sync-server (actualbudget#4370)

* updating sync server to have a consistent package name

* release notes

* Add today button on mobile budget page (actualbudget#4380)

* feat: today button on mobile budget page

Jumps to the current month

* add release note

* cleaner onCurrentMonth

* Update VRT

* use SvgCalendar from icons/v2

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Development mode for sync server (React Fast Refresh on port 5006) (actualbudget#4372)

* devmode for sync server

* removed pluggy from this version

* md

* code review

* changed how open browser

* missed this

* linter

* trigger actions

* 🐛 Fix: Error rate limit at user directory page (actualbudget#4397)

* Error rate limit

* md

* 🐛 Fix new proxy middleware dependency missing on prod build (actualbudget#4400)

* fix new proxy middleware not installed on prod build

* release notes

* Remove deprecated imports for several components (actualbudget#4385)

* don't unbudget goals

* lint

* Fixes actualbudget#4069 : Ignore CSV inOutMode during OFX imports (actualbudget#4382)

* Ignore inOutMode during OFX imports

* Add release notes

---------

Co-authored-by: youngcw <calebyoung94@gmail.com>

* fix tooltip translation (actualbudget#4402)

* [TypeScript] Make `db.runQuery` generic to make it easy to type DB query results (actualbudget#4247)

* Make runQuery generic to make it easy to type DB query results.

* Release notes

* typo

* update mapping data for existing synced transactions and always show direction dropdown (actualbudget#4403)

* update sync mapping data for existing transactions on sync

* show payment direction dropdown regardless of sample data

* note

* ignore changes in raw_synced_data

* Fix top-level types of `send` function (actualbudget#4145)

* Add release notes

* Fix types of `send` function

* Fix `send` types in a number of places

* PR feedback

* Foundations for the budget automations UI (actualbudget#4308)

* Foundations for the budget automations UI

* Coderabbit

* Fix react-hooks/exhaustive-deps error on useSelected.tsx (actualbudget#4258)

* Fix react-hooks/exhaustive-deps error on useSelected.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on usePayees.ts (actualbudget#4260)

* Fix react-hooks/exhaustive-deps error on usePayees.ts

* Rename

* Release notes

* Fix react-hooks/exhaustive-deps error on useAccounts.ts (actualbudget#4262)

* Fix react-hooks/exhaustive-deps error on useAccounts.ts

* Release notes

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx (actualbudget#4273)

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx

* Release notes

* [WIP] BANKS_WITH_LIMITED_HISTORY constant update (actualbudget#4388)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx (actualbudget#4259)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx

* Remove comment in eslint config

* Release notes

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx (actualbudget#4268)

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx

* Release notes

* Fix lint

* Fix react-hooks/exhaustive-deps error on table.tsx (actualbudget#4274)

* Fix react-hooks/exhaustive-deps error on table.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on useCategories.ts (actualbudget#4261)

* Fix react-hooks/exhaustive-deps error on useCategories.ts

* Release notes

* 👷 Typescript: Improving typing of asyncStorage (global-store.json) (actualbudget#4369)

* typing globalprefs

* adding release notes

* unneeded partial

* removing prop that crept in

* 📚 Translation batch #1 (actualbudget#4408)

* Translation batch

* md

* Update packages/desktop-client/src/components/settings/Export.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix code review from coderabbit

* code review

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix currencyToAmount incorrectly converting input (actualbudget#4383)

* fix: ensure currencyToAmount works regardless of the configured number format

* chore: linting

* docs: add release note

* test: ensure correct amount is entered for debit when adding split transactions

* chore: rename variable thousandsSep to thousandsSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename variable decimalSep to decimalSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename decimalSep and thousandsSep variables to decimalSeparator and thousandsSeparator

---------

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* useDisplayPayee hook to unify payee names in mobile and desktop. (actualbudget#4213)

* useDisplayPayee hook to unify payee logic in mobile and desktop

* Release notes

* Fix typecheck errors

* Fix test

* Update test

* Revert (No payee) color

* Fix tests

* VRT

* Fix category transactions

* Fix lint and VRT

* Update VRT

* Translate

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Extract transaction related server handlers from `main.ts` to `server/transactions/app.ts` (actualbudget#4221)

* Move transaction related handlers to server/transactions folder and use the new convention

* Fix lint and typecheck

* Release notes

* Update handler names

* Move get-earliest-transaction

* Update release notes

* Fix tests

* Fix types

* Fix lint

* Update snapshot

* Remove duplicate parse-file.ts

* Fix lint

* 🐛 Fix `On budget` / `Off budget` underline with translated languages (actualbudget#4417)

* Fix `On budget` / `Off budget` underline

* md

* ajuste para o merge

---------

Co-authored-by: Michael Clark <5285928+MikesGlitch@users.noreply.github.com>
Co-authored-by: Matt Farrell <10377148+MattFaz@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Michotte <55855805+MMichotte@users.noreply.github.com>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
Co-authored-by: Adam Stück <adam@adast.dk>
Co-authored-by: Alberto Cortina Eduarte <albertocortina96@gmail.com>
Co-authored-by: Gabriel J. Michael <gabriel.j.michael@gmail.com>
Co-authored-by: Julian Dominguez-Schatz <julian.dominguezschatz@gmail.com>
Co-authored-by: Michał Gołąb <23549913+michalgolab@users.noreply.github.com>
Co-authored-by: Antoine Taillard <an.taillard@gmail.com>
@Korusuke
Copy link

Hey!

Not sure if this is the right place to post (probably should create an issue), but it seems to be related to this PR.

I was testing a side-plugin I am writing to sync Splitwise transactions to Actual, and it was working 2 weeks back but after the latest release it gives the following error:

SyncError: SyncError: invalid-schema
  at apply (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51160:31)
  at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51375:29
  at sqliteTransaction (/path/to/project/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)
  at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33280:35)
  at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43994:77)
  at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51370:50
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  reason: 'invalid-schema',
  meta: {
  error: {
    message: 'no such column: raw_synced_data',
    stack: 'SqliteError: no such column: raw_synced_data\n' +
    '    at Database.prepare (/path/to/project/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)\n' +
    '    at Module.prepare (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33238:27)\n' +
    '    at Module.cache (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43984:87)\n' +
    '    at apply (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51157:100)\n' +
    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51375:29\n' +
    '    at sqliteTransaction (/path/to/project/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)\n' +
    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33280:35)\n' +
    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43994:77)\n' +
    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51370:50\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
  },
  query: {
    sql: 'UPDATE transactions SET raw_synced_data = ? WHERE id = ?',
    params: [Array]
  }
  }
}
Full error details {
  message: 'SyncError: invalid-schema',
  reason: 'invalid-schema',
  meta: {
  error: {
    message: 'no such column: raw_synced_data',
    stack: 'SqliteError: no such column: raw_synced_data\n' +
    '    at Database.prepare (/path/to/project/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)\n' +
    '    at Module.prepare (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33238:27)\n' +
    '    at Module.cache (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43984:87)\n' +
    '    at apply (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51157:100)\n' +
    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51375:29\n' +
    '    at sqliteTransaction (/path/to/project/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)\n' +
    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33280:35)\n' +
    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43994:77)\n' +
    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51370:50\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
  },
  query: {
    sql: 'UPDATE transactions SET raw_synced_data = ? WHERE id = ?',
    params: [Array]
  }
  }
}
Error
  at handlers.api/download-budget (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:37763:27)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
node:internal/process/promises:288
      triggerUncaughtException(err, true /* fromPromise */);
      ^

Error
  at handlers.api/download-budget (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:37763:27)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.19.1

I am using the actual-api node package, I am not sure if that needs to be updated or if I am doing something wrong. Let me know if I should add the relevant code here as well, or if you want me to create a Bug issue for this.

Thanks!

@matt-fidd
Copy link
Member Author

Hey!

Not sure if this is the right place to post (probably should create an issue), but it seems to be related to this PR.

I was testing a side-plugin I am writing to sync Splitwise transactions to Actual, and it was working 2 weeks back but after the latest release it gives the following error:


SyncError: SyncError: invalid-schema

  at apply (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51160:31)

  at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51375:29

  at sqliteTransaction (/path/to/project/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)

  at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33280:35)

  at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43994:77)

  at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51370:50

  at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

  reason: 'invalid-schema',

  meta: {

  error: {

    message: 'no such column: raw_synced_data',

    stack: 'SqliteError: no such column: raw_synced_data\n' +

    '    at Database.prepare (/path/to/project/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)\n' +

    '    at Module.prepare (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33238:27)\n' +

    '    at Module.cache (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43984:87)\n' +

    '    at apply (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51157:100)\n' +

    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51375:29\n' +

    '    at sqliteTransaction (/path/to/project/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)\n' +

    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33280:35)\n' +

    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43994:77)\n' +

    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51370:50\n' +

    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'

  },

  query: {

    sql: 'UPDATE transactions SET raw_synced_data = ? WHERE id = ?',

    params: [Array]

  }

  }

}

Full error details {

  message: 'SyncError: invalid-schema',

  reason: 'invalid-schema',

  meta: {

  error: {

    message: 'no such column: raw_synced_data',

    stack: 'SqliteError: no such column: raw_synced_data\n' +

    '    at Database.prepare (/path/to/project/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)\n' +

    '    at Module.prepare (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33238:27)\n' +

    '    at Module.cache (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43984:87)\n' +

    '    at apply (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51157:100)\n' +

    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51375:29\n' +

    '    at sqliteTransaction (/path/to/project/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)\n' +

    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:33280:35)\n' +

    '    at Module.transaction (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:43994:77)\n' +

    '    at /path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:51370:50\n' +

    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'

  },

  query: {

    sql: 'UPDATE transactions SET raw_synced_data = ? WHERE id = ?',

    params: [Array]

  }

  }

}

Error

  at handlers.api/download-budget (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:37763:27)

  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

node:internal/process/promises:288

      triggerUncaughtException(err, true /* fromPromise */);

      ^



Error

  at handlers.api/download-budget (/path/to/project/node_modules/@actual-app/api/dist/app/bundle.api.js:37763:27)

  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)



Node.js v18.19.1

I am using the actual-api node package, I am not sure if that needs to be updated or if I am doing something wrong. Let me know if I should add the relevant code here as well, or if you want me to create a Bug issue for this.

Thanks!

Hi!

The stable version of the API does not work with edge versions of the app if the database schema changes between versions (like it has here). You can either build the API from master or wait until v25.3 is released at the start of next month, at which point the schemas will be aligned again.

We do not recommend using the API with edge tag instances for this reason.

@Korusuke
Copy link

Oh okey. Thanks a lot for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants