Uncaught error java.net.sockettimeoutexception react native macbook

I started a project using expo init on my mac. After that I ran expo start and npm start commands, and used expo app on android to scan barcode but it gives me error uncaught error java.net.sockettimeoutexception. My android device and mac are on the same wireless network. I also tried to connect mac with hotspot from my android device but still not working.
I have tried everything from these github issues development server is not started while scanning the QR code in Expo client application · Issue #270 · expo/create-react-native-app · GitHub
Network Response Time Out Error · Issue #144 · expo/create-react-native-app · GitHub
But nothing is working for me.
The latest versions I am using are listed below.
npm version is 6.5.0
expo version is 2.7.0

Please help me I am very irritated now!

Hey @shbhmbnsl1,

Can you try running rm -rf .expo and seeing if that helps at all?

Cheers,

Adam

No its still not working. Same error!

Got it. Can you try expo start -c --android? Sometimes clearing the cache is helpful.

No luck! Still not working. Still getting the same SocketTimeoutException when scanning the barcode from expo app.

Did you find out any other solution?

Any solution found for this? I really need to get this done.

Hey @shbhmbnsl1,

My apologies for the delay in response. Got a couple questions that should help us get towards a solution:

Is their computer IP address in the URL correct?
Do you have a firewall that could be blocking the connection?
Or could your router be blocking the connection?
Can you get it working with expo start --tunnel?

10 Likes

Using expo start --tunnel worked for me.
What is the reason behind it?

And just one more thing, while hot reloading it is taking a lot of time in Downloading JavaScript Bundle. Any workaround for this?

Thanks a lot!

5 Likes

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