question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How can I use Jest-dynamodb in Apple Silicon?

See original GitHub issue

Dynamodb-local seems to be not compatible with Apple Silicon

Dec 24, 2021 9:26:36 PM com.almworks.sqlite4java.Internal log WARNING: [sqlite] cannot open DB[1]: com.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: /private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 0x0001): tried: '/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/libsqlite4java-osx.dylib' (no such file) Dec 24, 2021 9:26:36 PM com.almworks.sqlite4java.Internal log SEVERE: [sqlite] SQLiteQueue[]: error running job queue com.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: /private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 0x0001): tried: '/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/libsqlite4java-osx.dylib' (no such file) at com.almworks.sqlite4java.SQLite.loadLibrary(SQLite.java:97) at com.almworks.sqlite4java.SQLiteConnection.open0(SQLiteConnection.java:1441) at com.almworks.sqlite4java.SQLiteConnection.open(SQLiteConnection.java:282) at com.almworks.sqlite4java.SQLiteConnection.open(SQLiteConnection.java:293) at com.almworks.sqlite4java.SQLiteQueue.openConnection(SQLiteQueue.java:464) at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:641) at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623) at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77) at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205) at java.base/java.lang.Thread.run(Thread.java:833) ...

According to the log, sqlite4java cannot find the corresponding support platform for Apple Silicon - (fat file, but missing compatible architecture (have ‘i386,x86_64’, need ‘arm64e’)

As the last update of the sqlite4db was before Apple M1 release, Jest-dynamodb is based on dynamodb-local which is based on sqlite4db.

Is there any suggestion on how to solve this issue? is it possible to wrap the docker version for the Jest-dynamodb?

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
joseph-socommented, Jan 3, 2022

For those who read this thread, I just found the other “fix” - there is a community build for the sqlite4java for M1. Download it from https://search.maven.org/artifact/io.github.ganadist.sqlite4java/libsqlite4java-osx-arm64/1.0.392/dylib and replace ibsqlite4java-osx.dylib. (use it as your own risk)

Slightly details instruction https://www.josephso.dev/using-jest-dynamodb-in-apple-silicon-platform-workaround/#community-build

0reactions
tim-phillipscommented, Oct 3, 2022

For future readers, jest-dynamodb works fine on my Apple Silicon M1 machine in Oct 2022.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Jest-Dynamodb in Apple Silicon Platform Workaround
I have received a new 14″ Macbook Pro with M1 Pro CPU from work. I don't experience any issue with macOS applications, ...
Read more >
Dynamodb local setup on M1 apple silicon mac
I was able to run DynamoDB installing a java version x86-64 architecture rather than arm64 and starting it up from a rosetta terminal...
Read more >
Using with DynamoDB
First, install @shelf/jest-dynamodb · Specify preset in your Jest configuration: · Create jest-dynamodb-config.js and define DynamoDB tables.
Read more >
DynamoDB-local on Apple Silicon
It allows you to run a local instance of the data store, and is perfect for use in unit tests to validate correctness...
Read more >
shelfio/jest-dynamodb: Jest preset for ...
If your jest-dynamodb-config.js file is not located at {cwd}/jest-dynamodb-config.js or you are using nested jest projects , you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found