DoSomethingArchive / gambit-content

:black_joker: Content API for Gambit
MIT License
2 stars 5 forks source link

Irregular reportback failures #529

Closed aaronschachter closed 8 years ago

aaronschachter commented 8 years ago

From corresponding Trello card:

A user reported back on WRW and a confirmation message was never sent to him, so his reportback never came through to the site. He tried to reportback two more times by texting DROP and sending his photo. After sending his photo, the RB caption message was never sent to him.

The Trello card contains specific profiles, and also this from Mobile Commons:

If you could track down why we’re getting the 301 that would help. I’m not sure what the heroku app is doing, but if we’re trying to make a request to it that’s causing the redirect, you should be able to see some details in the app logs that will help us see if we need to fix anything on our end."

Needs investigating if it's this app throwing the 301 or potentially the Phoenix API? Hopefully cleaning up New Relic (#518) will help make our logs intelligible.

aaronschachter commented 8 years ago

Curious if this "uncaughtException: Unexpected token <" I see in the logs_exceptions collection has something to do with this:

message: "uncaughtException: Unexpected token <",
  timestamp: ISODate("2016-06-07T21:09:53.062Z"),
  level: "error",
  meta: {
    date: "Tue Jun 07 2016 21:09:53 GMT+0000 (UTC)",
    process: {
      pid: NumberLong("14"),
      uid: NumberLong("30183"),
      gid: NumberLong("30183"),
      cwd: "/app",
      execPath: "/app/.heroku/node/bin/node",
      version: "v0.10.41",
      argv: [
        "node",
        "/app/server"
      ],
      memoryUsage: {
        rss: NumberLong("134230016"),
        heapTotal: NumberLong("96357376"),
        heapUsed: NumberLong("51082464")
      }
    },
    os: {
      loadavg: [
        12.1640625,
        10.10009765625,
        8.2421875
      ],
      uptime: 2865989.460325097
    },
    trace: [
      {
        column: null,
        file: null,
        function: "Object.parse",
        line: null,
        method: "parse",
        native: true
      },
      {
        column: NumberLong("23"),
        file: "/app/app/lib/reportback/index.js",
        function: "Object.onFindUserUid",
        line: NumberLong("292"),
        method: "onFindUserUid",
        native: false
      },
    ... 
aaronschachter commented 8 years ago

This sounds like it might be related to #506

justkika commented 8 years ago

Thank you @aaronschachter! After reading the issue attached above it does seem similar with one exception: All of the members appear to be in the "Ask Why" stage of reporting back, should be a text field and not anticipating an image.

We've cross referenced the profiles we can find and discovered that the image sent at the beginning of the reportback flow is not being associated with the member profile on Phoenix.

aaronschachter commented 8 years ago

We've cross referenced the profiles we can find and discovered that the image sent at the beginning of the reportback flow is not being associated with the member profile on Phoenix.

This is because the reportbacks are never making it into Phoenix. Per #506, once a reportback submission fails, unfortunately it will fail every time for the user.

We haven't seen any evidence of 301's per the original description / Trello card. Going to close this and continue work against original issue #506

aaronschachter commented 8 years ago

Was looking to find what the save_to parameters do in the reportback/:campaign endpoint, which were introduced in #516. Looks like they could potentially come in handy for when it's time toimport our completed Reportbacks that never made it into Phoenix. Import schedule TBD