throneless-tech / libsignal-service-javascript

A javascript library for basic interaction with the Signal messaging service, adapted from Signal-Desktop.
GNU General Public License v3.0
57 stars 21 forks source link

accountManager.requestSMSVerification() returns 402 error #23

Open Goodest-Y opened 3 years ago

Goodest-Y commented 3 years ago

Hi all, it is still fine up to end of Jan , but within these few days 402 error thrown as :

accountManager.requestSMSVerification().then(result => { console.log("Sent verification code."); console.log("password generated : ".password); console.log("result" + result); }).catch(printError => { console.log("Error" + printError); });

ErrorHTTPError: The server rejected our query, please file a bug report. (original: promiseAjax: error response; code: 402)

Anyone has any clues on that ? Thanks

larrygiroux commented 3 years ago

Similar issue from same method, 400 error instead:

Error [HTTPError]: promiseAjax: error response; code: 400
    at HTTPError (C:\freelance\node_signal_bot\node_modules\@throneless\libsignal-service\src\WebAPI.js:389:13)
    at C:\freelance\node_signal_bot\node_modules\@throneless\libsignal-service\src\WebAPI.js:345:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Original stack:
Error
    at _outerAjax (C:\freelance\node_signal_bot\node_modules\@throneless\libsignal-service\src\WebAPI.js:383:19)
    at _ajax (C:\freelance\node_signal_bot\node_modules\@throneless\libsignal-service\src\WebAPI.js:502:14)
    at Object.requestVerificationSMS (C:\freelance\node_signal_bot\node_modules\@throneless\libsignal-service\src\WebAPI.js:620:14)
    at AccountManager.requestSMSVerification (C:\freelance\node_signal_bot\node_modules\@throneless\libsignal-service\src\AccountManager.js:49:24)
    at Object.<anonymous> (C:\freelance\node_signal_bot\register_new_bot.js:23:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 400,
  response: '{"code":400,"message":"HTTP 400 Bad Request"}'
malufett commented 3 years ago

I got same result "HTTP ERROR 402 Payment Required"

ankushbhardwxj commented 3 years ago

I got "402" on both requestSMSVerification & requestVoiceVerification. Any idea how to fix this ?

vladox commented 3 years ago

see https://github.com/throneless-tech/libsignal-service-javascript/issues/8

lipflip commented 3 years ago

I had the exact same issue...

you have to get the code, described here:

https://github.com/AsamK/signal-cli/wiki/Registration-with-captcha

The forked project of gausma has implemented a fix to pass the catpcha code to AccountManager.requestSMSVerification(captcha);

Maybe this could be implemented in this main stream too?