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

Cannot launch DynamoDB on Mac M1 architecture #277

Open
henhal opened this issue Dec 17, 2021 · 15 comments
Open

Cannot launch DynamoDB on Mac M1 architecture #277

henhal opened this issue Dec 17, 2021 · 15 comments

Comments

@henhal
Copy link
Contributor

henhal commented Dec 17, 2021

Actual Behaviour

When running dynamodb locally on my Macbook M1 Pro 2021 I get an unsatisifed link due to sqlite libs not being available for my archiecture:

Caused by: java.lang.UnsatisfiedLinkError: /foo/.dynamodb/DynamoDBLocal_lib/libsqlite4java-osx.dylib: 
dlopen(/foo/.dynamodb/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 0x0001): tried: 
'/foo/.dynamodb/DynamoDBLocal_lib/libsqlite4java-osx.dylib' 
(fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), 
'/usr/local/lib/libsqlite4java-osx.dylib' (no such file), '/usr/lib/libsqlite4java-osx.dylib' (no such file)

Expected Behaviour

Should start DynamoDB java program

Steps to reproduce it

Add steps to reproduce bugs or add information on the place where the feature should be implemented. Add links to a sample deployment or code.

LogCat for the issue

Provide logs for the crash here

Screenshots of the issue

Where-ever possible attach a screenshot of the issue.

Would you like to work on the issue?

Please let us know if you can work on it or the issue should be assigned to someone else.

@AndrewKeig
Copy link

AndrewKeig commented Dec 29, 2021

👍

1 similar comment
@patricksalazar
Copy link

+1

@StampixSMO
Copy link

Can confirm this issue

@henhal
Copy link
Contributor Author

henhal commented Jan 13, 2022

This module uses dynamodb-localhost to start the DynamoDB local Java program.
I created an issue for adding support for dockerized DynamoDB, which resolves the problem: 99x/dynamodb-localhost#63
I also posted an early PR that fixes it. Feel free to vote on it if this would be a good setup for you too @AndrewKeig @patricksalazar @StampixSMO

@ikeller96
Copy link

I'm having the same issue. Are there any plans to provide the missing SQLite libraries in the future or do I just need to start using docker to test locally?

@terozio
Copy link

terozio commented May 11, 2022

I think the necessary fix has been implemented in dynamodb-localhost with 99x/dynamodb-localhost#64

Is there anyone maintaining this project and willing to make a new release to get the necessary changes included? Now the readme of this project as been already updated to indicate that docker support is in place, but thats not the case for the latest version available from npm.

@terozio
Copy link

terozio commented May 31, 2022

@AshanFernando would it be possible to create a new release for this?

@VirtualVirtuoso
Copy link

Same issue here, when running via Docker or Java. Been searching for a workaround for the past three hours, but unfortunately nothing has come up. If anyone knows a workaround, or a fix, it'd be really appreciated.

@henhal
Copy link
Contributor Author

henhal commented Jun 13, 2022

@VirtualVirtuoso It's a shame this pair of PRs seem to have got stuck. All that's needed is that dynamodb-localhost @0.0.10 is published so that I - or a maintainer - can make a PR to use that version from this repo. @AshanFernando I think you are the maintainer of dynamodb-localhost, would you mind publishing it so that we can proceed?

In the meantime, could a workaround for you be to manually start DynamoDB directly using docker from the command line and then use nostart: true for the plugin settings to prevent the plugin from attempting to use Java? Then you can at least use the functionality to create tables etc using the plugin while waiting for this to be released.

@AshanFernando
Copy link
Collaborator

@henhal I can merge the PRs, but let me check who has the credentials for publishing to NPM and sort it out.

@RyanCCollins
Copy link

RyanCCollins commented Jun 20, 2022

@henhal I can merge the PRs, but let me check who has the credentials for publishing to NPM and sort it out.

Bumping this since I am stuck by the same issue. Appreciate you!

@helenabenatar
Copy link

Any update on this? Currently stuck on this issue.

@henhal
Copy link
Contributor Author

henhal commented Jul 7, 2022

@helenabenatar, @VirtualVirtuoso, @RyanCCollins, @terozio, @ikeller96, @StampixSMO, @AndrewKeig, @patricksalazar

Hi all,
Since we seem stuck on the maintainer trying to obtain credentials I published my forks of the two required modules so that people can move on with their business:

@henhal/serverless-dynamodb-local
@henhal/dynamodb-localhost

There are two ways to use the forks:

1. Reference my forked package on NPM

Replace your devDependency to serverless-dynamodb-local in package.json with:

"@henhal/serverless-dynamodb-local": "^0.3.0"

NOTE Since serverless references plugins by name declared in package.json, this also means you must replace the plugin name in serverless.yml:

plugins:
  - "@henhal/serverless-dynamodb-local"

Note also that using @ as the first character in a yaml string requires quotes to be present as well.

2. Reference fork directly via git+ssh URI

"serverless-dynamodb-local": "git+ssh://git@github.com:henhal/serverless-dynamodb-local.git#v1"

This fetches the serverless-dynamodb-local module directly from my fork on github, which in turns uses the forked version of dynamodb-localhost which I've published to NPM as @henhal/dynamodb-localhost. Since you may still name the plugin serverless-dynamodb-local in package.json, no need to rename the plugin in serverless.yml .

I hope the maintainers are OK with me doing this; I mean no disrespect but lots of people have been waiting for nearly 7 months for a version to be published now.

@marcodali
Copy link

I have a M1 machine and this package work perfect with the option inMemory.
I complement this package by using also NoSQL Workbench for data UI visualization.

@AndrewKeig
Copy link

👍

I recently installed this and all works fine, well done all..

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