expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

"Could not access packager status"

Open acomito opened this issue 8 years ago • 67 comments

Description

  • I download expo expo-cli
  • I run expo init
  • project gets generated, etc.
  • I run yarn start
  • I see:
[09:56:32] Starting project at /Users/me/testing-expo
[09:56:34] Starting Metro Bundler on port 19003.
[09:56:34] Metro Bundler ready.
[09:57:03] Could not access packager status at http://localhost:19003/status. Are you sure the packager is running and reachable?
[09:57:03] Set EXPO_DEBUG=true in your env to view the stack trace.

Environment

Environment: OS: macOS High Sierra 10.13.6 Node: 8.12.0 Yarn: 1.9.4 npm: 6.4.1 Watchman: 4.9.0 Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 3.1 AI-173.4819257

Packages: (wanted => installed) expo: ^30.0.1 => 30.0.1 react: 16.3.1 => 16.3.1 react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4

Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/heyned_tester-49231240-7d93-4f44-b26f-d6f0a7784b07.tar.gz

Potentially related:

  • https://forums.expo.io/t/major-issues-with-expo-best-way-to-100-uninstall-expo-react-native-and-then-re-install/14212
  • https://stackoverflow.com/questions/52494855/reactnative-set-expo-debug-issue
  • https://forums.expo.io/t/react-native-set-expo-debug-true/14163
  • https://github.com/expo/expo/issues/1381
  • https://stackoverflow.com/questions/52112016/react-native-crna-packager-stops-running
  • https://stackoverflow.com/questions/52514526/uses-expo-start-instead-of-npm-start

Reproducible Demo

This is just with a fresh expo-cli install and fresh project from expo-cli

acomito avatar Sep 27 '18 18:09 acomito

possible duplicate of https://github.com/expo/expo-cli/issues/50 or https://github.com/expo/expo-cli/issues/38

acomito avatar Sep 27 '18 20:09 acomito

I am having the same issue. And I also see the packager is running at http://localhost:19001/status.

I updated CRNA and created a new project and ran into the same issue.

There was an instance where I ran expo start --lan and the command ran successfully but I couldn't reproduce this result.

For the time being, I downgraded expo-cli and XDE and changed my project settings back to use react-native-scripts and everything works as normal.

brukh avatar Sep 27 '18 20:09 brukh

There is no certain way of fixing it, sometimes I can solve it by clearing NPM cache: npm cache clean --force

Sometimes I able to solve it by reinstalling expo CLI. The other time I was able to solve it by running Expo XDE.

If it is not working for you, you may try other commands here: https://forums.expo.io/t/how-to-clear-the-react-native-packager/1352

angyy10 avatar Sep 28 '18 06:09 angyy10

I've changed node versions, uninstall/reinstalled expo-cli, yarn, npm, clean caches, reset watchman but no luck. I'm bummed out.

I did try and expo start --lan and my terminal got one step further before failing... went from

[09:45:08] Starting Metro Bundler on port 19001.
[09:45:08] Metro Bundler ready.
[09:45:37] Could not access packager status at http://localhost:19001/status. Are you sure the packager is running and reachable?
[09:45:37] Set EXPO_DEBUG=true in your env to view the stack trace.

to

[09:45:50] Starting Metro Bundler on port 19001.
[09:45:50] Metro Bundler ready.
[09:46:04] ::1 - - [28/Sep/2018:13:46:04 +0000] "GET /favicon.ico HTTP/1.1" 404 150 "http://localhost:19001/status" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
[09:46:19] Could not access packager status at http://localhost:19001/status. Are you sure the packager is running and reachable?
[09:46:19] Set EXPO_DEBUG=true in your env to view the stack trace.

I should note my XDE is doing basically the same thing. So it's not just expo-cli for me.

acomito avatar Sep 28 '18 13:09 acomito

Hey @acomito I finally got it working. There was a folder named http created at the top level of my directory that had a .expo folder nested within with config settings that I believe were being used.

The folder was created when I was upgrading just don't know what triggered it.

I just deleted the folder and the command as normal. Hope this works for you.

screen shot 2018-09-29 at 2 15 45 am

UPDATE: After upgrading to expo-cli 2.2.0 and opening a new shell I ran into the same issue 😕.

brukh avatar Sep 29 '18 07:09 brukh

I'm definitely having the same issues as everyone else

calvinlang avatar Oct 02 '18 18:10 calvinlang

I'm in the same boat

EDIT: @sant3001 has it right

ryanlozon avatar Oct 03 '18 16:10 ryanlozon

I am having this issue too. 😢 EDIT: I was able to resolve this by making sure that I had a version of Expo open (on my phone or emulator) on the same network as my server.

aminoche avatar Oct 04 '18 15:10 aminoche

I am having the same issue as well :(

The issue started to happen when I upgraded Node from v8.9.4 to v9.10.0 and reinstalled the expo-cli package.

Workaround that worked for me:

$ npm uninstall -g expo-cli
$ npm cache clean --force
$ npm install -g expo-cli  

leventebalogh avatar Oct 07 '18 09:10 leventebalogh

This solved the problem for me (using Mac). Type:

sudo vim /etc/hosts

then type your password to edit the hosts file and insert this line to the end of the file:

127.0.0.1    localhost

sant3001 avatar Oct 09 '18 19:10 sant3001

Somethings that I try when this happens.

  1. Open a browser window at http://localhost:19002/
  2. Open the Expo app on my phone
  3. Open the Expo app on my phone simulator
  4. Run expo start --tunnel in case it's a LAN issue
  5. ...close everything and reopen everything.

...wish there was some more description on how to proceed with this error.

aminoche avatar Oct 10 '18 18:10 aminoche

I am getting the same thing on my Mac, i try to make a new project with expo init , then do expo start. Then [09:42:07] Starting project at /Users/user/Documents/Project [09:44:12] Starting Metro Bundler on port 19001. [09:44:13] Could not access packager status at http://localhost:19001/status. Are you sure the packager is running and reachable? [09:44:13] Set EXPO_DEBUG=true in your env to view the stack trace.

i dont know mabie a problem with the new version of expo-cli?

cloeffler avatar Oct 11 '18 16:10 cloeffler

i can access packager status from my browser, but expo-cli cant?

cloeffler avatar Oct 11 '18 17:10 cloeffler

Clean installation of Mojave solved the same problem. (using Mac)

aki77 avatar Oct 13 '18 12:10 aki77

are you reffering to the whole operating system?

On Sat, Oct 13, 2018 at 5:04 AM aki77 [email protected] wrote:

Clean installation of Mojave solved the same problem. (using Mac)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/expo/expo-cli/issues/52#issuecomment-429536483, or mute the thread https://github.com/notifications/unsubscribe-auth/AelnmPpBDyHMTRjGKoB4_QF-txK7dsFHks5ukdbagaJpZM4W9Pp6 .

cloeffler avatar Oct 15 '18 15:10 cloeffler

are you reffering to the whole operating system?

I hope not, that would be a bit of an overkill 😄

leventebalogh avatar Oct 15 '18 19:10 leventebalogh

The proxy server is open?

deot avatar Oct 20 '18 08:10 deot

@sant3001 solution did it for me

laurentsmohr avatar Oct 20 '18 08:10 laurentsmohr

When running on another computer(mac): ... Running logs show: Expo DevTools is running at http://localhost:19004 ... So,i guess: vim /etc/hosts 127.0.0.1 localhost

it worked!

silenjs avatar Oct 23 '18 05:10 silenjs

I had the same problem when I logged in with my expo account via prompt, 'expo login', and then I ran the 'expo start' command. Then I closed the prompt and ran 'expo start', it worked correctly.

OS: Windows 10

LucasGarcez avatar Oct 26 '18 13:10 LucasGarcez