[BUG] Playwright-core - Timeout while waiting for event \"download\"\nNote:
See original GitHub issueContext:
- 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:
- Created 3 years ago
- Comments:21 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@imhashir @dgozman Try with Playwright Version 1.0.2
you can try this: https://github.com/JupiterOne/playwright-aws-lambda/issues/27#issuecomment-767122566
@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 in1.0.2
. Is there any workaround for that at the moment?