Ekkstein / pack-o-bot

A minimal Hearthstone pack tracker that logs packs to pitytracker.com
MIT License
15 stars 4 forks source link

Statuscode: 404 issues #20

Closed clickety closed 5 years ago

clickety commented 5 years ago

Pack-o-bot isn't uploading packs for me right now; it's "Retrying pack upload... (statusCode: 404)". I've made sure my token is correct; and restarted to verify. One of the packs I opened contains a new Classic legendary - maybe the new cards are the issue?

mlntn commented 5 years ago

@geraldhiller Do you know if there’s an issue with pitytracker?

StarzeeBEAST commented 5 years ago

@mlntn I've also been getting this issue no matter what i do, I have not opened any of the new classic cards. Every time i launch the bot it boots up with the 404 error and doesn't change. I can open a new instance then close the old one and it will say "waiting for packs" It will then find the new pack i open but then fail to upload it also.

wfentress commented 5 years ago

I've uploaded several packs since this issue was reported. The only one that failed was the only one with new cards. It's also the only Classic pack I've tried to upload in a while. Here's the request I logged from my forked version (using request-promise-native instead of request):

{
  "url": "https://pitytracker.com/api/v1/packs",
  "body": {
    "created_at_hs": "Mon Jul 15 2019 07:24:03 GMT+0000 (Coordinated Universal Time)",
    "region": "us",
    "cards": [
      {
        "cardId": "EX1_556",
        "golden": false,
        "owned": 11,
        "time": "2019-07-15T07:24:03.202Z"
      },
      {
        "cardId": "EX1_130",
        "golden": false,
        "owned": 14,
        "time": "2019-07-15T07:24:03.222Z"
      },
      {
        "cardId": "EX1_537",
        "golden": false,
        "owned": 4,
        "time": "2019-07-15T07:24:03.242Z"
      },
      {
        "cardId": "EX1_275",
        "golden": false,
        "owned": 6,
        "time": "2019-07-15T07:24:03.251Z"
      },
      {
        "cardId": "EX1_188",
        "golden": false,
        "owned": 1,
        "time": "2019-07-15T07:24:03.260Z"
      }
    ],
    "pending": true
  },
  "json": true,
  "headers": {
    "pobtoken": "mysecret",
    "Authorization": "Token token=\"yoursecret\"",
    "Content-Type": "application/json"
  },
  "timeout": 10000
}

And the response:

{
  "statusCode": 404,
  "body": {
    "status": "404",
    "error": "Not Found"
  },
  "headers": {
    "content-type": "application/json; charset=utf-8",
    "content-length": "36",
    "connection": "close",
    "status": "404 Not Found",
    "strict-transport-security": "max-age=31536000",
    "x-request-id": "c6186ddc-ebbc-4f41-a4b0-6ca4d794fbcf",
    "x-runtime": "0.020959",
    "date": "Mon, 15 Jul 2019 07:24:03 GMT",
    "x-powered-by": "Phusion Passenger 5.0.30",
    "server": "nginx/1.10.1 + Phusion Passenger 5.0.30"
  },
  "request": {
    "uri": {
      "protocol": "https:",
      "slashes": true,
      "auth": null,
      "host": "pitytracker.com",
      "port": 443,
      "hostname": "pitytracker.com",
      "hash": null,
      "search": null,
      "query": null,
      "pathname": "/api/v1/packs",
      "path": "/api/v1/packs",
      "href": "https://pitytracker.com/api/v1/packs"
    },
    "method": "POST",
    "headers": {
      "pobtoken": "mysecret",
      "Authorization": "Token token=\"yoursecret\"",
      "Content-Type": "application/json",
      "accept": "application/json",
      "content-length": 523
    }
  }
}
Ekkstein commented 5 years ago

@wfentress Thank you very much for the info. I just went and fixed the issue. It should be back to normal. Thank you everybody for reporting this issue. If a problem remains, let me know and I'll try to fix it asap. Cheers!