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

Session closed. Most likely the page has been closed #343

Open
SilverKnightKMA opened this issue Apr 24, 2023 · 4 comments
Open

Session closed. Most likely the page has been closed #343

SilverKnightKMA opened this issue Apr 24, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@SilverKnightKMA
Copy link

Describe the bug

Last week the claiming worked just fine, got the ping on discord got on the link, i do the captcha and the game is claimed. But this time it crashed. Run from source, lastest version (7dda5cb).

Screenshots or Logs

F:\tools\epicgames-freegames-node>npm run start

> [email protected] start
> ts-node src/index.ts

[2023-04-24 10:18:51.926 +0700] INFO: Started epicgames-freegames-node
[2023-04-24 10:18:51.927 +0700] DEBUG: Skipping version check
    skipVersionCheck: false
[2023-04-24 10:18:51.929 +0700] DEBUG: Starting web server for captcha portals
[2023-04-24 10:18:51.935 +0700] INFO: Checking free games for [email protected]
    user: "[email protected]"
[2023-04-24 10:18:51.935 +0700] DEBUG: Launching a new browser
    user: "[email protected]"
[2023-04-24 10:18:52.286 +0700] DEBUG: Logging in with puppeteer
    user: "[email protected]"
[2023-04-24 10:18:52.286 +0700] DEBUG: Launching a new browser
    user: "[email protected]"
[2023-04-24 10:18:52.558 +0700] DEBUG: Launching a new page
    user: "[email protected]"
[2023-04-24 10:18:52.726 +0700] TRACE: devtools://devtools/bundled/inspector.html?ws=127.0.0.1:44358/devtools/page/8C81C2D2DD331F99055612D903E8D611
    user: "[email protected]"
