Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection was Reset (Response Code 400 Bad Request) #314

Open
jyang3737 opened this issue Jan 16, 2023 · 0 comments
Open

Connection was Reset (Response Code 400 Bad Request) #314

jyang3737 opened this issue Jan 16, 2023 · 0 comments

Comments

@jyang3737
Copy link

jyang3737 commented Jan 16, 2023

I am pretty sure I setup something wrong but I am not sure where I messed up. I am running Docker in Synology. I keep getting a Discord notification regarding login but every time I click on the link, the webpage says that the "Connection was reset".

Port Settings

Local Port: 3000
Container Port: 3000
Type: tcp

config.json

{
  "runOnStartup": true,
  "cronSchedule": "5 16 * * *",
  "logLevel": "trace",
  "browserNavigationTimeout": 300000,
  "testNotifiers": false,
  "webPortalConfig": {
    "baseUrl": "http://localhost:3000",
  },
  "accounts": [
    {
      "email": "[email protected]",
      "password": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "totp": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
  ],
  "notifiers": [
    {
      "type": "discord",
      "webhookUrl": "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXX",
      // Optional list of users or roles to mention
      "mentionedUsers": ["XXXXXXXXXXXXXXX"],
      //"mentionedRoles": ["XXXXXXXXXXXXXXX"],
    },
    {
      "type": "bark",
      // your bark key
      "key": "xxxxxxxxxxxxxxxxxxxxxx",
      // bark title, optional, default: 'epicgames-freegames'
      "title": "epicgames-freegames",
      // bark group, optional, default: 'epicgames-freegames'
      "group": "epicgames-freegames",
      // bark private service address, optional, default: 'https://api.day.app'
      "apiUrl": "https://api.day.app"
    },
  ],
}

Log

> [email protected] entrypoint-config

> node dist/src/entrypoint-config.js

Setting timezone: US/Central

Run on startup: true

[2023-01-16 17:00:31.872 -0600] INFO: Started epicgames-freegames-node

    COMMIT_SHA: "67778639ee9bc09c8a543f7e7904116f850dcabc"

    BRANCH: "master"

    DISTRO: "alpine"

[2023-01-16 17:00:31.873 -0600] DEBUG: Performing version check

    PROJECT_NAME: "epicgames-freegames-node"

    BRANCH: "master"

    COMMIT_SHA: "67778639ee9bc09c8a543f7e7904116f850dcabc"

[2023-01-16 17:00:32.298 -0600] TRACE: Response from GitHub API

    latestSha: "67778639ee9bc09c8a543f7e7904116f850dcabc"

[2023-01-16 17:00:32.302 -0600] INFO: Checking free games for [email protected] 

    user: "[email protected]"

[2023-01-16 17:00:32.302 -0600] DEBUG: Launching a new browser

    user: "[email protected]"

[2023-01-16 17:00:32.823 -0600] DEBUG: Logging in with puppeteer

    user: "[email protected]"

[2023-01-16 17:00:32.823 -0600] DEBUG: Launching a new browser

    user: "[email protected]"

[2023-01-16 17:00:33.058 -0600] DEBUG: Launching a new page

    user: "[email protected]"

[2023-01-16 17:00:33.216 -0600] TRACE: devtools://devtools/bundled/inspector.html?ws=127.0.0.1:39778/devtools/page/8BAA77774EAA2DA8F36E4DC0B3ED6618

    user: "[email protected]"

[2023-01-16 17:00:50.192 -0600] DEBUG: Could not refresh credentials. Logging in fresh.

    user: "[email protected]"

[2023-01-16 17:00:50.192 -0600] TRACE: Navigating to Epic Games login page

    user: "[email protected]"

[2023-01-16 17:00:58.543 -0600] TRACE: Waiting for email field

    user: "[email protected]"

[2023-01-16 17:00:58.563 -0600] TRACE: Filling email field

    user: "[email protected]"

[2023-01-16 17:00:58.894 -0600] TRACE: Waiting for password field

    user: "[email protected]"

[2023-01-16 17:00:58.903 -0600] TRACE: Filling password field

    user: "[email protected]"

[2023-01-16 17:00:59.404 -0600] TRACE: Waiting for sign-in button

    user: "[email protected]"

[2023-01-16 17:00:59.412 -0600] TRACE: Clicking sign-in button

    user: "[email protected]"

[2023-01-16 17:01:01.236 -0600] TRACE: Waiting for sign-in result

    user: "[email protected]"

[2023-01-16 17:01:01.237 -0600] TRACE: Waiting for hcaptcha iframe

    user: "[email protected]"

[2023-01-16 17:01:02.929 -0600] TRACE: Captcha detected

    user: "[email protected]"

[2023-01-16 17:01:02.940 -0600] INFO: Go to this URL and do something

    user: "[email protected]"

    url: "http://localhost:3000/?targetId=8BAA77774EAA2DA8F36E4DC0B3ED6618"

[2023-01-16 17:01:02.941 -0600] TRACE: Sending discord notification

    user: "[email protected]"

    reason: "LOGIN"

[2023-01-16 17:01:02.946 -0600] TRACE: Sending Bark notification

    user: "[email protected]"

    reason: "LOGIN"

[2023-01-16 17:01:02.946 -0600] TRACE: Sending request

    user: "[email protected]"

    reason: "LOGIN"

    requestUrl: "https://api.day.app/xxxxxxxxxxxxxxxxxxxxxx/epicgames-freegames/reason%3A%20LOGIN%2C%20account%3A%20xxxxx%40gmail.com?url=http%3A%2F%2Flocalhost%3A3000%2F%3FtargetId%3D8BAA77774EAA2DA8F36E4DC0B3ED6618&group=epicgames-freegames"

[2023-01-16 17:01:03.852 -0600] ERROR: Response code 400 (Bad Request)

    user: "[email protected]"

    reason: "LOGIN"

    err: {

      "type": "HTTPError",

      "message": "Response code 400 (Bad Request)",

      "stack":

          HTTPError: Response code 400 (Bad Request)

              at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:118:42)

              at processTicksAndRejections (node:internal/process/task_queues:95:5)

      "name": "HTTPError",

      "code": "ERR_NON_2XX_3XX_RESPONSE",

      "timings": {

        "start": 1673910062954,

        "socket": 1673910062956,

        "lookup": 1673910063010,

        "connect": 1673910063032,

        "secureConnect": 1673910063637,

        "upload": 1673910063637,

        "response": 1673910063843,

        "end": 1673910063844,

        "phases": {

          "wait": 2,

          "dns": 54,

          "tcp": 22,

          "tls": 605,

          "request": 0,

          "firstByte": 206,

          "download": 1,

          "total": 890

        }

      }

    }

