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

[Bug]: Error closing browser #30902

Closed
utibeabasi6 opened this issue May 20, 2024 · 1 comment
Closed

[Bug]: Error closing browser #30902

utibeabasi6 opened this issue May 20, 2024 · 1 comment

Comments

@utibeabasi6
Copy link

utibeabasi6 commented May 20, 2024

Version

1.44.0

Steps to reproduce

Run the following code within a lambda function using the chromium layer

const browser = await playwright.launch({
    args: [...chromium.args, '--enable-features=ConversionMeasurement,AttributionReportingCrossAppWeb'],
    executablePath: await chromium.executablePath(),
  });
  const page = await browser.newPage({ bypassCSP: true, colorScheme: 'dark' });

  await page.setViewportSize(defaultViewport);

  await page.route('**', (route) => {
   # Do something
  });

  await page.goto(your-url);

  const screenshotBuffer = await page.screenshot();

  await page.unrouteAll({ behavior: 'wait' });

  await page.close();

  await browser.close();

Expected behavior

The screenshot is created successfully

Actual behavior

An error occurs when calling browser.close()

image

Additional context

No response

Environment

Environment is AWS lambda
@mxschmitt
Copy link
Member

This issue is not following the bug template. Please re-file and provide a self-contained reproduction, which we can run locally to reproduce your issue. Thanks for your understanding!

(no imports, undefined variables etc.)

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

2 participants