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

Protocol error (Runtime.callFunctionOn): Argument should belong to the same JavaScript world as target object #4460

Open
aShelist opened this issue Aug 15, 2024 · 3 comments
Labels

Comments

@aShelist
Copy link

What are you trying to achieve?

After update codeceptjs from version 3.6.0 to 3.6.4 and puppeteer from 20.2.0 to 22.14.0 I got error in my tests

What do you get instead?


     Protocol error (Runtime.callFunctionOn): Argument should belong to the same JavaScript world as target object
      at Callback.<instance_members_initializer> (node_modules/puppeteer/node_modules/puppeteer-core/src/common/CallbackRegistry.ts:114:12)
      at new Callback (node_modules/puppeteer/node_modules/puppeteer-core/src/common/CallbackRegistry.ts:119:3)
      at CallbackRegistry.create (node_modules/puppeteer/node_modules/puppeteer-core/src/common/CallbackRegistry.ts:27:22)

Provide test source code if related

  I.waitForVisible(this.locator);
  I.click(this.locator)

Details

  • CodeceptJS version: 3.6.4
  • NodeJS Version: 18.16.1
  • Operating System: mac os
  • puppeteer: 22.14.0
  • Configuration file:
exports.config = {
  fullPromiseBased: true,
  tests: testsPath,
  output: `${pwd}/output`,
  bootstrap: () => {
    global.codecept_dir = pwd;
  },
  name: 'xxx',
  helpers: {
    Puppeteer: {
      show: true,
      waitForNavigation: 'networkidle2',
      waitForTimeout: 30000,
      getPageTimeout: 30000,
      windowSize: '1000x1000',
      browser: 'chrome',
      chrome: {
        args: ['--no-sandbox',
          '--window-size=1920,1000',
          '--disable-setuid-sandbox',
          '--disable-web-security',
          // workaround for iframe in {headless: false} mode,
          // see details https://github.com/puppeteer/puppeteer/issues/4964
          '--disable-features=site-per-process',
        ],
        devtools: false,
      },
      manualStart: false,
      restart: false,
      keepCookies: true,
      keepBrowserState: false,
    },
    FileSystem: {},
  },
  plugins: {
    screenshotOnFail: {
      enabled: false,
    },
    retryTo: {
      enabled: true
    },
    tryTo: {
      enabled: true,
      require: ''
    }
  },
  require: ['ts-node/register'],
};
@aShelist
Copy link
Author

log.txt
Log file with DEBUG=puppeteer:*

@kobenguyent
Copy link
Collaborator

https://github.com/codeceptjs/CodeceptJS/blob/3.x/package.json#L154
we are currently using this ppt version, may you give it a try?

Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants