TalkBot
TalkBot copied to clipboard
Twilio Timeouts and Firebase database issue
First off, thank you for your time and effort in this! It's a tremendous tutorial and fills a huge gap in the Twilio library. Very well written and accessible. I've installed/configured on Glitch and have it mostly working, except for two issues:
- While everything works correctly with inbound messages to the Twilio number, it posts to the Slack Channel, Twilio posts a error message based on timeout:
Msg=Request+reached+timeout+of+15000+ms+after+15020+ms&sourceComponent=14100&ErrorCode=11200&EmailNotification=false&LogLevel=ERROR&url=[my glitch url]%2Fsms
It looks like a response code isn't posted to Twilio.
Not critical, but annoying. Also, it'll lead to notification fatigue with the fallback constantly pinging. Instead of alerting us to something being broken in the primary application!
- When selecting the White Check Mark, the application throws an error. The database doesn't update by removing the the user's phone number.
FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": ".value" at /users to your security rules for better performance.
11:17 PM
Error: Reference.child failed: First argument was an invalid path = "null". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"
11:17 PM
at Object.exports.validatePathString (/app/node_modules/@firebase/database/dist/cjs/src/core/util/validation.js:282:15)
11:17 PM
at Reference.child (/app/node_modules/@firebase/database/dist/cjs/src/api/Reference.js:83:30)
11:17 PM
Jump to
at deleteUser (/app/index.js:254:19)
11:17 PM
Jump to
at getNum.then (/app/index.js:101:20)
11:17 PM
at process._tickCallback (internal/process/next_tick.js:109:7)
- This is pretty minor, but maybe worth flagging more explicitly in the tutorial that the user needs to update their phone number in the code to their Twilio number?
Adding
res.set('Content-Type', 'application/xml');
res.send("<Response/>");
to /sms resolves #1.