Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionFailedError on startPhoneVerification #52

Closed
phiresky opened this issue Nov 27, 2018 · 3 comments · Fixed by #59
Closed

AssertionFailedError on startPhoneVerification #52

phiresky opened this issue Nov 27, 2018 · 3 comments · Fixed by #59

Comments

@phiresky
Copy link

This happens for around 100 different numbers each day from many different countries (CA, FR, AU)

Sometimes carrier is null, sometimes it is not there at all, sometimes is_phonenumber is missing.

Example:

2018-11-27 13:47:27: send_phone_verification { country: 'FR', phone: 'XXXX' } { AssertionFailedError: 500 Internal Server Error
    at assert (node_modules/authy-client/dist/src/validator.js:60:11)
    at Client.rpc.postAsync.bind.then.tap.response (node_modules/authy-client/dist/src/client.js:750:31)
  message: 'Internal Server Error',
  data: 
   { message: 'SMS envoyé à +33 XXXXX.',
     seconds_to_expire: 599,
     uuid: 'XXXXX',
     success: true },
  errors: 
   { carrier: 
      { __class__: 'Violation',
        assert: [Object],
        value: [Object],
        violation: [Object] },
     is_cellphone: 
      { __class__: 'Violation',
        assert: [Object],
        value: [Object],
        violation: [Object] } },
  name: 'AssertionFailedError',
  code: 500 }

and another one:

  message: 'Internal Server Error',
  data: 
   { carrier: null,
     is_cellphone: true,
     message: 'SMS inviato a +39 XXXX',
     seconds_to_expire: 599,
     uuid: 'XXXXX',
     success: true },
  errors: { carrier: [ [Object] ] },
  name: 'AssertionFailedError',

This might have something to do with:

https://support.twilio.com/hc/en-us/articles/360004563433

@ZiNai
Copy link

ZiNai commented Jan 23, 2019

image

I have the same problem.when I sent to CN , its ok ,but sent to CA its tell me 'Internal Server Error'. But the details are 'success'.

I have to wrap node-authy api.
Maybe you can use it. @phiresky

@ReguloSarmiento
Copy link

ReguloSarmiento commented May 15, 2019

Any update on this issue? I have the same problem with IE, UK.

{ AssertionFailedError: Internal Server Error
    at assert (/user_code/node_modules/authy-client/dist/src/validator.js:60:11)
    at Client.rpc.postAsync.bind.then.tap.response (/user_code/node_modules/authy-client/dist/src/client.js:750:31)
    at PassThroughHandlerContext.finallyHandler (/user_code/node_modules/bluebird/js/release/finally.js:57:23)
    at PassThroughHandlerContext.tryCatcher (/user_code/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/user_code/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/user_code/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/user_code/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/user_code/node_modules/bluebird/js/release/promise.js:694:18)
    at Promise._fulfill (/user_code/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/user_code/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/user_code/node_modules/bluebird/js/release/promise.js:524:17)
    at Promise._settlePromise (/user_code/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/user_code/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/user_code/node_modules/bluebird/js/release/promise.js:694:18)
    at Promise._fulfill (/user_code/node_modules/bluebird/js/release/promise.js:638:18)
    at Request._callback (/user_code/node_modules/bluebird/js/release/nodeback.js:45:21)
  message: 'Internal Server Error',
  data: 
   { message: 'Text message sent to +44 XXXXXXXX.',
     seconds_to_expire: 599,
     uuid: '057c4bf0-56e8-0137-003f-0e7944cc8984',
     success: true },
  errors: 
   { carrier: 
      { __class__: 'Violation',
        assert: [Object],
        value: [Object],
        violation: [Object] },
     is_cellphone: 
      { __class__: 'Violation',
        assert: [Object],
        value: [Object],
        violation: [Object] } },
  name: 'AssertionFailedError',
  code: 500 } 

@ruimarinho
Copy link
Owner

These validations will have to be relaxed then. You would expect a boolean which is referenced on their API docs to either be true or false 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants