puppeteer: [Bug]: use manifest V3 .When the file(manifest.json) carries ”content_scripts“,puppeteer.launch timeout

Minimal, reproducible example

const args = [
      `--whitelisted-extension-id=${extensionId}`,
      `--disable-extensions-except=${pathToExtension}`,
      `--load-extension=${pathToExtension}`,
      '--no-sandbox',
    ];
    this.browser = await puppeteer.launch({
      headless: false,
      defaultViewport: null,
      args: args,
      executablePath: '/opt/google/chrome/chrome',
      // executablePath: '/usr/local/google/chrome/chrome',
    });

// manifest.json
{
    "name": "Record",
    "description": "Record Extension",
    "version": "1.0",
    "icons": {
        "128": "icon.png"
    },
    "manifest_version": 3,
    "content_scripts": [
        {
          "matches": ["https://*/*"],
          "js": "capture.js"
        }
      ],
    "background": {
        "service_worker": "background.js"
    },
    "permissions": [
        "activeTab",
        "tabs",
        "tabCapture",
        "storage",
        "downloads"
    ]
}

Error string

Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!

Bug behavior

  • Flaky
  • PDF

Background

chrome version is Google Chrome 124.0.6367.78

Expectation

.

Reality

puppeteer.launch timeout

Puppeteer configuration file (if used)

No response

Puppeteer version

22.7.0

Node version

20.12.2

Package manager

npm

Package manager version

10.5.0

Operating system

Linux

About this issue

  • Original URL
  • State: open
  • Created 2 months ago
  • Comments: 16

Most upvoted comments

Wow very insightful, will be trying this immediately! appretiate your hard work and dedication