Error when trying to run exp publish

Hi there,

I’m having an issue when running exp publish:

mike ~/P/z/J/jog> exp publish
[exp] Making sure project is set up correctly...
|[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
[exp] Your project looks good!
[exp] Unable to find an existing exp instance for this directory, starting a new one...
[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
[exp] Starting React Native packager...
[exp] Scanning 876 folders for symlinks in /Users/mike/Playground/zdev/Jog/jog/node_modules (8ms)
[exp] 
[exp] Running packager on port 19002
[exp] 
[exp] Looking for JS files in
[exp]    /Users/mike/Playground/zdev/Jog/jog 
[exp] 
[exp] 
[exp] 
[exp] React packager ready.
[exp] 
[exp] 
[exp] Loading dependency graph, done.
[exp] 
[exp] Publishing...
[exp] Transforming modules: 100.0% (888/888)
[exp] connect ECONNREFUSED 127.0.0.1:3000
Error: connect ECONNREFUSED 127.0.0.1:3000
    at Object.exports._errnoException (util.js:1034:11)
    at exports._exceptionWithHostPort (util.js:1057:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1099:14)

Not entirely sure what’s happening here - what’s supposed to be at port 3000?

Cheers

Do you have an EXPO_LOCAL env var set? Not sure why else it’d try to use port 3000.

Sorry for the delay in coming back to this - I used XDE in the meantime which works fine, but now that I’m at the point where I need to build a standalone version of my app for the Play Store I’ve hit this problem again. It should be targeting port 19001 right?

I do not have EXPO_LOCAL set - if I set EXPO_LOCAL to localhost:19001 it has no effect either - doesn’t seem to be using that environment variable.

Aha - the offending environment variable was SERVER_URL

Ah ok. I didn’t realize we read that. I’ll add a task to prefix that with EXPO.

1 Like

I’m having this problem too

3:01:03 PM
Publishing…
3:01:03 PM
Building iOS bundle
3:01:03 PM
Failed to publish package: connect ECONNREFUSED 127.0.0.1:19001

This worked before. I do not have SERVER_URL set in my shell environment.

Could this be related to app.json:

{
“expo”: {
“sdkVersion”: “25.0.0”,
“name”: “Open Movie Database Viewer”,
“slug”: “omdb-viewer”,
“version”: “1.0.0”,
“description”: “Allows you to browse the Open Movie Database.”,
“privacy”: “unlisted”,
“githubUrl”: “https://github.com/lsiden/react-native-omdb-viewer”,
“primaryColor”: “#05347f”,
“icon”: “src/assets/film-reel-1024-white-on-primary.png”,
“notification”: {
“icon”: “src/assets/film-reel-48-white-on-primary.png”
},
“splash”: {
“backgroundColor”: “#05347f”,
“image”: “src/assets/film-reel-1024-white-on-primary.png”
},
“ios”: {
“bundleIdentifier”: “com.westsideconsultingllc.omdbViewer”
},
“android”: {
“package”: “com.westsideconsultingllc.omdbViewer”,
“versionCode”: 1,
“playStoreUrl”:
https://play.google.com/westsideconsultingllc/omdb-viewer”,
“permissions”: []
}
}
}

2 Likes

Hi Isiden, I have completely the same problem. Did you solve it somehow?

1 Like

run exp start first then exp publish.

29 Likes

In my case, I have a VPN app on my phone that makes it communicate all IP traffic through a private VPN I subscribed to prevent snooping. Naturally, it couldn’t find my local computer until I disabled the VPN app.

If your phone is connected to your local Wifi ok, then check all your local LAN settings. Make sure your local Wi-fi router is not blocking traffic to or from your phone and that you aren’t running any firewall software on your development machine (like iptables) that might block some traffic. If you do, you’ll have to disable it or configure it to open the port 19001 and possibly other ports (I can’t remember now).

If your computer has it’s own wifi interface, then find your computer’s IP on the Wifi interface (I use ifconfig) and get Expo to publish over that without having to go through your wifi router. I didn’t need to do that, because my computer I use for development is connected directly to my router through a cable, but it might be good to know what the alternatives are.

1 Like

HI lsiden
i am new to react native and expo.
i have the same problem

[02:40:03] No currently active or previous builds for this project.
[02:40:04] Publishing to channel ‘default’…
[02:40:08] Building iOS bundle
[02:40:09] Error: connect ECONNREFUSED 127.0.0.1:19001
[02:40:09] Set EXPO_DEBUG=true in your env to view the stack trace.

C:\Users\Dell\fapp\myapp>

so please tell me what i am doing wrong?
i am trying to publish apk
also i am using windows 10 and internet is through datacard(huwai) so is there any lan setting disturbed? please tell me sir!

I don’t think your phone can access 127.0.0.1. That’s the IP address of the loopback interface on your dev machine. It needs the actual IP address assigned to your machine on your local network, like 192.168.1.xxx.

Try removing the .expo directory from the project root. It worked for me.

30 Likes

This also worked for me.
Thanks!

6 Likes

Fixed it! Thanks :slight_smile:

this works for me, thanks

Amazing… Its Work for me too

Thanks… It worked after deleting .expo folder.

Thanks @rudineyaf it work for me as well … thanks :slight_smile:

Thanks this worked for me

thank you!:смайлик: