Debug server in EC2 instance

Please provide the following:

  1. SDK Version: 4.0.15
  2. Platforms(Android/iOS/web/all): all

I’m trying to get the Expo debug server running on my EC2 instance such that it can be accessed via my phone; both of them are obviously on different networks. I tried modifying packager-info.json to change the ports only to realize that that file is generated dynamically. I went ahead and opened TCP ports on both 19000 and 19002 only to realize there’s no way to change the interface. I then proceeded to use the --tunnel option, but it’s been giving me this a few warnings followed by a fatal error:

Tunnel URL not found (it might not be ready yet), falling back to LAN URL.
Tunnel URL not found (it might not be ready yet), falling back to LAN URL.
ValidationError: "urlType" must be one of [exp, http, redirect, no-protocol]

Hi

I’m not sure why the --tunnel option wouldn’t work for you, but in theory everything should work as-is as long as you connect to the EC2 instance’s public IP address instead of the internal one.

One thing that might work is this:

$ export EXT_IP=2.3.4.5
$ REACT_NATIVE_PACKAGER_HOSTNAME=$EXT_IP expo start

If that doesn’t work, then just start expo as usual, and generate a QR code with the correct address:

$ expo start

In another terminal, e.g.:

$ export EXT_IP=2.3.4.5
$ qrencode -t ANSI exp://$EXT_IP:19000

Then scan that QR code.

2 Likes

I apologize for the delay in replying.

The first solution works perfectly. Thank you so much!

2 Likes

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