tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.09k stars 2.23k forks source link

Login fail with: code_checkpoint fail #3226

Open galdudi opened 1 year ago

galdudi commented 1 year ago

Login Fail

While sending SMS Request I got the reponse: {"login":"xxxxxxxxxxxxxx","reason":"code_checkpoint","status":"fail"}

Does anyone know how I suppose to proceed from these?

ORMiK0 commented 1 year ago

captcha

is99zsq commented 1 year ago

you can see the captcha code in UI.

there is a new api interface named "captcha_verify"

so you should implement it yourself.

sjoerdj commented 1 year ago

I am now using yowsup code of @bahkadomos, which includes requests for captcha challenge. However, I get the following error when I try to register a number:

W 2023-10-01 11:27:48,929 yowsup.common.http.warequest - Passing Config to WARequest is deprecated, pass a YowProfile instead
Traceback (most recent call last):
  File "/usr/local/bin/yowsup-cli", line 722, in <module>
    if not parser.process():
  File "/usr/local/bin/yowsup-cli", line 387, in process
    self.handleRequestCode(self.args["requestcode"], config)
  File "/usr/local/bin/yowsup-cli", line 398, in handleRequestCode
    codeReq = WACodeRequest(method, config)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/registration/coderequest.py", line 23, in __init__
    self.addParam("token", YowsupEnv.getCurrent().getToken(self._p_in))
TypeError: getToken() missing 1 required positional argument: 'phoneNumber'

Does anyone have an idea to overcome this error?

WeslenPy commented 1 year ago

python setup.py build python setup.py install

sjoerdj commented 1 year ago

python setup.py build python setup.py install

@WeslenPy and @bahkadomos, with which Python version did you build the software? Following @WeslenPy's remark I built it with Python v3.7.3, but unfortunately that did not solve the issue.

W 2023-10-17 22:33:52,243 yowsup.common.http.warequest - Passing Config to WARequest is deprecated, pass a YowProfile instead
Traceback (most recent call last):
  File "/usr/local/bin/yowsup-cli", line 722, in <module>
    if not parser.process():
  File "/usr/local/bin/yowsup-cli", line 387, in process
    self.handleRequestCode(self.args["requestcode"], config)
  File "/usr/local/bin/yowsup-cli", line 398, in handleRequestCode
    codeReq = WACodeRequest(method, config)
  File "/usr/local/lib/python3.7/dist-packages/yowsup-3.3.0-py3.7.egg/yowsup/registration/coderequest.py", line 23, in __init__
    self.addParam("token", YowsupEnv.getCurrent().getToken(self._p_in))
TypeError: getToken() missing 1 required positional argument: 'phoneNumber'
WeslenPy commented 1 year ago

@sjoerdj I'm using python 3.9.0

heliopoffo commented 1 year ago

Hi,

I have the same error:

root@app01:~/yowsup# python3 ./yowsup-cli registration -r sms --config-phone 554784024625 --config-cc 55 --config-mcc 724 --config-mnc 05 -d D 2023-10-30 09:31:54,181 yowsup.config.manager - load(path_or_profile_name=5547984024625, profile_only=False) D 2023-10-30 09:31:54,181 yowsup.config.manager - _load_path(path=5547984024625) D 2023-10-30 09:31:54,181 yowsup.config.manager - _load_path couldn't find the path: 5547984024625 D 2023-10-30 09:31:54,181 yowsup.config.manager - path_or_profile_name is not a path, using it as profile name D 2023-10-30 09:31:54,181 yowsup.config.manager - Detecting config for profile=5547984024625, dir=/root/.config/yowsup/5547984024625 D 2023-10-30 09:31:54,181 yowsup.config.manager - Trying /root/.config/yowsup/5547984024625/config.yo D 2023-10-30 09:31:54,181 yowsup.config.manager - Trying /root/.config/yowsup/5547984024625/config.json E 2023-10-30 09:31:54,181 yowsup.config.manager - Could not find a config for profile=5547984024625, paths checked: 5547984024625:/root/.config/yowsup/5547984024625/config.yo:/root/.config/yowsup/5547984024625/config.json D 2023-10-30 09:31:54,181 yowsup.profile.profile - Constructed Profile(profile_name=5547984024625) yowsup-cli v3.2.1 yowsup v3.3.0 consonance v0.1.5 dissononce v0.34.3 python-axolotl v0.2.2 cryptography v41.0.5 protobuf v3.20.3