[2023-01-16 17:01:03.852 -0600] ERROR: Failed to send message

    user: "[email protected]"

    reason: "LOGIN"

    type: "bark"

    title: "epicgames-freegames"

    group: "epicgames-freegames"
	
	    apiUrl: "https://api.day.app"

    key: "xxxxxxxxxxxxxxxxxxxxxx"

[2023-01-16 17:01:04.162 -0600] ERROR: Encountered an error during browser automation. Saved a screenshot for debugging purposes.

    user: "[email protected]"

    errorFile: "error-2023-01-16T23:01:03.853Z.png"

[2023-01-16 17:01:04.170 -0600] ERROR: {"code":400,"message":"failed to get device token: failed to get [xxxxxxxxxxxxxxxxxxxxxx] device token from database","timestamp":1673910063}

    user: "[email protected]"

[2023-01-16 17:01:04.170 -0600] ERROR: Response code 400 (Bad Request)

    user: "[email protected]"

    err: {

      "type": "HTTPError",

      "message": "Response code 400 (Bad Request)",

      "stack":

          HTTPError: Response code 400 (Bad Request)

              at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:118:42)

              at processTicksAndRejections (node:internal/process/task_queues:95:5)

      "name": "HTTPError",

      "code": "ERR_NON_2XX_3XX_RESPONSE",

      "timings": {

        "start": 1673910062954,

        "socket": 1673910062956,

        "lookup": 1673910063010,

        "connect": 1673910063032,

        "secureConnect": 1673910063637,

        "upload": 1673910063637,

        "response": 1673910063843,

        "end": 1673910063844,

        "phases": {

          "wait": 2,

          "dns": 54,

          "tcp": 22,

          "tls": 605,

          "request": 0,

          "firstByte": 206,

          "download": 1,

          "total": 890

        }

      }

    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant