MetaMask / metamask-sdk

The simplest yet most secure way to connect your blockchain-based applications to millions of MetaMask Wallet users.
https://metamask.io/sdk/
Other
181 stars 111 forks source link

[Bug]: Expo Sample App not work after updating the SDK version #1094

Open ram4444 opened 1 week ago

ram4444 commented 1 week ago

SDK

React-Native

Provide environment information

OS: Arch Linux Android Simulator SDK 34

MetaMask SDK Version

"@metamask/sdk-react": "^0.18.6", "^0.30.0",

MetaMask Mobile app Version

N/A

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Expo

Describe the Bug

Here is my sample app which is working with dependencies in package,json below

"expo": "~49.0.9",
"@metamask/sdk-react": "^0.18.6",
"eciesjs": "0.3.20", <-not shown but I can find it in node module

As there is some dependency requires me to upgrade my expo to 51.0.0, so finally I start from zero and make a new project with package.json:

"expo": "^51.0.0",
"@metamask/sdk-react": "^0.30.0",
"eciesjs": "0.4.8", <-not shown but I can find it in node module

However the app no longer work with error message of

SDKConfigProvider not found or unable to resolve @ecies/ciphers/aes from node_modules/eciesjs/dist/utils/symmetric.js

even I downgrade the eciesjs as

"expo": "^51.0.0",
"@metamask/sdk-react": "^0.30.0",
"eciesjs": "0.3.20", <-which I think it is OK with the previous setting

it is still not working

I got the same error message when I try it on the exposample app (with an updated sdk version) from https://github.com/MetaMask/metamask-sdk/tree/main/packages/examples/expo-demo

Everything is working fine with package.json below so I don't think it is am expo issue

"expo": "^51.0.0",
"@metamask/sdk-react": "^0.18.6",
"eciesjs": "0.3.20", 

Expected Behavior

Expo can show up my app without error

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

No response

To Reproduce

npx expo run:android

ram4444 commented 16 hours ago

Please refer to my discussion with the ecies author @kigawas Unable to resolve "@ecies/ciphers/aes" from "node_modules/eciesjs/dist/utils/symmetric.js" #808