Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The request timed out - when attempting to open app #149

Closed
richkeenan opened this issue Apr 4, 2017 · 7 comments
Closed

The request timed out - when attempting to open app #149

richkeenan opened this issue Apr 4, 2017 · 7 comments

Comments

@richkeenan
Copy link
Contributor

Description

Request timed out when running app with no changes.

  1. create-react-native-app spark-mobile
  2. cd spark-mobile
  3. yarn start
  4. Scan QR code in Expo Client app
  5. After a while the big red error screen is shown with "The request timed out"

Expected Behavior

Default welcome screen is shown

Observed Behavior

Red error message,

The request timed out.

ABI15_0_0RCTFatal
ABI15_0_0RCTSetFatalHandler
ABI15_0_0RCTSetFatalHandler
<redacted>
<redacted>
_dispatch_main_queue_callback_4CF
<redacted>
<redacted>
CFRunLoopRunSpecific
GSEventRunModal
<redacted>
UIApplicationMain
Exponent
<redacted>

Environment

  • npm ls react-native-scripts: react-native-scripts@0.0.26
  • npm ls react-native: react-native@0.42.3
  • npm ls expo: expo@15.1.3
  • node -v: v6.9.5
  • npm -v: 3.10.10
  • yarn --version: 0.19.1
  • watchman version: Not installed
  1. Operating system: Windows 10
  2. Phone/emulator/simulator & version: Apple iPhone 6S hardware

I've used CRNA with no problems at home, but at work I get this issue so I'm sure it's just an office infrastructure thing but it's hard to diagnose. Some things I've checked.

  1. My phone is on the office VPN
  2. My phone can access my dev PC when I goto a browser http://my-dev-ip-address:19000, the output of which is
{
  "sdkVersion": "15.0.0",
  "name": "spark-mobile",
  "slug": "spark-mobile",
  "version": "0.1.0",
  "xde": true,
  "developer": {
    "tool": "crna"
  },
  "packagerOpts": {
    "hostType": "tunnel",
    "lanType": "ip",
    "dev": true,
    "strict": false,
    "minify": false,
    "urlType": "exp",
    "urlRandomness": null
  },
  "env": {
    
  },
  "bundleUrl": "http://10.2.75.100:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles",
  "debuggerHost": "10.2.75.100:19001",
  "mainModuleName": "./node_modules/react-native-scripts/build/bin/crna-entry",
  "logUrl": "http://10.2.75.100:19000/logs",
  "id": "@anonymous/spark-mobile-b242e73f-03fc-4701-96d2-267c4261577b"
}
@richkeenan
Copy link
Contributor Author

richkeenan commented Apr 4, 2017

OK solved!

My office firewall blocks most ports from the VPN so I got them to open up 19000 for me because the exp:// address is for 19000, but I also needed to open 19001.

I might be worth mentioning somewhere in the documentation that 19000 and 19001 both need to be accessible. I'm happy to send a PR if you agree.

richkeenan added a commit to richkeenan/create-react-native-app that referenced this issue Apr 4, 2017
anp pushed a commit that referenced this issue Apr 4, 2017
@anp
Copy link
Contributor

anp commented Apr 4, 2017

Merged the PR, thanks so much!

@anp anp closed this as completed Apr 4, 2017
@dcp12345678
Copy link

Hey @dikaiosune, Have you considered using something like ngrok to expose the local endpoint as a secure tunnel to localhost? In other words, when we do npm start, use ngrok to expose the endpoint for our local app, then you don't have to worry about firewalls, VPN ports, and that kind of stuff. The expo phone app would then connect to this publicly exposed endpoint.

I mean, I'm glad @richkeenan was able to get the firewall ports opened on his corporate firewall, but not everyone has that luxury. This issue is basically a showstopper for me, and I had to abandon use of your product.

Anyway, I hope you can consider doing something along these lines, as it would make your product much more accessible.

@anp
Copy link
Contributor

anp commented Apr 12, 2017

@dcp12345678 it's funny that you ask! XDE currently sets up ngrok tunnels for you. There are a few reasons we don't do this for CRNA, but the main one is that as a general purpose getting-started tool CRNA shouldn't ever require you to register for an account for a non-OSS service. That said, if you're OK registering for an Expo account I'd recommend getting started with XDE in your particular situation.

@dcp12345678
Copy link

@dikaiosune - Thanks for your reply. I tried Expo XDE but when I tried to create a new project it brought up a downloading modal and got to around 19%, then it displayed a message that said:

Couldn't connect to the server, check your internet connection.

I clicked create again, then I got this error:
EPERM: operation not permitted, access 'C:\Users\uf8472v.expo\starter-app-cache\blank-15.0.2.tar.gz'

I know my internet connection is ok because I'm using it to type this message.

Anyway, I suppose it's time to move on.

@anp
Copy link
Contributor

anp commented Apr 15, 2017

@dcp12345678 so sorry about that, the starter projects are just hosted on S3, but we've seen a few issues with how Electron networking interacts with S3 (or something related, I haven't been involved in troubleshooting). In any case, if you do decide to give it another go, you can download the template projects from http://expo.io/--/api/v2/versions/download-template/tabs or http://expo.io/--/api/v2/versions/download-template/blank and extract them yourself.

anp pushed a commit that referenced this issue Apr 20, 2017
@theydonthaveit
Copy link

theydonthaveit commented Sep 30, 2017

Hi, the main issue I found is when you use the npm / yarn start / run command. The CLI is cool but it isn't very smart. When using Expo XDE app - I was able to do what the CLI was meant to do. Expo XDE ran the application on port 19002 and provided me with the correct share link and QR code - automatically. Whereas the CLI never changed the port ( or maybe it did ) but kept providing me with port 19000 which was unreachable and kept returning the "timeout" error. Hope this info helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants