Closed jamjensen closed 7 years ago
Wanted to see if I could replicate this as a staffer, but I received the reportback confirmation message after texting back my why participated, as expected.
Suggested next steps on this one:
LOGGING_LEVEL
to debug
and replicate, looking for potential cluesreportback_submissions
documents for the given user/campaign when replicable. Try to replicate locally using the affected's mobile numbers... don't know for sure, but this seems like something bizarre with their DS account config that's causing the bug I'm getting this on Thor when reporting back for Mirror Messages, it will happen when a POST Reportback to Phoenix fails, because Gambit isn't handling the POST Reportback error. Since no error is returned, Gambit posts a blank payload to the Mobile Commons API. Mobile Commons then returns the last saved gambit_chatbot_response
field to the end user (which is why the ask_why
message keeps repeating).
017-01-31T19:50:57.923426+00:00 app[web.1]: [32minfo[39m: loaded user:5547be89469c64ec7d8b518d
2017-01-31T19:50:58.316428+00:00 app[web.1]: [32minfo[39m: loaded signup:2812178
2017-01-31T19:50:58.317118+00:00 app[web.1]: [33mwarn[39m: no messages sent from continueReportbackSubmission
2017-01-31T19:51:00.239421+00:00 app[web.1]: [31merror[39m: Cannot parse API response.
2017-01-31T19:51:00.243101+00:00 app[web.1]: [31merror[39m: campaignBot.campaign:7 user:5547be89469c64ec7d8b518d postReportback Error: Cannot parse API response.:undefined
2017-01-31T19:51:00.246090+00:00 app[web.1]: [32minfo[39m: mobilecommons.profile_update profile:136122001 oip:214465 update:{}
Refs: https://dosomething.slack.com/archives/team-odoyle/p1485890863000646
The POST campaigns/:id/reportback
response just prints the string \n\nnull
for my user.
I was hoping this was only happening on certain campaigns because of translation/run misconfiguration -- but it seems to be occurring for all staigng campaigns (ones that have proper translations, like Get Lucky id:2900). I was able to successfully reportback on a production campaign (texting LETTER)
@chloealee made a configuration change to Thor that's fixed the POST reportbacks response.
The chatbot
route isn't returning an error code back to Mobile Commons, which is why it repeats the "Ask Why" message over and over. Technically we should change this to return an error code, so the end user gets the "Sorry, something went wrong" message -- although if the POST request keeps failing, they'll just get that error response back over and over. It makes sense to close out this issue by handling the error (instead of just returning the existing gambit_chatbot_response
value via the Opt-in path)
@jamjensen Not sure why this happened in December as its issue on the Phoenix end, could potentially have been a similar configuration issue. We'd be able to find users this affected by checking the failed_at
property in the reportback_submissions
collection. Once the endpoint works though, the next time a user texts in the keyword -- Gambit tries to resubmit the reportback. This won't work if the Campaign has been closed since though.
This is happening again on Thor -- posting reportbacks are failing. Perhaps due to the DB refresh from Friday.
2017-02-19T18:20:35.591653+00:00 app[web.1]: [34mdebug[39m: Signup.postDraftReportbackSubmission data:{"source":"sms-mobilecommons","uid":1176550,"quantity":8,"caption":"Linkin park","file_url":"https://s3.amazonaws.com/mms.mcommons.com/mms/3118045/oSZyWW1tdxDxX0ns"} 2017-02-19T18:20:37.359502+00:00 heroku[router]: at=info method=POST path="/v1/chatbot" host=ds-mdata-responder-staging.herokuapp.com request_id=a775f697-46aa-4658-8a38-b224fc44b1d1 fwd="64.22.127.230" dyno=web.1 connect=0ms service=2090ms status=200 bytes=226 2017-02-19T18:20:37.350279+00:00 app[web.1]: [31merror[39m: Cannot parse API response. 2017-02-19T18:20:37.353641+00:00 app[web.1]: [31merror[39m: campaignBot.campaign:2070 user:5547be89469c64ec7d8b518d postReportback Error: Cannot parse API response.:undefined 2017-02-19T18:20:37.356467+00:00 app[web.1]: [34mdebug[39m: saved user.current_campaign:2070
Per https://github.com/DoSomething/gambit/issues/771#issuecomment-276699658, closed this issue in #791 by fixing the check for failed POST Reportback requests. The user ends up in an endless loop of mData error messages instead of an endless loop of the last gambit_chatbot_response
they received:
BUG
Current Behavior
When some members (it's not affecting all users) respond to the last question in an SMS flow, they receive the same question instead of the report back confirmation message. We have seen this affect users on all of our active SMS campaigns - Take Back the Shelves, Senior Story Swap, Innovation Inspiration, and Don't Be a Sucker. During the same time period we have also seen successful SMS report backs on each of those campaigns.
Each staff member that was unable to receive the report back confirmation message (James, Lizzy, and Aki) had CGG as their source. Unclear if this is related to root cause, or just correlation.
Has affected 29 users since December 1. For context, there have been 369 SMS reportbacks from 12/21 to 12/22.
Desired Behavior
Steps to Replicate
Why This Matters
Relevant Screenshots + Links
User affected by bug on the 19th -