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

ECONNREFUSED 127.0.0.1:4370 error #1

Closed
BannerBomb opened this issue Nov 24, 2017 · 6 comments
Closed

ECONNREFUSED 127.0.0.1:4370 error #1

BannerBomb opened this issue Nov 24, 2017 · 6 comments

Comments

@BannerBomb
Copy link

I keep getting
{ Error: connect ECONNREFUSED 127.0.0.1:4370 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 4370 }
when i run the run.bat file

@jaaiden
Copy link
Owner

jaaiden commented Nov 24, 2017

Not sure what could have caused this. Do you have Spotify running prior to starting the bot?

@BannerBomb
Copy link
Author

BannerBomb commented Nov 24, 2017

I had Spotify open when i ran it it said that same for if spotify is closed, people I guess been having that problem with node-spotify-webhelper as I googles the error and alot of the same came up like this
nadavbar/node-spotify-webhelper#10 as subhackar said to use the changed port and http, which shows the changes here

@jaaiden
Copy link
Owner

jaaiden commented Nov 24, 2017

In that case try updating the node modules within the spotibot folder by running npm update using your default terminal program where node is installed. Let me know if this works!

@BannerBomb
Copy link
Author

no it didnt work, still says the same thing

@BannerBomb
Copy link
Author

BannerBomb commented Nov 24, 2017

I was able to fix the error myself I used Webroot SecureAnywhere to view all the connections being made on my computer and went to the one being made by spotify.exe which is 127.0.0.1:4381, you have to update 2 things inside the C:\Users\Owner\Desktop\spotibot-master\node_modules\node-spotify-webhelper\index.js file which are,

BEFORE MODIFICATION
Line 15: var DEFAULT_PORT = 4370;
Line 158: return util.format("https://%s:%d%s", generateRandomLocalHostName(), localPort, url)

AFTER MODIFICATION
Line 15: var DEFAULT_PORT = 4381;
Line 158: return util.format("http://%s:%d%s", generateRandomLocalHostName(), localPort, url)

cause if u try to access the TCP4 using https then it will unexpectedly close the port, so if u type it in as 127.0.0.1:4381 in your browser it will say missing method which means its open so u can use it in the script to connect to it I learned that spotify changes their port after awhile.

@jaaiden
Copy link
Owner

jaaiden commented Nov 24, 2017

This is an issue with node-spotify-webhelper, closing the issue.

@jaaiden jaaiden closed this as completed Nov 24, 2017
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

2 participants