Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maulanalubis opened this issue May 19, 2024 · 1 comment

Comments

@maulanalubis
Copy link

maulanalubis commented May 19, 2024

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.
@vanpariyar
Copy link

vanpariyar commented Oct 5, 2024

Does your db file have write permission?

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

No branches or pull requests

2 participants