sigalor / whatsapp-web-reveng

Reverse engineering WhatsApp Web.
MIT License
6.1k stars 802 forks source link

ECONNREFUSED error when connecting to API #317

Open IamMusavaRibica opened 3 years ago

IamMusavaRibica commented 3 years ago

Using windows 10 I tried disabling firewall Command prompt output


[0] [nodemon] 1.19.4
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching dir(s): *.*
[0] [nodemon] watching extensions: js
[0] [nodemon] starting `node index.js`
[1] [nodemon] 1.19.4
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching dir(s): *.*
[1] [nodemon] watching extensions: py
[1] [nodemon] starting `python ./backend/whatsapp_web_backend.py`
[2] Sass is watching for changes. Press Ctrl-C to stop.
[2]
[0] whatsapp-web-reveng API server listening on port 2019
[0] whatsapp-web-reveng HTTP server listening on port 2018
[0] got message  { command: 'api-connectBackend', from: 'client', type: 'call' }
[0] events.js:292
[0]       throw er; // Unhandled 'error' event
[0]       ^
[0]
[0] Error: connect ECONNREFUSED 127.0.0.1:2020
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
[0] Emitted 'error' event on WebSocket instance at:
[0]     at WebSocket.finalize (C:\Users\IamMusavaRibica\OneDrive\Desktop\whatsapp-web-reveng\node_modules\ws\lib\WebSocket.js:182:41)
[0]     at ClientRequest.<anonymous> (C:\Users\IamMusavaRibica\OneDrive\Desktop\whatsapp-web-reveng\node_modules\ws\lib\WebSocket.js:647:10)
[0]     at ClientRequest.emit (events.js:315:20)
[0]     at Socket.socketErrorListener (_http_client.js:469:9)
[0]     at Socket.emit (events.js:315:20)
[0]     at emitErrorNT (internal/streams/destroy.js:106:8)
[0]     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
[0]     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
[0]   errno: -4078,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '127.0.0.1',
[0]   port: 2020
[0] }
[0] [nodemon] app crashed - waiting for file changes before starting...```
Pegorino82 commented 3 years ago

@IamMusavaRibica have you solved the problem?

IamMusavaRibica commented 3 years ago

Nope Im not very familiar with python 2.7 either but I think the script doesn't run as its supposed to print that its running

uto, 20. tra 2021. 10:51 Pegorino82 @.***> je napisao:

@IamMusavaRibica https://github.com/IamMusavaRibica have you solved the problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sigalor/whatsapp-web-reveng/issues/317#issuecomment-823103000, or unsubscribe https://github.com/notifications/unsubscribe-auth/APWMGTUTE5RMRJIDRRKT5Y3TJU6CBANCNFSM4ZRVP4ZQ .

Pegorino82 commented 3 years ago

@IamMusavaRibica yes, i found some import's loss in whatsapp.py and in whatsapp_web_backend.py in creating SimpleSocketServer it is needed to specify host '127.0.0.1' that's work for me, but script needs refactor and upgrade

IamMusavaRibica commented 3 years ago

@IamMusavaRibica yes, i found some import's loss in whatsapp.py and in whatsapp_web_backend.py in creating SimpleSocketServer it is needed to specify host '127.0.0.1' that's work for me, but script needs refactor and upgrade

where exactly ?

Pegorino82 commented 3 years ago

@IamMusavaRibica

 whatsapp_web_backend.py
 ...
 at the bottom
 ...

server = SimpleWebSocketServer("127.0.0.1", 2020, WhatsAppWeb);
eprint("whatsapp-web-backend listening on port 2020");
server.serveforever();
IamMusavaRibica commented 3 years ago

ya, figured it out, now successfully connects and everything after qr code scanned i log in but sometimes it just randomly disconnects but i guess thats a problem for another time

sub, 22. svi 2021. 15:59 Pegorino82 @.***> je napisao:

@IamMusavaRibica https://github.com/IamMusavaRibica

whatsapp_web_backend.py ... at the bottom ...

server = SimpleWebSocketServer("127.0.0.1", 2020, WhatsAppWeb); eprint("whatsapp-web-backend listening on port 2020"); server.serveforever();

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sigalor/whatsapp-web-reveng/issues/317#issuecomment-846412351, or unsubscribe https://github.com/notifications/unsubscribe-auth/APWMGTSBT6Y73HNOLB7VU3DTO62EPANCNFSM4ZRVP4ZQ .