[2023-04-24 10:18:55.480 +0700] ERROR: Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.
    user: "[email protected]"
    err: {
      "type": "Error",
      "message": "Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.",
      "stack":
          Error: Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.
              at CDPSessionImpl.send (F:\tools\epicgames-freegames-node\node_modules\puppeteer-core\src\common\Connection.ts:516:9)
              at next (F:\tools\epicgames-freegames-node\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:34:41)
              at CDPSessionImpl.send (F:\tools\epicgames-freegames-node\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:67:18)
              at CDPPage._CDPPage_screenshotTask (F:\tools\epicgames-freegames-node\node_modules\puppeteer-core\src\common\Page.ts:1382:24)
              at F:\tools\epicgames-freegames-node\node_modules\puppeteer-core\src\common\Page.ts:1374:34
              at processTicksAndRejections (node:internal/process/task_queues:95:5)

Additional context

@SilverKnightKMA SilverKnightKMA added the bug Something isn't working label Apr 24, 2023
@claabs
Copy link
Owner

claabs commented Apr 24, 2023

If you're running from source, maybe you missed running npm i or npm ci in after the latest update? There were some major changes to the puppeteer and chromium versions.

@SilverKnightKMA
Copy link
Author

I will try to clone and config all from scratch

@SilverKnightKMA
Copy link
Author

SilverKnightKMA commented May 3, 2023

Still got this error with new config from scratch, i will post my config.json:

{
  // "testNotifiers": true,
  "searchStrategy": "weekly",
  "runOnStartup": true,
  "cronSchedule": "5 16 * * *",
  "logLevel": "trace",
  "webPortalConfig": {
    "baseUrl": "https://epic.domain.com/",
  },
  "accounts": [
    {
      "email": "[email protected]",
      "password": "pw",
      "totp": "totp"
    },
    {
      "email": "[email protected]",
      "password": "pw",
      "totp": "totp"
    },
    {
      "email": "[email protected]",
      "password": "pw",
    },
  ],
  "notifiers": [
    // You may configure as many of any notifier as needed
    // Here are some examples of each type
    {
      "type": "discord",
      "webhookUrl": "https://discord.com/api/webhooks/webhook",
      // Optional list of users or roles to mention
      "mentionedUsers": ["id"],
      "mentionedRoles": ["id"],
    },
  ],
}

Steps to reproduce the bug:

  1. git clone repo
  2. create config from this file and edit information
{
  "runOnStartup": true,
  "cronSchedule": "5 16 * * *",
  "logLevel": "info",
  "webPortalConfig": {
    "baseUrl": "https://epic.exmaple.com",
  },
  "accounts": [
    {
      "email": "[email protected]",
      "password": "abc1234",
      "totp": "EMNCF83ULU3K3PXPJBSWY3DPEHPK3PXPJWY3DPEHPK3YI69R39NE"
    },
  ],
  "notifiers": [
    // You may configure as many of any notifier as needed
    // Here are some examples of each type
    {
      "type": "email",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587,
      "emailSenderAddress": "[email protected]",
      "emailSenderName": "Epic Games Captchas",
      "emailRecipientAddress": "[email protected]",
      "secure": false,
      "auth": {
          "user": "[email protected]",
          "pass": "abc123",
      },
    },
    {
      "type": "discord",
      "webhookUrl": "https://discord.com/api/webhooks/123456789123456789/A-abcdefghijklmn-abcdefghijklmnopqrst12345678-abcdefghijklmnop123456",
      // Optional list of users or roles to mention
      "mentionedUsers": ["914360712086843432"],
      "mentionedRoles": ["734548250895319070"],
    },
    {
      "type": "telegram",
      // Optional Custom TELEGRAM server URL
      "apiUrl": "https://api.telegram.org",
      "token": "644739147:AAGMPo-Jz3mKRnHRTnrPEDi7jUF1vqNOD5k",
      "chatId": "-987654321",
    },
    {
      "type": "apprise",
      "apiUrl": "http://192.168.1.2:8000",
      "urls": "mailto://user:[email protected]",
    },
    {
      "type": "pushover",
      "token": "a172fyyl9gw99p2xi16tq8hnib48p2",
      "userKey": "uvgidym7l5ggpwu2r8i1oy6diaapll",
    },
    {
      "type": "gotify",
      "apiUrl": "https://gotify.net",
      "token": "SnL-wAvmfo_QT",
    },
    {
      "type": "homeassistant",
      "instance": "https://homeassistant.example.com",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
      "notifyservice": "mobile_app_smartphone_name",
    },
    {
      "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"
    },
    {
        "type": "ntfy",
        "webhookUrl": "https://ntfy.example.com/mytopic",
        "priority": "urgent",
        "token": "tk_mytoken"
    },
  ],
}
  1. npm i
  2. npm run start

@MichaelDavidGK
Copy link

Same issue. config below:

  "runOnStartup": true,
  "cronSchedule": "0 0,6,12,18 * * *",
  "logLevel": "info",
  //"webPortalConfig": {
  //  "baseUrl": "https://epic.example.com",
  //},
  "accounts": [
    {
      "email": "[email protected]",
    },
  ],
  "notifiers": [
    // You may configure as many of any notifier as needed
    // Here are some examples of each type
    //{
    //  "type": "email",
    //  "smtpHost": "smtp.gmail.com",
    //  "smtpPort": 587,
    //  "emailSenderAddress": "[email protected]",
    //  "emailSenderName": "Epic Games Captchas",
    //  "emailRecipientAddress": "[email protected]",
    //  "secure": false,
    //  "auth": {
    //      "user": "[email protected]",
    //      "pass": "abc123",
    //  },
    //},
    //{
    //  "type": "discord",
    //  "webhookUrl": "https://discord.com/api/webhooks/123456789123456789/A-abcdefghijklmn-abcdefghijklmnopqrst12345678-abcdefghijklmnop123456",
    //  // Optional list of users or roles to mention
    //  "mentionedUsers": ["914360712086843432"],
    //  "mentionedRoles": ["734548250895319070"],
    //},
    {
      "type": "telegram",
      // Optional Custom TELEGRAM server URL
      "apiUrl": "https://api.telegram.org",
      "token": "REDACTED:REDACTED",
      "chatId": "REDACTED",
    },
    //{
    //  "type": "apprise",
    //  "apiUrl": "http://192.168.1.2:8000",
    //  "urls": "mailto://user:[email protected]",
    //},
    //{
    //  "type": "pushover",
    //  "token": "a172fyyl9gw99p2xi16tq8hnib48p2",
    //  "userKey": "uvgidym7l5ggpwu2r8i1oy6diaapll",
    //},
    //{
    //  "type": "gotify",
    //  "apiUrl": "https://gotify.net",
    //  "token": "SnL-wAvmfo_QT",
    //},
    //{
    //  "type": "homeassistant",
    //  "instance": "https://homeassistant.example.com",
    //  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    //  "notifyservice": "mobile_app_smartphone_name",
    //},
    //{
    //  "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"
    //},
    //{
    //    "type": "ntfy",
    //    "webhookUrl": "https://ntfy.example.com/mytopic",
    //    "priority": "urgent",
    //    "token": "tk_mytoken"
    //},
    //{
    //  "type":"webhook",
    //  //url of your webhook server
    //  "url":"https://webhook.site/my_uuid",
    //  //Optional headers
    //  "headers": {
    //     "Authentication": "Bearer 123456"
    //  }
    //},
  ],
}

