sigalor / whatsapp-web-reveng

Reverse engineering WhatsApp Web.
MIT License
6.06k stars 801 forks source link

Connection of backend to WhatsApp failed : Timeout #80

Open mehmetcanfarsak opened 5 years ago

mehmetcanfarsak commented 5 years ago

Hi, First of all, Thanks for this awesome repository. I have recently installed the repo to my macbook. But I'm having trouble.

I had installed all python packeges. And I run npm start. after that I visited http://localhost:2018/ I clicked 3 times to connect and I get this error. The output in console:

npm start

> whatsapp-web-reveng@1.0.0 start /Users/user/codeforlaravel/app/whatsapp-web-reveng
> npm run dev

> whatsapp-web-reveng@1.0.0 dev /Users/user/codeforlaravel/app/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`
[2] >>> Sass is watching for changes. Press Ctrl-C to stop.
[0] whatsapp-web-reveng API server listening on port 2019
[0] whatsapp-web-reveng HTTP server listening on port 2018
[1] whatsapp-web-backend listening on port 2020
[0] got message  { command: 'api-connectBackend', from: 'client', type: 'call' }
[1] sending {"type": "connected", "from": "backend"}
[1] ('127.0.0.1', 52479) connected to backend
[0] got message  { from: 'meta', type: 'opened' }
[0] got message  { type: 'connected', from: 'backend' }
[0] got message  { command: 'backend-connectWhatsApp',
[0]   from: 'client',
[0]   type: 'call' }
[1] 1534279336804,{"command":"backend-connectWhatsApp","from":"api2backend","type":"call"}
[1] {u'from': u'api2backend', u'command': u'backend-connectWhatsApp', u'type': u'call'}
[1] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)
[1] sending {"type": "resource_gone", "resource": "whatsapp", "resource_instance_id": "4a895663b2554be98cde0110fcc74092", "from": "backend"}
[1] WhatsApp backend Websocket closed.
[0] got message  { type: 'resource_gone',
[0]   resource: 'whatsapp',
[0]   resource_instance_id: '4a895663b2554be98cde0110fcc74092',
[0]   from: 'backend' }
[0] got message  { command: 'backend-connectWhatsApp',
[0]   from: 'client',
[0]   type: 'call' }
[1] 1534279350694,{"command":"backend-connectWhatsApp","from":"api2backend","type":"call"}
[1] {u'from': u'api2backend', u'command': u'backend-connectWhatsApp', u'type': u'call'}
[1] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)
[1] sending {"type": "resource_gone", "resource": "whatsapp", "resource_instance_id": "9781599ab7624c9ba37d4e70fc1d055c", "from": "backend"}
[1] WhatsApp backend Websocket closed.
[0] got message  { type: 'resource_gone',
[0]   resource: 'whatsapp',
[0]   resource_instance_id: '9781599ab7624c9ba37d4e70fc1d055c',
[0]   from: 'backend' }

I tried to to reinstall by brew uninstall --force node and brew install node but didn't work.

mehmetcanfarsak commented 5 years ago

@sigalor Please help me

sigalor commented 5 years ago

Hi, so several other people had this issue already (e.g. #60), but as I am not able to reproduce the [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726) error and none of them did sufficient debugging of not only their Python installation but also their system configuration, I just cannot help them.

Trying a shot in the dark here, you could reinstall Python 2, try using the simple-websocket-server library to connect to another WebSocket via SSL (i.e. wss://...) or check your local store of trusted certificates and whether Python is able to access them.