You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While migrating db from v3 was successful on my Taohe M4, on my 2018 Sequoia I7 I got the following error when selected the same Dropbox folder after clicking on Open Storage:
Error invoking remote method 'db:relaod': Error: dlopen(/Applications/massCode.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node, 0x0001): tried: '/Applications/massCode.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/massCode.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (no such file), '/Applications/massCode.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64'))
First, an SQLite database cannot be opened for writing by multiple applications at the same time, because SQLite uses a lock file to prevent concurrent writes. Second, the error you see is not related to the database itself — SQLite database files are cross-platform and architecture-independent. The issue comes from the better-sqlite3 native module: it was compiled for ARM when you first ran the app, and it cannot be loaded when you try to run the Intel (x86) build.
I reported the bug because in v3 sharing a db between different machines with different architecture was possible with no problem. I was also sharing the same db between intel and arm with other people with no problems on v3.. it should be possible since it's still possible until intel machines are around..
Activity
antonreshetov commentedon Oct 1, 2025
This is not a bug.
First, an SQLite database cannot be opened for writing by multiple applications at the same time, because SQLite uses a lock file to prevent concurrent writes. Second, the error you see is not related to the database itself — SQLite database files are cross-platform and architecture-independent. The issue comes from the
better-sqlite3native module: it was compiled for ARM when you first ran the app, and it cannot be loaded when you try to run the Intel (x86) build.subfighter3 commentedon Oct 1, 2025
I reported the bug because in v3 sharing a db between different machines with different architecture was possible with no problem. I was also sharing the same db between intel and arm with other people with no problems on v3.. it should be possible since it's still possible until intel machines are around..
antonreshetov commentedon Oct 1, 2025
In version 3, the database was simply json. In v4, it is an sqlite database. It's a little different.
subfighter3 commentedon Oct 1, 2025
basically it's better to stay on v3 in order to share a db between different architectures? this limitation it's a bit of a pity