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

未关闭
#4,460 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
领域
testing-qa

调研方向

使用 CodeceptJS 3.6.4、Puppeteer 22.14.0、提供的配置以及 I.waitForVisible/I.click 序列重现该故障。将行为与早期版本进行比较;当该序列在没有 Runtime.callFunctionOn 协议错误的情况下完成时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

stale
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'],
};
主要语言
JavaScript
星标
4.2k
派生
756
平均合并
2 天 9 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codeceptjs/CodeceptJS 的其他 Issue

查看 codeceptjs/CodeceptJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。