Copyright (c) 2012-2019 Tarek Galal http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is encouraged.

If you appreciate this software and you would like to support future development please consider donating: http://openwhatsapp.org/yowsup/donate

W 2023-10-30 09:31:54,183 yowsup.common.http.warequest - Passing Config to WARequest is deprecated, pass a YowProfile instead D 2023-10-30 09:31:54,183 yowsup.profile.profile - Constructed Profile(profile_name=5547984024625) D 2023-10-30 09:31:54,183 yowsup.axolotl.factory - get_manager(profile_name=5547984024625, username=5547984024625) D 2023-10-30 09:31:55,118 yowsup.axolotl.manager - Initialized AxolotlManager [username=5547984024625, db=/root/.config/yowsup/5547984024625/axolotl.db] D 2023-10-30 09:31:55,122 yowsup.axolotl.manager - load_latest_signed_prekey D 2023-10-30 09:31:55,123 yowsup.axolotl.manager - generate_signed_prekey D 2023-10-30 09:31:55,123 yowsup.axolotl.manager - load_latest_signed_prekey D 2023-10-30 09:31:55,227 yowsup.env.env - Env not set, setting it to android D 2023-10-30 09:31:55,227 yowsup.env.env - Current env changed to android Traceback (most recent call last): File "/root/yowsup/./yowsup-cli", line 722, in if not parser.process(): File "/root/yowsup/./yowsup-cli", line 387, in process self.handleRequestCode(self.args["requestcode"], config) File "/root/yowsup/./yowsup-cli", line 398, in handleRequestCode codeReq = WACodeRequest(method, config) File "/root/yowsup/yowsup/registration/coderequest.py", line 23, in init self.addParam("token", YowsupEnv.getCurrent().getToken(self._p_in)) TypeError: getToken() missing 1 required positional argument: 'phoneNumber' root@app01:~/yowsup#

root@sed-cdp-app01:~/yowsup# python3 --version Python 3.9.2

Any idea? Thanks.

RobLinux commented 1 year ago

Just re-ask the code with "method" = "captcha". In the answer you'll get "image_blob" as PNG containing the code. enjoy

RobLinux commented 1 year ago

https://github.com/WhiskeySockets/Baileys/issues/277

RobLinux commented 1 year ago

https://github.com/WhiskeySockets/Baileys/issues/364

heliopoffo commented 1 year ago

Just re-ask the code with "method" = "captcha". In the answer you'll get "image_blob" as PNG containing the code. enjoy

I don't understand how to make this change.

I downloaded yowsup from https://github.com/tgalal/yowsup.git and then applied the bahkadomos changes to the captcha, getting the error: code_checkpoint.

root@fw01:~/yowsup# python3 ./yowsup-cli registration -r sms --config-phone 5547999999999 --config-cc 55 --config-mcc 724 --config-mnc 05 -d -E android D 2023-11-02 19:00:36,020 yowsup.env.env - Current env changed to android D 2023-11-02 19:00:36,020 yowsup.config.manager - load(path_or_profile_name=5547999999999, profile_only=False) D 2023-11-02 19:00:36,020 yowsup.config.manager - _load_path(path=5547999999999) D 2023-11-02 19:00:36,020 yowsup.config.manager - _load_path couldn't find the path: 5547999999999 D 2023-11-02 19:00:36,021 yowsup.config.manager - path_or_profile_name is not a path, using it as profile name D 2023-11-02 19:00:36,021 yowsup.config.manager - Detecting config for profile=5547999999999, dir=/root/.config/yowsup/5547999999999 D 2023-11-02 19:00:36,021 yowsup.config.manager - Trying /root/.config/yowsup/5547999999999/config.yo D 2023-11-02 19:00:36,021 yowsup.config.manager - Trying /root/.config/yowsup/5547999999999/config.json E 2023-11-02 19:00:36,021 yowsup.config.manager - Could not find a config for profile=5547999999999, paths checked: 5547999999999:/root/.config/yowsup/5547999999999/config.yo:/root/.config/yowsup/5547999999999/config.json D 2023-11-02 19:00:36,021 yowsup.profile.profile - Constructed Profile(profile_name=5547999999999) yowsup-cli v3.2.1 yowsup v3.3.0 consonance v0.1.5 dissononce v0.34.3 python-axolotl v0.2.2 cryptography v2.6.1 protobuf v3.20.3

Copyright (c) 2012-2019 Tarek Galal http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is encouraged.

