-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
[Bug]: Expo Sample App not work after updating the SDK version, send Transaction Not work with error shown #1094
Comments
Please refer to my discussion with the ecies author @kigawas |
Any news about this?! I'm facing the same issue.. |
Author of ecies/cipher has a fix but the issue remains the same after I have applied it to my project package.json |
@phabiulla check this react native demo |
@kigawas sorry for any misleading to everyone. cause I am using expo example for my project and I will try to remove it using react native alone. But I think there should be some update to prove those examples from MetaMaskSDK repo are working perfectly. |
For expo example |
@kigawas I have traced from the error log when launching the app. As the error log is showing something about ecies therefore I contacted you for a luck try. The issue may not be on your side. My current issue is that with the old version of MetaMaskSDK, it is possible to launch the app but not able to deep link to the transaction screen using the transaction button provided (only switching to the MetaMask app) So I hope an update for MetaMaskSDK could make it works. Therefore I update the MetaMaskSDK but the result is what I have shown not able to launch the app |
with config.resolver.unstable_enablePackageExports=true I got the error of
|
I´m working on a project and faced the same issue, I struggled trying multiple things, but this was the one working. Idk if i´m using best practices here but this solved my problems:
This for the login button index.tsx:
And my metro.config.js:
Using: If you have any suggestion to improve my code, I will appreciate. Hope I´m helping someone! |
Using the package.json dependency from @Apcozar I still got the message of However after Anyway thanks for your help but I think the example code should have a update since I was starting from v0.18.6 and those demo apps RNonly/expo both have come differences in code and also config. Quite frustrated by trying everything out by guess & luck for days and days Last question May I know I should use |
After I have a try on updating @metamask/sdk to 0.30.2 as I notice there is an dependency update on eciesjs under @metamask/sdk-communication-layer, the app cannot be launched again any more what I can do is
to make it works again. |
I recommend metamask/sdk to bump its dependency to use eciesjs v0.4, which is more multi platform friendly. You only need to polyfill Buffer (for React Native crypto.getRandomValues is also needed) |
@kigawas and after adding I think the unstable_enablePackageExports alter the other common dependencies behaviors so i dont think it is a good way to add that line in metro config + the previous trick no longer works |
axios is very problematic, can you use undici instead? |
After removing axios But how come it will make you a conclusion that axios is problematic I wanna know cause It is a common tools for http request. How about the other choices? update: |
Many common npm libraries are already outdated and full of glitches like axios, webpack, jest etc. axios is common because it's old, now you should just use fetch api. If you need performance or other functionality like proxy agent, use undici |
seems undici is not working on react native proj and I am now using the build-in fetch instead |
You can pin metamask sdk version to 0.30.0 |
After deleting of node_modules, yarn install, and changed back to index.tsx recommend by @Apcozar but I don't recommend to close this issue cause error messages I am afraid to tell this js lib metamask-sdk is still very buggy in react-native environment when some major library like react-native, expo is being updated in the future as well as the metamask app itself. Thanks @kigawas for assist |
Hi everyone, I just found this way of connecting wallets to my app. Really helpful and smooth: https://docs.reown.com/appkit/overview It´s from walletconnetc. @ram4444 |
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
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:
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
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
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
The text was updated successfully, but these errors were encountered: