sigalor / whatsapp-web-reveng

Reverse engineering WhatsApp Web.
MIT License
6.16k stars 807 forks source link

API not working, stuck with "Upgrade required" #88

Closed gusfune closed 1 year ago

gusfune commented 6 years ago

I am trying to run the application, it's not showing any errors, but the API never connects (says connection refused). Accessing the IP directly shows "Upgrade Required".

sigalor commented 6 years ago

What is your command line output? Which operating system and application versions are you using? Accessing localhost:2019 or localhost:2020 via a browser, i.e. HTTP will obviously not work, because WebSocket servers are running on these ports, not HTTP servers.

gusfune commented 6 years ago

I am accessing on a remote server, locally it did not play well on a mac. It's running on Ubuntu 16.04.

The console output is:

> whatsapp-web-reveng@1.0.0 dev /root/whatsapp-web-reveng
> concurrently --kill-others "./node_modules/.bin/nodemon index.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp_web_backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"

[1] [nodemon] 1.12.5
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching: *.*
[1] [nodemon] starting `python ./backend/whatsapp_web_backend.py`
[0] [nodemon] 1.12.5
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching: *.*
[0] [nodemon] starting `node index.js`
[1] whatsapp-web-backend listening on port 2020
[0] whatsapp-web-reveng API server listening on port 2019
[0] whatsapp-web-reveng HTTP server listening on port 2018

No errors, nothing wrong. The API error that shows in the browser on the Client is: WebSocket connection to 'ws://localhost:2019/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED – initialize @ WebSocketClient.js:56

The Update required happens when accessing the server IP on port 2019.

rbnishant commented 6 years ago

Not sure if this is of any help, but I got the same "Update Required" on the official MAC Whatsapp Software. I was pairing it with "Whatsapp Business" android application. It worked later with the normal android application. So this may have to do something at the Whatsapp's server end, and not with this project. Just food for thought. I can't confirm anything yet. I just found this project, and I am starting setting it up. Thought to have look at open issues first.

Moanrisy commented 6 years ago

`..[$] <( (git)-[master]-)> npm start

whatsapp-web-reveng@1.0.0 start /srv/http/skripsi/testWA/whatsapp-web-reveng npm run dev

whatsapp-web-reveng@1.0.0 dev /srv/http/skripsi/testWA/whatsapp-web-reveng concurrently --kill-others "./node_modules/.bin/nodemon index.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp_web_backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"

[1] [nodemon] 1.18.3 [1] [nodemon] to restart at any time, enter rs [1] [nodemon] watching: . [1] [nodemon] starting python ./backend/whatsapp_web_backend.py [0] [nodemon] 1.18.3 [0] [nodemon] to restart at any time, enter rs [0] [nodemon] watching: . [0] [nodemon] starting node index.js [1] Traceback (most recent call last): [1] File "./backend/whatsapp_web_backend.py", line 15, in [1] from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket; [1] ModuleNotFoundError: No module named 'SimpleWebSocketServer' [1] [nodemon] app crashed - waiting for file changes before starting... [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:167 [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:1113:14) [0] Emitted 'error' event at: [0] at WebSocket.finalize (/srv/http/skripsi/testWA/whatsapp-web-reveng/node_modules/ws/lib/WebSocket.js:182:41) [0] at ClientRequest._req.on (/srv/http/skripsi/testWA/whatsapp-web-reveng/node_modules/ws/lib/WebSocket.js:647:10) [0] at ClientRequest.emit (events.js:182:13) [0] at Socket.socketErrorListener (_http_client.js:391:9) [0] at Socket.emit (events.js:182:13) [0] at emitErrorNT (internal/streams/destroy.js:82:8) [0] at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) [0] at process._tickCallback (internal/process/next_tick.js:63:19) [0] [nodemon] app crashed - waiting for file changes before starting... `

got error 'Upgrade Required' too

leoteixeira2016 commented 5 years ago

i have same error

throw er; // Unhandled 'error' event ^

Error: getaddrinfo ENOTFOUND w1.web.whatsapp.com ?[90m at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)?[39m Emitted 'error' event on WebSocket instance at: at WebSocket.finalize (C:\Share\whatsapp-web-reveng-master\node_modules\?[4mws?[24m\lib\WebSocket.js:182:41) at ClientRequest. (C:\Share\whatsapp-web-reveng-master\node_modules\?[4mws?[24m\lib\WebSocket.js:647:10) ?[90m at ClientRequest.emit (events.js:209:13)?[39m ?[90m at TLSSocket.socketErrorListener (_http_client.js:406:9)?[39m ?[90m at TLSSocket.emit (events.js:209:13)?[39m ?[90m at emitErrorNT (internal/streams/destroy.js:91:8)?[39m ?[90m at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)?[39m ?[90m at processTicksAndRejections (internal/process/task_queues.js:77:11)?[39m { errno: ?[32m'ENOTFOUND'?[39m, code: ?[32m'ENOTFOUND'?[39m, syscall: ?[32m'getaddrinfo'?[39m, hostname: ?[32m'w1.web.whatsapp.com'?[39m }

Ngasha commented 5 years ago

Emitted 'error' event on ClientRequest instance at: at TLSSocket.socketErrorListener (_http_client.js:406:9) at TLSSocket.emit (events.js:209:13) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) at processTicksAndRejections (internal/process/task_queues.js:77:11) { errno: 'ENOTFOUND', code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'https' }