Closed bmeeder22 closed 2 years ago
Created a example project to demo the issue: https://github.com/bmeeder22/solana_magic_demo
Here's some conclusion for the Buffer expected issue.
The root cause for this is during the communication of RN to our relayer, the payload with buffer object is not properly serialized / de-serialized during the payload transaction. So in which case, you'll find it works in a browser but not on RN.
We'll have to spend some more time to figure out an optimal way to solve this problem once for all.
@Ethella thanks for taking an initial look! We already have magic live on our site everything working well there. Right now we are trying to launch mobile as soon as possible. Any ideas on timelines that we can expect for when you will be free to take a deeper dive on this?
Since this is super high priority for us we are happy to assist in any way. Would also be happy to setup a private channel for us to collaborate on the issue.
If it does not involve extra complexity, I think I can wrap it up this week.
:rocket: Issue was released in @magic-ext/react-native-oauth@2.1.0
, @magic-sdk/react-native@8.1.0
:rocket:
Hey @Ethella @smithki
I am testing this fix using the demo application that I created and shared in the ticket. Even after pulling in "@magic-sdk/react-native": "8.1.0"
and "@magic-ext/solana": "4.0.1"
I am still getting the exact name issue.
✅ Prerequisites
magic-sdk
)?🐛 Description
When Signing Solana Transactions in a React Native app the RPC request will fail with the error:
🧩 Steps to Reproduce
🤔 Expected behavior
The transaction should be signed successfully.
😮 Actual behavior
The transaction fails with the error
ERROR [Error: Magic RPC Error: [-32603] Internal error: Expected Buffer]
💻 Code Sample
It is really good to note that this EXACT same code works in a web browser with no problems. So this is an issue that is specific to React Native. I know to get Buffer there needs to be a use of polyfills, so my guess is the polyfills do not line up even thought they both serialize to the same JSON string/structure. Would love to get a workaround for this issue ASAP.
🌎 Environment
@magic-sdk/react-native
@magic-ext/solana
react native
yarn
1.22.17
ios 15