Expo dev client cannot connect to the dev server

4.3k views Asked by At

A development build that uses expo-dev-client and Expo Application Service seems to be having trouble connecting to the dev server.

The dev client app hangs on the splash screen after running npx expo start --dev-client. The JavaScript bundle process also doesn't start.

After a while, I get the error screen on the app saying that its request to connect to the dev client timed out.

There was a problem loading the project.

This development build encountered the following error:

Failed to load app from http://172.20.1.160:8081
with error: The request timed out.

What might be the reason?

3

There are 3 answers

1
Samuel A. Souza On

I was facing this issue. I wasn't connected to my WiFi network which was causing the error.

3
hayata_suenaga On

Adding --tunnel to the expo start comment solved the issue.

npx expo start --dev-client --tunnel

More information on "tunneling" at this expo-cli doc page.

0
 EchoZhang8888 On

expo sdk 49

eas build --profile development-simulator --platform ios

iOS simulator build install on simulator then run

npx expo start --dev-client