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

Can't load dapp on Expo #30

Open
critesjosh opened this issue Dec 3, 2021 · 13 comments
Open

Can't load dapp on Expo #30

critesjosh opened this issue Dec 3, 2021 · 13 comments

Comments

@critesjosh
Copy link

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

I set up the project using npx create-react-native-dapp. I cd into my-react-dapp and run yarn web. It seems like the build hangs. If I try to scan the displayed QR code with Expo, its the blue screen that says "Something went wrong."

Screen Shot 2021-12-03 at 2 39 33 PM

When I run expo start, the project seems to build, but when I scan the QR code with Expo Go on my android device, nothing is displayed--there is a blank screen. There are no error messages. Same thing happens when I try to run the app on the iOS simulator.

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I am working on an M1 mac. Node version 16.13.0

@saricden
Copy link

Bumping this, I'm encountering the same issue.

@epshtielsl
Copy link

epshtielsl commented Dec 26, 2021

Bump. Also seeing something similar. Runs okay on a simulator, but shows nothing but a blank white screen in Expo Go.

Edit: See this post here. It looks like expo start is not supported?

@mertcankose
Copy link

Similar issue i run yarn start and then my anroid app screen has big white screen

@clxyder
Copy link

clxyder commented Jan 3, 2022

Hey all I was able to make a bare bones example that uses expo start and allows you to connect your wallet via WalletConnect all from the Expo Go app. I haven't had a chance to integrate the changes with this current repo, but I might try later on. Here is the link to the repo, https://github.com/clxyder/walletconnect-expo-example, if anyone is interested. I have only tested this on an iPhone.

@mertcankose
Copy link

@clxyder hey it's working on android (i'm using huawei). Also, How can i make transaction and sign contract processes?

@epshtielsl
Copy link

epshtielsl commented Jan 8, 2022

Hey all I was able to make a bare bones example that uses expo start and allows you to connect your wallet via WalletConnect all from the Expo Go app. I haven't had a chance to integrate the changes with this current repo, but I might try later on. Here is the link to the repo, https://github.com/clxyder/walletconnect-expo-example, if anyone is interested. I have only tested this on an iPhone.

Works on my iOS device. Would you care to outline some of the steps you took to get Web3 working with React Native? I see most have to eject and run npx rn-nodeify --install --hack to get stuff working. What all is included with your project?

@clxyder
Copy link

clxyder commented Jan 8, 2022

@mertcankose Thank you for confirming that it also works on Android. Hmm it's just an example how to get WalletConnect working on Expo Go, you might be able to sign transactions if you add Moralis (https://github.com/ethereum-boilerplate/ethereum-react-native-boilerplate) and interact with a testnet. If you are able to forward the port to you LAN you should be able to access the hardhat node that way.

@epshtielsl Awesome yea I dropped a link in the README, but TLDR we can use babel/metro to map unsupported packages to ones that are supported as defined in metro.config.js.

@sunaookamishiroko
Copy link

Hey all I was able to make a bare bones example that uses expo start and allows you to connect your wallet via WalletConnect all from the Expo Go app. I haven't had a chance to integrate the changes with this current repo, but I might try later on. Here is the link to the repo, https://github.com/clxyder/walletconnect-expo-example, if anyone is interested. I have only tested this on an iPhone.

i have a same issue but you're walletconnet example works well. thank you !

@happyeric77
Copy link

happyeric77 commented Jan 10, 2022

@mertcankose Thank you for confirming that it also works on Android. Hmm it's just an example how to get WalletConnect working on Expo Go, you might be able to sign transactions if you add Moralis (https://github.com/ethereum-boilerplate/ethereum-react-native-boilerplate) and interact with a testnet. If you are able to forward the port to you LAN you should be able to access the hardhat node that way.

@clxyder
I got inspired by your example code to have the walletconnect work.
However, it turns out several issues when I tried to bring in moralis library. See here. The reason why I do not use their official boilerplate is that it is not working with expo go. Instead, we need to use react-native-cli with bare bone project.
I am wondering if you have got around it (moralis + expo go) already. If yes, it will be appreciated if you could share some hints with me.

@clxyder
Copy link

clxyder commented Jan 12, 2022

Hey @happyeric77 I am glad you where able to get help from Gen! https://forum.moralis.io/t/ethereum-react-native-boilerplate-questions/4511/145?u=cwong
I will also try to add those modification to my repo as it's something I've wanted to do.

Thanks again.

@safaksonmez
Copy link

@clxyder it works on ios when I connect with qr code but when I try to run with android simulator on my windows pc or qr code with my android device then click to connect wallet button browser opens and give 404 not found error

These are on simulator

image

image

This is on my android device

image

these are on my ios device

image
image
image
image

Do you guys have any idea to fix this ?

@sunaookamishiroko
Copy link

sunaookamishiroko commented Apr 11, 2022

@safakyavsan

I fix it by comment out some codes in WalletConnectProvider.js
Go to
node_modules/@walletconnect/react-native-dapp/dist/providers/WalletConnectProvider.js

image

Comment out codes like this then it works

@clxyder
Copy link

clxyder commented Apr 11, 2022

Hey @somewheregreeny thanks sharing your fix. Yea @safakyavsan it has something to do with deep links not being properly setup in expo go.

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

8 participants