question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Playwright-core - Timeout while waiting for event \"download\"\nNote:

See original GitHub issue

Context:

  • Playwright Version: 1.3.0
  • Operating System: AWS Lambda
  • Node.js version: 12
  • Browser: [Chromium]
  • Extra: playwright-aws-lambda

Hi Team,

I am testing playwright-core with AWS lambda.

there is problem with page.waitForEvent(“download”) in playwright-code 1.3.0.

page.waitForEvent(“download”) works fine with playwright-code 1.0.2 but with playwright-code 1.3.0 does not.

Error:

“TimeoutError: page.waitForEvent: Timeout 30000ms exceeded.”, “Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.”, " at ProgressController.run (/opt/node_modules/playwright-core/lib/progress.js:71:30)“, " at Page.waitForEvent (/opt/node_modules/playwright-core/lib/page.js:243:35)”, " at Page.waitForEvent (/opt/node_modules/playwright-core/lib/helper.js:80:31)",

Code Snippet

 await page.goto(
    "https://file-examples.com/index.php/sample-documents-download/sample-xls-download/"
  );

  const handles = await page.$$("#table-files .file-link");

  for (let num of handles) {
    const [download] = await Promise.all([
      page.waitForEvent("download"), // wait for download to start
      num.click("a.btn"),
    ]);
    const path = await download.path();
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
osmeniacommented, Jan 26, 2021
1reaction
imhashircommented, Jan 26, 2021

@dgozman Yeah, I suspected that as well. My playwright-core version is 1.8.0.

@osmenia You are legend! Thanks man. I just downgraded to 1.0.2 and it worked both locally and on lambda. I’ve been stuck at it for days, so glad it worked. I’ll try the solution provided on that issuecomment as well, but I’ll have to look a bit deeper into docker-lambda thing.

Now the only issue with downgrade approach is that the suggestedFilename function is not in 1.0.2. Is there any workaround for that at the moment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

https://raw.githubusercontent.com/microsoft/playwr...
An example of handling a timeout error: ```js try { await page. ... a click. await page.click('button'); // Or while waiting for an...
Read more >
Puppeteer documentation - DevDocs
puppeteer-core doesn't automatically download Chromium when installed. ... NOTE error event has a special meaning in Node, see error events for details.
Read more >
Timeouts - Playwright
Playwright Test enforces a timeout for each test, 30 seconds by default. Time spent by the test function, fixtures, beforeEach and afterEach hooks...
Read more >
playwright._impl._api_types.timeouterror - You.com | The AI ...
Note : use DEBUG=pw:api environment variable to capture Playwright logs. Open side panel ... TimeoutError: Timeout while waiting for event "popup"]#1080.
Read more >
Playwright - CodeceptJS
Using playwright-core package, will prevent the download of browser ... Note: When connecting to remote browser show and specific chrome ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found