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

Unable to update phone-number property #76

Closed
rowatson opened this issue Jul 19, 2019 · 1 comment
Closed

Unable to update phone-number property #76

rowatson opened this issue Jul 19, 2019 · 1 comment

Comments

@rowatson
Copy link

Issue Summary

Running the TwilioQuest 3, Twilio-CLI mission to set up a webhook, the CLI command returned an error.

Steps to Reproduce

  1. In TwilioQuest 3, in the twilio-cli missions, run the Set up a webhook mission.
  2. Run the sample code for that mission in the TQ3 host
  3. Test the server is working via REST tool (e.g. Postman)
  4. Run the twilio-cli command to update a phone number to use this server
twilio phone-numbers:update +14079102307 --sms-url="http://localhost:8767/sms" --sms-method=POST --voice-url="http://localhost:8767/voice" --voice-method=POST
  1. Get this response:
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
  1. Run command with debug output and get this response
 [DEBUG] Config File: /Users/rowatson/.twilio-cli/config.json
[DEBUG] Using project: TQ Project 1
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/ACbbfe799d2a5b5412d13f36c066e20cc1/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+14079102307"}
[DEBUG] User-Agent: @twilio/cli-core/2.0.3 (twilio-node/3.33.1, node.js v10.16.0, darwin 16.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --

 » getaddrinfo ENOTFOUND api.twilio.com api.twilio.com:443
[DEBUG] TwilioCliError: getaddrinfo ENOTFOUND api.twilio.com api.twilio.com:443
    at IncomingPhoneNumberHelper.findPhoneNumber (/usr/local/Cellar/twilio/1.3.4/libexec/src/services/resource-helpers/api/v2010/incoming-phone-number.js:26:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  1. In a previous attempt, I got this response:
4934:~ rowatson$ twilio phone-numbers:update +14079102307 --sms-url='http://localhost:8767/sms' -l debug --voice-url='http://localhost:8767/voice' --sms-method=POST --voice-method=POST
[DEBUG] Config File: /Users/rowatson/.twilio-cli/config.json
[DEBUG] Using project: TQ Project 1
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/ACbbfe799d2a5b5412d13f36c066e20cc1/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+14079102307"}
[DEBUG] User-Agent: @twilio/cli-core/2.0.3 (twilio-node/3.33.1, node.js v10.16.0, darwin 16.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Fri, 19 Jul 2019 16:56:05 GMT","content-type":"application/json; charset=utf-8","content-length":"1499","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQff893d6431874191939882bba867af22","twilio-request-duration":"0.123","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] socket hang up
[DEBUG] Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketOnEnd (_http_client.js:426:23)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

EXPECTED BEHAVIOR:

  • Phone number properties to be updated.

Technical details:

  • twilio-cli Version:

    VERSION
    twilio-cli/1.3.4 darwin-x64 node-v10.16.0

  • Node.js Version: 8.12.0

@rowatson
Copy link
Author

Looks like I hit it when it wasn't 100% online.

4934:~ rowatson$ twilio phone-numbers:update +14079102307 --sms-url='http://localhost:8767/sms' --sms-method=POST --voice-url='http://localhost:8767/voice' --voice-method=POST
SID                                 Result   SMS URL                        SMS Method  Voice URL                        Voice Method
PN55df3c763f38bd8589196d91f68c1256  Success  https://998de746.ngrok.io/sms  POST        https://998de746.ngrok.io/voice  POST 

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

No branches or pull requests

1 participant