full error:

    user: "[email protected]"
    err: {
      "type": "TargetCloseError",
      "message": "Protocol error (Page.bringToFront): Session closed. Most likely the page has been closed.",
      "stack":
          TargetCloseError: Protocol error (Page.bringToFront): Session closed. Most likely the page has been closed.
              at CdpCDPSession.send (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\cdp\CDPSession.ts:90:9)
              at next (C:\epicgames-freegames-node\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:34:41)
              at CdpCDPSession.send (C:\epicgames-freegames-node\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:54:18)
              at CdpPage.bringToFront (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\cdp\Page.ts:963:37)
              at CdpPage.screenshot (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\api\Page.ts:2448:16)
              at CdpPage.<anonymous> (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\util\decorators.ts:139:27)
              at PuppetFreeGames.handlePageError (C:\epicgames-freegames-node\src\puppet\base.ts:90:7)
              at PuppetFreeGames.setupPage (C:\epicgames-freegames-node\src\puppet\base.ts:70:7)
              at PuppetFreeGames.request (C:\epicgames-freegames-node\src\puppet\free-games.ts:12:19)
              at PuppetFreeGames.getWeeklyFreeGames (C:\epicgames-freegames-node\src\puppet\free-games.ts:115:18)
      "name": "TargetCloseError"
    }
[2024-04-12 19:57:45.206 +0100] WARN: Failed to lookup catalog free games
    user: "[email protected]"
    err: {
      "type": "TargetCloseError",
      "message": "Protocol error (Page.bringToFront): Session closed. Most likely the page has been closed.",
      "stack":
          TargetCloseError: Protocol error (Page.bringToFront): Session closed. Most likely the page has been closed.
              at CdpCDPSession.send (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\cdp\CDPSession.ts:90:9)
              at next (C:\epicgames-freegames-node\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:34:41)
              at CdpCDPSession.send (C:\epicgames-freegames-node\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:54:18)
              at CdpPage.bringToFront (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\cdp\Page.ts:963:37)
              at CdpPage.screenshot (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\api\Page.ts:2448:16)
              at CdpPage.<anonymous> (C:\epicgames-freegames-node\node_modules\puppeteer-core\src\util\decorators.ts:139:27)
              at PuppetFreeGames.handlePageError (C:\epicgames-freegames-node\src\puppet\base.ts:90:7)
              at PuppetFreeGames.setupPage (C:\epicgames-freegames-node\src\puppet\base.ts:70:7)
              at PuppetFreeGames.request (C:\epicgames-freegames-node\src\puppet\free-games.ts:12:19)
              at PuppetFreeGames.getCatalogFreeGames (C:\epicgames-freegames-node\src\puppet\free-games.ts:69:28)
      "name": "TargetCloseError"
    }
[2024-04-12 19:57:45.206 +0100] ERROR: Both free game API lookups failed
    user: "[email protected]"
    err: {
      "type": "Error",
      "message": "Both free game API lookups failed",
      "stack":
          Error: Both free game API lookups failed
              at PuppetFreeGames.getAllFreeGames (C:\epicgames-freegames-node\src\puppet\free-games.ts:352:15)
              at redeemAccount (C:\epicgames-freegames-node\src\index.ts:53:20)
              at file:///C:/epicgames-freegames-node/node_modules/p-queue/dist/index.js:187:36
    }

npm list:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants