detox-expo-helpers icon indicating copy to clipboard operation
detox-expo-helpers copied to clipboard

Expo Go app is opening with wrong server URL when calling `await reloadApp()`

Open junzhengca opened this issue 2 years ago • 0 comments

When I call

await reloadApp();

it is opening the app with the wrong Metro server URL

CleanShot 2023-02-05 at 17 02 29@2x

As you can see the URL is trying to connect to port :80, which is incorrect, it should be port :19000.

A quick look inside the library reveals that it is calling constructManifestUrlAsync, which returns the right URL with right LAN IP, but not the right port.

CleanShot 2023-02-05 at 17 03 45

Forcefully set the url works correctly

CleanShot 2023-02-05 at 17 04 35


Maybe something have changed with newer version of Expo? Upgrading @expo/xdl doesn't fix this issue so maybe we have to update some logic inside this library?

junzhengca avatar Feb 05 '23 22:02 junzhengca