Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

expo start hangs when opening browser, ignores all input and options #1004

Closed
jessegranger opened this issue Sep 17, 2019 · 4 comments
Closed

Comments

@jessegranger
Copy link

Description

expo start hangs, never opens the DevTools in the browser, ignores all input arguments.

Expected Behavior

What actions did I perform?

> expo init blank-template, then choose a Blank Template.

In the resulting directory that is created:

> expo start

What did I expect?

I expect the packager to start, and for the dev tools to open in default browser (Firefox).

Or, an error, if there is some system mis-configuration.

Observed Behavior

> expo start
Starting project at /xxx/blank-template
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
# expo hangs here forever, no browser is ever opened
# if you manually open a browser and go to http://localhost:19002, it never responds
# pressing shift-d has no effect (prints D in the console, but does not un-hang)
^C
Stopping packager...
Packager stopped.
# Now, the browser opens a new tab with the DevTools url but it is already down

Passing options like --https, are ignored.

> expo start --https
Starting project at /xxx/blank-template
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
^C

Same output when passing any of the options listed in expo start --help.
Eg, passing --tunnel, --lan, or --localhost, all just open on http://localhost:19002.
No effect from using --dev, --no-dev, --https, --no-https, -a, -i, -w, -c, --web-only, none of these have any effect.

Environment

> expo diagnostics

  Expo CLI 3.0.10 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 3.0.2 - /usr/local/bin/fish
    Binaries:
      Node: 12.10.0 - /usr/local/bin/node
      npm: 6.10.3 - /usr/local/bin/npm
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5791312
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^34.0.1 => 34.0.4
      react: 16.8.3 => 16.8.3
      react-native: https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz => 0.59.8
    npmGlobalPackages:
      expo-cli: 3.0.10

Default browser is Firefox (69.0).

I tried using bash shell, I tried removing ~/.expo, neither had any effect.

Reproducible Demo

The built-in blank template fails for me.

@jessegranger
Copy link
Author

This is actually a bug in the "react-dev-utils" package. I posted a more detailed issue over there.

The gist is: if you have OS X but not "Google Chrome", then expo start will hang.

Link to the underlying issue: https://github.com/zanettin/react-dev-utils/issues/3

Leaving this issue open because it still misbehaves here, the resolution will be to upgrade to whatever version of react-dev-utils fixes the underlying issue.

@aqib1604
Copy link

aqib1604 commented Oct 8, 2019

Hello @jessegranger

I am facing same issue @jessegranger let me know if you get any solution for that.
I have upgraded "npm install -g expo-cli" to 3.2.3 but still getting same issue not opening DevTools in chrome browser.

Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)

Please help to resolve this issue

@jessegranger
Copy link
Author

As a workaround, you can force a different browser using the BROWSER environment variable.

For me, env BROWSER=firefox expo start works.

@brentvatne
Copy link
Member

we use the latest version of react-dev-utils, so i suspect this has been resolved

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

No branches or pull requests

3 participants