Using Expo for Development (Stuck-New user)

I am new to expo. I am developing a React-native app and use expo (npm start will start expo just fine).

When I scan the QR code on my android (motorola 2022 flip) it does not work. Gives various time out messages. But when I load the same QR code on an iPhone 14 it just loads it no problem.

Any idea why this might be?

I have confirmed that I am running on the exact same wifi network as the PC and it doesn’t make a difference.

The error in the logs says:

Uncaught Error: failed to connect to / (port 19000) from / (port 43842) after 10000ms

I can see that these IPs and ports are different but I don’t know how to change them to be the same or if that’s what I need to do?

Could you please help?

Hi @okospeter

I don’t know why one phone would behave differently to the other, but it looks like in the error you posted, the phone is not on the same network as the computer.

You could try working around it by using:
npx expo start --tunnel

Hi @wodin

Thank you for your response!

when running npx expo start --tunnel I get the following error:

PS C:\Users\okos0\Documents\notJust\NikeApp> npx expo start --tunnel
Starting project at C:\Users\okos0\Documents\notJust\NikeApp
Starting Metro Bundler
CommandError: ngrok tunnel took too long to connect.

Actually I think just doing npx expo start was the solution.

I ran that without tunnel and now it works.

Not sure why it worked fine on the iPhone using npm start (which runs expo start)

Now I’m running into another issue.

Has anyone ever noticed an issue with rendering? I’ll try to explain as its pretty complicated…

But I started out using Expo strictly on the browser. I was able to complete one simple React Native app this way.

My next app that I am currently working on I was using the web display and it worked fine until I introduced a component into my app. Ever since it could never render again on the browser.

Then I switched over to working on the iPhone 14 and it was able to render the exact same code no issue.

I continued my development and everything was working fine until I added a <Stack.Navigator> component.

I can still display my but as soon as I try to set it to use the <Stack.Screen /> component the app no longer renders on either the iPhone 14 nor my android that I just got to work.

Any idea what might be going on here?

I have been following along with the tutorial I was watching very closely and the code should be right (as it was in the situation where everything disappeared in the browser that I mentioned earlier).

That might have been running the global expo-cli instead of the cli built into the expo dependency

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.