Skip to content

gshzn/playwright-timeout-errors

Repository files navigation

Playwright timeout errors reproduction repo

This repository reproduces a bug I encountered while using Playwright. After running Playwright to scrape +- 10 URLs and take a few screenshots, Playwright would time out taking a screenshot. This would only happen when running Playwright in Docker.

Steps to reproduce

  1. Build the docker image: docker buildx build --platform linux/amd64 --tag playwright-timeout-errors .
  2. Run the Docker container: docker run --rm playwright-timeout-errors
  3. See output similar to this:
Scraping https://www.cewe.be/nl/fotokalenders.html...
Success!
Scraping https://foto.kruidvat.be/kalenders/...
Success!
Scraping https://www.optimalprint.be/fr/wall-calendars...
Success!
Scraping https://www.smartphoto.be/nl/fotokalenders-fotoagendas...
Success!
Scraping https://tadaaz.be/nl/kerst/kalenders...
Success!
Scraping https://www.vistaprint.be/fotogeschenken/kalenders...
Success!
Scraping https://www.yoursurprise.be/huis-accessoires/wanddecoratie/kalender-met-foto...
Success!
Scraping https://www.cewe.be/nl/cewe-fotoboeken.html...
Success!
Scraping https://www.kruidvat.be/nl/fotoservice/fotoboeken.html...
Traceback (most recent call last):
  File "/app/main.py", line 72, in <module>
    main()
  File "/app/main.py", line 68, in main
    visit_page(webpage_url, page)
  File "/app/main.py", line 47, in visit_page
    page.goto(webpage_url)
  File "/app/.venv/lib/python3.9/site-packages/playwright/sync_api/_generated.py", line 9020, in goto
    self._sync(
  File "/app/.venv/lib/python3.9/site-packages/playwright/_impl/_sync_base.py", line 115, in _sync
    return task.result()
  File "/app/.venv/lib/python3.9/site-packages/playwright/_impl/_page.py", line 552, in goto
    return await self._main_frame.goto(**locals_to_params(locals()))
  File "/app/.venv/lib/python3.9/site-packages/playwright/_impl/_frame.py", line 145, in goto
    await self._channel.send("goto", locals_to_params(locals()))
  File "/app/.venv/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 61, in send
    return await self._connection.wrap_api_call(
  File "/app/.venv/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 528, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.TimeoutError: Page.goto: Timeout 30000ms exceeded.
Call log:
  - navigating to "https://www.kruidvat.be/nl/fotoservice/fotoboeken.html", waiting until "load"

About

Reproduction repository for Playwright Timeout errors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published