frappe / books

Free Accounting Software
https://frappe.io/books
GNU Affero General Public License v3.0
2.68k stars 614 forks source link

Error when loading DB generated from other user account in the same computer #895

Open maulanalubis opened 1 month ago

maulanalubis commented 1 month ago

Description

In my computer, my wife and I have separate login accounts in our macbook, my account is admin and her account is standard. She use the frappe books most of the time so basically the database is based on her activities in her folders login account.

When I open the Frappe Books from my account, the app showing a page where you select create new company or select existing database --instead of using the same database from the other login account (is this expected from frappe books that we can not use db from different login account in the same machine?).

So I copied the DB and move it to the shared location, then I select the DB from the shared location (we both have the ability to Read & Write files on that location). Then the error displayed.

image

(the image is showing a different error than before, probably because I copy/delete, moving the DB location here and there multiple times. Previously the error was not as clean as this)

Any help? big thanks

ah... found the same error message

image

Env: macbook pro OS Sonoma 14.4.1 FB version 0.21.2

Steps to Reproduce

  1. create new login account (standard) in computer
  2. login computer using the new account
  3. open the frappe books
  4. select existing company
  5. select books.db from the existing transactions of other

Info

Error: DatabaseError: SqliteError update SingleValue set value = 48, modifiedBy = 'SYSTEM', modified = '2024-05-18T17:32:20.193Z' where parent = 'Misc' and fieldname = 'openCount' - attempt to write a readonly database

Stack:


SqliteError: update `SingleValue` set `value` = 48, `modifiedBy` = '__SYSTEM__', `modified` = '2024-05-18T17:32:20.193Z' where `parent` = 'Misc' and `fieldname` = 'openCount' - attempt to write a readonly database
    at Client_BetterSQLite3._query (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/dialects/better-sqlite3/index.js:39:38)
    at executeQuery (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)
    at Client_BetterSQLite3.query (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/client.js:146:12)
    at Runner.query (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/execution/runner.js:123:36)
    at ensureConnectionCallback (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)
    at Runner.ensureConnection (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/execution/runner.js:300:20)
    at Runner.run (/Applications/Frappe Books.app/Contents/Resources/app.asar/node_modules/knex/lib/execution/runner.js:30:19)
    at _DatabaseCore.