MetaMask / MetaMask/metamask-sdk

[Bug]: Expo Sample App not work after updating the SDK version, send Transaction Not work with error shown

Open
#1,094 20 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
338
Forks
260
PR merge metrics
No merged PRs in 30d

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start with packages/examples/expo-demo and compare its package versions with the working and failing configurations in the report. Run `npx expo run:android` and inspect the SDKConfigProvider and @ecies/ciphers resolution errors. Done means the Expo sample app launches without those errors after the SDK update.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.