Uncaught error java.net.sockettimeoutexception react native macbook

#1

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 https://github.com/react-community/create-react-native-app/issues/270
https://github.com/react-community/create-react-native-app/issues/144
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!

0 Likes

#2

Hey @shbhmbnsl1,

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

Cheers,

Adam

0 Likes

#3

No its still not working. Same error!

0 Likes

#4

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

0 Likes

#5

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

0 Likes

#6

Did you find out any other solution?

0 Likes

#7

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

0 Likes

#8

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?

1 Like

#10

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!

0 Likes

closed #11

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

0 Likes