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

SQLCipher path errors with incorrect system architecture detection #111

Open
saintsatplay2015 opened this issue Jun 15, 2023 · 0 comments
Open

Comments

@saintsatplay2015
Copy link

I am encountering an issue with the sqlcipher module throwing up an error, when used in the Capacitor/SQLite plugin for publishing through Electron as detailed here: capacitor-community/sqlite#421

The dependency error is reported as follows:

Cannot find module '/Volumes/Projects/htdocs/electron-ionic/ionic-sqlite/electron/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node

When I check the electron directory for this path I get the following:

/Volumes/Projects/htdocs/electron-ionic/ionic-sqlite/electron/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-x64/node_sqlite3.node

The installed binding directory is napi-v6-darwin-x64 NOT napi-v6-darwin-arm64.

This issue appears to relate with incorrectly determining the MacOS Ventura/M1 chip MacBook architecture:

Screenshot 2023-05-26 at 18 05 08

Unfortunately, this is also able to be replicated on an Intel based Mac system with the following stats:

  • Mac OS
  • Monterey 12.4
  • Intel Quad-Core i7
  • MB Pro 2016

In this instance, when attempting to run the npm run electron:start command (for the project related to capacitor-community/sqlite#421 I get the following error:

intel-chip-mac-issue-1

However this time there is NO directory being generated in the location where the error occurs:

intel-chip-mac-issue-2

In each instance the sqlcipher does not contain the correct expected directory reference (that the error throws up).

Is there a workaround/solution to this?

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

1 participant