RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.04k stars 10.33k forks source link

Error with Twilio SMS, but only for some numbers, HTTP response 400: Cannot destructure property 'httpHeaders' of 'connectionData' as it is undefined. #33194

Open asheroto opened 1 week ago

asheroto commented 1 week ago

Description:

For some reason when using Rocket Chat with Twilio SMS, I am getting this error message. The odd part is, it works fine if I'm texting from a regular cell phone number, but when texting from certain numbers like Google Voice, it fails with the error as the body of the HTTP request:

{"success":false,"error":"Cannot destructure property 'httpHeaders' of 'connectionData' as it is undefined."}

I don't see anything mentioned in the RocketChat Reports log area.

Twilio shows http response code 400 with message bad request. Twilio error is 11200 which is HTTP retrieval failure.

Again, if I send a message from a regular cell phone number, it appears to work. This is not a Google Voice issue, because I can text back and forth between all other numbers. This doesn't appear to be a Twilio issue, because Twilio is reporting HTTP status code 400.

My firewall is not blocking it, because in watching the logs I do see the POST request hit my server.

Steps to reproduce:

  1. Text number from cell phone number to confirm working
  2. Create a free Google Voice account (takes < 5 minutes) and send a test message to RocketChat SMS number

Expected behavior:

SMS should appear

Actual behavior:

SMS does not appear, HTTP status code 400 results

Server Setup Information:

Client Setup Information

Additional context

-

Relevant logs:

I am getting these logs, but not sure if it's related. When I send a text and it goes through, I see 2x new DeprecationWarning messages. When I send a text that results in 400, it does NOT create one of these entries. This may be yet a separate issue, not sure.

{"level":40,"time":"2024-09-02T06:06:48.640Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"API","msg":"The parameter \"query\" in the endpoint \"/api/v1/integrations.list\" is deprecated and will be removed on version 7.0.0"} 
{"level":40,"time":"2024-09-02T06:20:29.543Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"METHOD","msg":"The method \"livechat:setCustomField\" is deprecated and will be removed on version 7.0.0"} 
{"level":40,"time":"2024-09-02T06:20:29.547Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"METHOD","msg":"The method \"livechat:setCustomField\" is deprecated and will be removed on version 7.0.0"} 
{"level":40,"time":"2024-09-02T06:32:49.470Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"METHOD","msg":"The method \"livechat:setCustomField\" is deprecated and will be removed on version 7.0.0"} 
{"level":40,"time":"2024-09-02T06:32:49.475Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"METHOD","msg":"The method \"livechat:setCustomField\" is deprecated and will be removed on version 7.0.0"} 
{"level":40,"time":"2024-09-02T06:35:51.210Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"METHOD","msg":"The method \"livechat:setCustomField\" is deprecated and will be removed on version 7.0.0"} 
{"level":40,"time":"2024-09-02T06:35:51.213Z","pid":1,"hostname":"*****","name":"DeprecationWarning","section":"METHOD","msg":"The method \"livechat:setCustomField\" is deprecated and will be removed on version 7.0.0"} 

FYI I tried reading the collecting logs article linked in your issue template, but the URL appears to have been moved? Looks like the GitHub issue template needs to be updated. https://rocket.chat/docs/contributing/reporting-issues#gathering-logs

image

reetp commented 1 week ago

Going to ask about this.

Please be patient.