mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.04k stars 794 forks source link

Timeout on Waiting for QR #570

Open itraxAdmin opened 5 years ago

itraxAdmin commented 5 years ago

Hi I have done all the process to install the driver however when I run the command:

docker run --network selenium -it -e SELENIUM='http://firefox:4444/wd/hub' -v $(pwd):/app webwhatsapi /bin/bash -c "pip install ./;pip list;python sample/remote.py"

I got the following message:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Package Version


asn1crypto 0.24.0
cffi 1.12.2
cryptography 2.6.1
enum34 1.1.6
ipaddress 1.0.22
numpy 1.16.2
pip 19.0.3
protobuf 3.7.0
pycparser 2.19
python-axolotl 0.1.42
python-axolotl-curve25519 0.4.1.post2 python-dateutil 2.8.0
python-magic 0.4.15
selenium 3.141.0
setuptools 40.8.0
six 1.12.0
typing 3.6.6
urllib3 1.24.1
virtualenv 16.4.3
webwhatsapi 2.0.3
wheel 0.33.1
Environment {'LANG': 'C.UTF-8', 'PYTHONIOENCODING': 'UTF-8', 'TERM': 'xterm', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'PYTHON_VERSION': '2.7.16', 'SHLVL': '1', 'PYTHON_PIPVERSION': '19.0.3', 'HOSTNAME': 'add8806034e0', 'SELENIUM': 'http://firefox:4444/wd/hub', 'PWD': '/app', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOME': '/root', '': '/usr/local/bin/python'} Waiting for QR Traceback (most recent call last): File "sample/remote.py", line 20, in driver.wait_for_login() File "/usr/local/lib/python2.7/site-packages/webwhatsapi/init.py", line 261, in wait_for_login EC.visibility_of_element_located((By.CSS_SELECTOR, self._SELECTORS['mainPage'])) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:

I'm running it on a Google Cloud Debian 9.

I ran the "test_remote.py" with the above command and I got the shot.png of web.whatsapp.com.

What can I do?

Thanks

lfdelphino commented 5 years ago

Did you actually read the QR code? If you are running headless, you will need to get the QR code with get_qr() or get_qr_plain() and then read it with your WhatsApp App on your smartphone.

nazeels commented 5 years ago

I got QR Code, and there is issue while reading QR code, using the smart phone, "Couldn't scan code, make sure you are on web.whatsapp.com and try again"

roysG commented 4 years ago

Any update?