If you appreciate this software and you would like to support future development please consider donating: http://openwhatsapp.org/yowsup/donate

W 2023-11-02 19:00:36,182 yowsup.common.http.warequest - Passing Config to WARequest is deprecated, pass a YowProfile instead D 2023-11-02 19:00:36,182 yowsup.profile.profile - Constructed Profile(profile_name=5547999999999) D 2023-11-02 19:00:36,182 yowsup.axolotl.factory - get_manager(profile_name=5547999999999, username=5547999999999) D 2023-11-02 19:00:36,184 yowsup.axolotl.manager - Initialized AxolotlManager [username=5547999999999, db=/root/.config/yowsup/5547999999999/axolotl.db] D 2023-11-02 19:00:36,185 yowsup.axolotl.manager - load_latest_signed_prekey D 2023-11-02 19:00:36,185 yowsup.common.http.warequest - send(parser=None, encrypt=True, preview=False) D 2023-11-02 19:00:36,186 yowsup.common.http.warequest - sendGetRequest(parser=None, encrypt_params=True, preview=False) D 2023-11-02 19:00:36,186 yowsup.common.http.warequest - Encrypting parameters D 2023-11-02 19:00:36,188 yowsup.common.http.warequest - pre-encrypt (encoded) parameters = cc=55&in=47992463636&lg=en&lc=GB&mistyped=6&authkey=qJQv34M4Q6jo7CSkUxhapvp9%5fFxSr6zHfTP9YEFQ4Q0&e_regid=MuwQ2Q&e_keytype=BQ&e_ident=7AX2lG%2dIwdUil6k6QtLSlVaafEamxhuflEot%2dXWRL0I&e_skey_id=AAAA&e_skey_val=wkWaI%5fXIrLCnivSiYeTu8Uhkma1t6XClklNNdmgxmX4&e_skey_sig=KjgzrpAWwx7tlW3m1q5Q4W2mluWGt%5fdOotOUaJN7jOPgms8pHmHVNg2hgSLiBYElkoTrqQ9e0rNmHVcMc%2d14hQ&fdid=7c6b9815%2d4595%2d4aa7%2da131%2dac8e3d5aa80a&expid=G3JU5RJ1TI650nvF6zLMIg&network_radio_type=1&simnum=1&hasinrc=1&pid=766&rc=0&mcc=724&mnc=005&sim_mcc=000&sim_mnc=000&method=sms&reason=&token=4wRT1hU4wjXawHLK5KFPfKzlUMo%3d&hasav=1&id=%8e%aa%40%26%10%f49%0b%a6%a3%e0k%af5%0fx%e4x%0fI D 2023-11-02 19:00:36,192 yowsup.common.http.warequest - sendRequest(host=v.whatsapp.net, port=443, path=/v2/code, headers={'User-Agent': 'WhatsApp/2.23.23.74 Android/8.0.0 Device/samsung-star2lte', 'Accept': 'text/json'}, params=[('ENC', b'VPPeWopw4HRr3M0q2Xr4VK0zQpa31jnbPkzbJqXmjS2DFiGgctEbQpQhUWgcEilralAf8gbewvqHF3SmUAML4HamNO1XzKfwW6vc9SepSSiMVrnXarb/VpwN2xO6kgYieP/IkjbnqKTKlvWjhoNn//HonE0mA8ANvaOXIZh2wxgsKdKOzugYlAc8ZVL3pZPrRoBsj+yjAYuLsKkSISo4jGjibmSgGyJKn9kymuLilXfk9HMxn3kCTODOK++O7aBkV0Gd112lbPVPmCTukwWx9wRBH5wNTvZOeXOLefjoP1C1USFgVwfcSU6TTqCIMD1YKoKjD6PmZr7CqLVjjz36YyHY8vgy55OEizP3/i/W+uWlLYcF0u7B4JnnA/pZ+IIbFaiDioWYP2vt9Dl+qv2izbAWjCF5WixTimdhU1ZLI4ClxfHu0ueNtRCxvhbYUJgO+fOkzhNHsfqsFwAHvTv50qWl3pFzc1ZHdLxaSozDofQxfZpqjlCM1zZz/qtjNndNXAYZfk0aAot5fnLS59BH1IJBhd//eM27Uz8djm7HROSo9V8IsV4Pn7dK0BwsVSZ4mLwTQqe/lD26uZDK2ID0czzUSn4ebClHow+ffwyzAamgZZvy1Ce2wuK8pakl2Vde5X2wdlSlgfLGfIrjfz624rNIix8Bo74CvXEde6jq3qMOy8zsY/kD2YiDyRGPQM1RoKTaJcaFtvfC1cbFYgINQSxuW2sifjflajzuGVdKx0wnARc0mPoVProJ2BEpd21qcxbS37ROUOuFVyH+BeeganoTbhZ2qenLJyEwmogHHmz3MmmFwhyjAznNDebUhhkRbhHr7T7BsdfxrHBgZ6jS4qppZ88B18b7HkAfjEFRqH4HLq+l1Kc8jD4RSZvsgc4AybJJYLTV9N/YROQ/VdL2URHCjQ==')], reqType=GET, preview=False) D 2023-11-02 19:00:36,197 yowsup.common.http.warequest - Opening connection to v.whatsapp.net D 2023-11-02 19:00:36,198 yowsup.common.http.warequest - Sending GET request to /v2/code?ENC=VPPeWopw4HRr3M0q2Xr4VK0zQpa31jnbPkzbJqXmjS2DFiGgctEbQpQhUWgcEilralAf8gbewvqHF3SmUAML4HamNO1XzKfwW6vc9SepSSiMVrnXarb%2fVpwN2xO6kgYieP%2fIkjbnqKTKlvWjhoNn%2f%2fHonE0mA8ANvaOXIZh2wxgsKdKOzugYlAc8ZVL3pZPrRoBsj%2byjAYuLsKkSISo4jGjibmSgGyJKn9kymuLilXfk9HMxn3kCTODOK%2b%2bO7aBkV0Gd112lbPVPmCTukwWx9wRBH5wNTvZOeXOLefjoP1C1USFgVwfcSU6TTqCIMD1YKoKjD6PmZr7CqLVjjz36YyHY8vgy55OEizP3%2fi%2fW%2buWlLYcF0u7B4JnnA%2fpZ%2bIIbFaiDioWYP2vt9Dl%2bqv2izbAWjCF5WixTimdhU1ZLI4ClxfHu0ueNtRCxvhbYUJgO%2bfOkzhNHsfqsFwAHvTv50qWl3pFzc1ZHdLxaSozDofQxfZpqjlCM1zZz%2fqtjNndNXAYZfk0aAot5fnLS59BH1IJBhd%2f%2feM27Uz8djm7HROSo9V8IsV4Pn7dK0BwsVSZ4mLwTQqe%2flD26uZDK2ID0czzUSn4ebClHow%2bffwyzAamgZZvy1Ce2wuK8pakl2Vde5X2wdlSlgfLGfIrjfz624rNIix8Bo74CvXEde6jq3qMOy8zsY%2fkD2YiDyRGPQM1RoKTaJcaFtvfC1cbFYgINQSxuW2sifjflajzuGVdKx0wnARc0mPoVProJ2BEpd21qcxbS37ROUOuFVyH%2bBeeganoTbhZ2qenLJyEwmogHHmz3MmmFwhyjAznNDebUhhkRbhHr7T7BsdfxrHBgZ6jS4qppZ88B18b7HkAfjEFRqH4HLq%2bl1Kc8jD4RSZvsgc4AybJJYLTV9N%2fYROQ%2fVdL2URHCjQ%3d%3d I 2023-11-02 19:00:37,309 yowsup.common.http.warequest - b'{"reason":"code_checkpoint","status":"fail","login":"554799999999"}\n' status: b'fail' reason: b'code_checkpoint' login: b'554799999999' root@fw01:~/yowsup#

pedroscocco commented 1 year ago

@RobLinux Any tips on how to implement the captcha request appreciated. Thanks a lot!

sjoerdj commented 1 year ago

Just re-ask the code with "method" = "captcha". In the answer you'll get "image_blob" as PNG containing the code. enjoy

Hi @RobLinux, how can I set this method? I tried the following, but that did not work:

  1. yowsup-cli registration --method captcha --requestcode sms --phone 4915123456789 --cc 49 --mcc 262 --mnc 01 -E android
  2. yowsup-cli registration --requestcode captcha --phone 4915123456789 --cc 49 --mcc 262 --mnc 01 -E android
  3. Adding "method": "captcha" to config.json file of the number to re-register

Thanks for your help!

sjoerdj commented 3 months ago

@heliopoffo, How did you eventually overcome this error? TypeError: getToken() missing 1 required positional argument: 'phoneNumber'