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

Incorrect format for phone number error thrown on checkout #3965

Closed
nnnnat opened this issue Mar 9, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@nnnnat
Copy link
Member

commented Mar 9, 2018

Prerequisites

  • Are you running the latest version?
  • Are you able to consistently reproduce the issue?
  • Did you search the issue queue for existing issue? Search issues

Issue Description

Right after completing the checkout process the server is throwing this error in the terminal.

16:37:48.300Z  INFO Reaction: Transitioned cart rkLZCAJ62QWrbmiTt to order J5uT5KQgDDT3mybCg
16:37:50.172Z  WARN Reaction:
  Error: error occured while sending sms { Error: Error: Incorrect format for phone number. [invalid-parameter] [invalid-parameter]
      at formatPhoneNumber (lib/api/helpers.js:227:11)
      at MethodInvocation.sms/send (imports/plugins/included/sms/server/methods/sms.js:79:28)
      at packages/check/match.js:108:16
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:107:41)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
      at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:1686:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at resolve (packages/ddp-server/livedata_server.js:1684:36)
      at new Promise (<anonymous>)
      at Server.applyAsync (packages/ddp-server/livedata_server.js:1683:12)
      at Server.apply (packages/ddp-server/livedata_server.js:1622:26)
      at Server.call (packages/ddp-server/livedata_server.js:1604:17)
      at MethodInvocation.notification/send (imports/plugins/included/notifications/server/methods/notifications.js:57:16)
      at packages/check/match.js:108:16
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:107:41)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
      at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:1686:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at resolve (packages/ddp-server/livedata_server.js:1684:36)
      at new Promise (<anonymous>)
      at Server.applyAsync (packages/ddp-server/livedata_server.js:1683:12)
      at Server.apply (packages/ddp-server/livedata_server.js:1622:26)
      at Server.call (packages/ddp-server/livedata_server.js:1604:17)
      at MethodInvocation.MethodHooks.after.options (imports/plugins/included/notifications/server/hooks/notification.js:35:10)
      at _each (server/api/method-hooks.js:126:36)
      at arrayEach (/Users/nat/Code/Projects/Reaction/pr-reaction/node_modules/lodash/_arrayEach.js:15:9)
      at forEach (/Users/nat/Code/Projects/Reaction/pr-reaction/node_modules/lodash/forEach.js:38:10)
      at MethodInvocation.MethodHooks._wrappers.(anonymous function) (server/api/method-hooks.js:125:5)
      at packages/check/match.js:108:16
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:107:41)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    isClientSafe: true,
    error: 'invalid-parameter',
    reason: 
     { Error: Incorrect format for phone number. [invalid-parameter]
      at formatPhoneNumber (lib/api/helpers.js:225:11)
      at MethodInvocation.sms/send (imports/plugins/included/sms/server/methods/sms.js:79:28)
      at packages/check/match.js:108:16
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:107:41)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
      at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:1686:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at resolve (packages/ddp-server/livedata_server.js:1684:36)
      at new Promise (<anonymous>)
      at Server.applyAsync (packages/ddp-server/livedata_server.js:1683:12)
      at Server.apply (packages/ddp-server/livedata_server.js:1622:26)
      at Server.call (packages/ddp-server/livedata_server.js:1604:17)
      at MethodInvocation.notification/send (imports/plugins/included/notifications/server/methods/notifications.js:57:16)
      at packages/check/match.js:108:16
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:107:41)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
      at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:1686:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at resolve (packages/ddp-server/livedata_server.js:1684:36)
      at new Promise (<anonymous>)
      at Server.applyAsync (packages/ddp-server/livedata_server.js:1683:12)
      at Server.apply (packages/ddp-server/livedata_server.js:1622:26)
      at Server.call (packages/ddp-server/livedata_server.js:1604:17)
      at MethodInvocation.MethodHooks.after.options (imports/plugins/included/notifications/server/hooks/notification.js:35:10)
      at _each (server/api/method-hooks.js:126:36)
      at arrayEach (/Users/nat/Code/Projects/Reaction/pr-reaction/node_modules/lodash/_arrayEach.js:15:9)
      at forEach (/Users/nat/Code/Projects/Reaction/pr-reaction/node_modules/lodash/forEach.js:38:10)
      at MethodInvocation.MethodHooks._wrappers.(anonymous function) (server/api/method-hooks.js:125:5)
      at packages/check/match.js:108:16
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:107:41)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
       isClientSafe: true,
       error: 'invalid-parameter',
       reason: 'Incorrect format for phone number.',
       details: undefined,
       message: 'Incorrect format for phone number. [invalid-parameter]',
       errorType: 'Meteor.Error' },
    details: undefined,
    message: 'Error: Incorrect format for phone number. [invalid-parameter] [invalid-parameter]',
    errorType: 'Meteor.Error' }

Steps to Reproduce

You'll need the reaction devtools installed to reproduce

  1. Spin up a new RC shop, log in as an admin and set up a payment provider and shipping.
  2. As an admin open the dev-tools panel, click "reset data" then load in the small product set as well as the small order set.
  3. In another browser as an anonymous customer select an item from the product grid, add a few to the cart and click the "checkout" button.
  4. Complete the checkout process and wait for the Order confirmation screen.
  5. The error should be thrown in the terminal within a few seconds of the checkout completion.

Notes
I've been able to reproduce this almost everytime but only if I do the loading in the sample data step. If I try to reproduce with just the "basic product" and won't see the error at checkout.

Possible Solution

Not super familiar with that part of the app but it looks like the SMS plugin is doing something to cause the error even though it had not been enabled.

Versions

Node: 9.4.0
NPM: 5.6.0
Meteor Node: 8.9.4
Meteor NPM: 5.6.0
Reaction CLI: 0.28.0
Reaction: 1.9.0
Reaction branch: release-1.9.0
Docker: 18.02.0-ce
@zenweasel

This comment has been minimized.

Copy link
Member

commented Mar 12, 2018

@nnnnat I think a missing reproduction step here is to enter an incorrect phone number for the country you are using for your address. I've been testing with the sample-data set all day and have not seen this error, but see it if I enter a phone number not appropriate for my country (e.g. a US number for a PH address)

Bumping this up to Major as browser/server errors are always major even when they don't directly impact functionality per @aaronjudd

@zenweasel zenweasel added impact-major and removed impact-minor labels Mar 12, 2018

@zenweasel

This comment has been minimized.

Copy link
Member

commented Mar 12, 2018

@nnnnat Is there a reason this was made an epic?

@Akarshit Akarshit self-assigned this Mar 12, 2018

@nnnnat

This comment has been minimized.

Copy link
Member Author

commented Mar 12, 2018

@zenweasel Yes I think you're right about the phone number, I was entering bogus numbers like "2342342345" with a US address. This issue didn't need to be an epic I must have made it one by mistake.

spencern added a commit that referenced this issue Mar 14, 2018

Merge pull request #3983 from reactioncommerce/fix-3965-akarshit-sms-…
…enable

Fix #3965: Check for number if sms is enabled.

@Akarshit Akarshit closed this Mar 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.