Something went wrong Packager is not running at ...

Expo CLI 3.15.5 environment info:
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node
npm: 6.14.3 - ~/.nvm/versions/node/v13.11.0/bin/npm
npmPackages:
expo: ~36.0.0 => 36.0.2
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 3.15.5

Android device:
Redmi Note 4
Nougat
with EXPO client installed

Initially when i created the empty project using expo init the project was running fine in both android and web.
But after cloning a project from the given link https://github.com/yhenni1989/react-native-s3 and following the guideline to setup the back-end when i run this project using expo start I get the following error in my android device

Something went wrong.
Packager is not running at 192.168..:80

for the above error i have tried to allow ufw to port 80 . After that i got the same error but the port value was 19001 . I did allow 19001 port with ufw but it didn’t help me to resolve the problem.

The error that comes in the web browser when i run it in the web are:

Unhandled Rejection (TypeError): expo__WEBPACK_IMPORTED_MODULE_15__.Permissions is null

According to me these error may occur as i have not given any permission through my android device. Correct me If I am wrong.

Any help is appreciated. Thanks in Advance

Please reply so that i can work on it.

The SDK version specified in that app.json is pretty old. Also it should not be looking for the packager on port 80. Another thing is that it’s not set up for Expo Web.

Maybe see what happens if you run expo upgrade with a recent version of expo-cli.

If that doesn’t work, I think it would probably be best to create a new Expo app with expo init and then either compare the differences between the two, or else copy files from the cloned repo to your new app.

HI wodin

I have created a new app using expo init, it is also displaying the same error for port 80.
It also shows the following error in logs:

Tunnel ready.
Couldn’t adb reverse: Invalid source port: ‘null’

Please help!
Thanks in advance

Here is my new app expo diagnostic

Expo CLI 3.17.11 environment info:
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node
npm: 6.14.3 - ~/.nvm/versions/node/v13.11.0/bin/npm
npmPackages:
expo: ~37.0.3 => 37.0.3
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 3.17.11

And you’re starting it with expo start?

Yes I am starting this with expo start

And you get a line printed out showing what port Metro is listening on (usually 19001)?

$ expo start
Starting project at /tmp/test
Expo DevTools is running at http://localhost:19002
Press d to open DevTools now, or shift-d to always open it automatically.
Starting Metro Bundler on port 19001. <===
Tunnel ready.

  exp://192.168.18.4:19000

$ expo start
Starting project at /home/shiraz/img
Expo DevTools is running at http://localhost:19002
Press d to open DevTools now, or shift-d to always open it automatically.
Starting Metro Bundler on port 19001.
Successfully ran adb reverse. Localhost URLs should work on the connected Android device.

see the attached screenshot

Is the IP address correct?

What does this give you?

$ curl http://192.168.18.4:19000 |  jq . | grep ':[0-9]\+'
    "imageUrl": "http://192.168.18.4:19001/assets/./assets/splash.png"
  "bundleUrl": "http://192.168.18.4:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false",
  "debuggerHost": "192.168.18.4:19001",
  "logUrl": "http://192.168.18.4:19000/logs",
  "hostUri": "192.168.18.4:19000",
  "iconUrl": "http://192.168.18.4:19001/assets/./assets/icon.png"

If you don’t have jq installed you could use python2 -mjson.tool instead. Or just manually check that the right ports are mentioned.

Also, did you try killing the “experience” as well as the Expo app before loading it again? And How are you trying to load the app in the Expo app?

Trying to open the project on Android…
Couldn’t adb reverse: Invalid source port: ‘null’
Opening on Android device

$ curl http://192.168.43.153:19000 | jq | grep ‘:[0-9]+’
jq - commandline JSON processor [version 1.5-1-a5b5cbe]
Usage: jq [options] [file…]

    jq is a tool for processing JSON inputs, applying the
    given filter to its JSON text inputs and producing the
    filter's results as JSON on standard output.
    The simplest filter is ., which is the identity filter,
    copying jq's input to its output unmodified (except for
    formatting).
    For more advanced filters see the jq(1) manpage ("man jq")
    and/or https://stedolan.github.io/jq

    Some of the options include:
     -c             compact instead of pretty-printed output;
     -n             use `null` as the single input value;
     -e             set the exit status code based on the output;
     -s             read (slurp) all inputs into an array; apply filter to it;
     -r             output raw strings, not JSON texts;
     -R             read raw strings, not JSON texts;
     -C             colorize JSON;
     -M             monochrome (don't colorize JSON);
     -S             sort keys of objects on output;
     --tab  use tabs for indentation;
     --arg a v      set variable $a to value <v>;
     --argjson a v  set variable $a to JSON value <v>;
     --slurpfile a f        set variable $a to an array of JSON texts read from <f>;
    See the manpage for more options.

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 961 100 961 0 0 7171 0 --:–:-- --:–:-- --:–:-- 7171
(23) Failed writing body

I am killing the experience using CTRL+C command and clearing recent opened app in expo app at client side i.e on my android device.
Correct me If I am doing anything wrong.
I am trying to load the app in the expo client installed on my android device by pressing ‘a’ in development mode in the terminal.

IP address is correct as I am using my mobile data

It needs to be “jq .”, not just “jq”. Anyway, jq . just formats the JSON nicely, so it’s not absolutely necessary id you just want to check what ports are mentioned in the JSON.

When you open an app within the Expo client it’s called an experience, because it’s not a standalone app. On Android it still shows up as two separate entries in the list of recently opened apps. What I meant was you should swipe both of them away in the recently opened apps list on your phone.

Ah, OK, well that should work, although I haven’t used that other than on the Android emulator a few times. What I do is either scan the QR code or choose it from the “RECENTLY IN DEVELOPMENT” list in the Expo app.

$ curl http://192.168.43.153:19000 | jq . | grep ‘:[0-9]+’
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 949 100 949 0 0 13753 0 --:–:-- --:–:-- --:–:-- 13753
“imageUrl”: “http://192.168.43.153:80/assets/./assets/splash.png
“bundleUrl”: “http://192.168.43.153:80/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false”,
“debuggerHost”: “192.168.43.153:80”,
“logUrl”: “http://192.168.43.153:19000/logs”,
“hostUri”: “192.168.43.153:19000”,
“iconUrl”: “http://192.168.43.153:80/assets/./assets/icon.png

:flushed: :thinking:

OK, that’s weird. Metro is listening on port 19001, but the manifest shows port 80.

I don’t know why that would be.

I made the new project in different directory using expo init, then i run it using expo start ,the new project worked fine but after some time same error appeared on the screen.

This project is running fine on web.

If you do the same test to check the ports in the manifest, does it also show port 80? If not, maybe you just need to restart the Expo app again. I know it can sometimes get into a state where it thinks it should connect to port 80 instead of the usual port 19000.

The packager for Expo Web is Webpack rather than Metro Bundler, so that probably explains why one would be working when the other isn’t.

Yes it is displaying port 80

OK, I’ve got a little more info. If I manually kill the Metro bundler process, the dev server suddenly switches to advertising port 80 instead of the port that Metro was listening on.

So my suspicion is that Metro is dying on your machine for some reason.

I’m not entirely sure how to debug that, but maybe try running expo like this and see if it gives you any more info in the terminal when this happens:

EXPO_DEBUG=true expo start