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] Page.goto: Connection closed while reading from the driver #6

Open
mermyly opened this issue Nov 25, 2024 · 0 comments
Open

[BUG] Page.goto: Connection closed while reading from the driver #6

mermyly opened this issue Nov 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mermyly
Copy link

mermyly commented Nov 25, 2024

When you loop through pages, the following error occurs: Exception: Page.goto: Connection closed while reading from the driver

browser = await pw.chromium.launch(headless=False)
context = await browser.new_context()
page = await context.new_page()
for _ in range(10):
    await page.goto("https://browserscan.net/")
    await asyncio.sleep(1)

await context.close()
await browser.close()
    if (this.isDetached()) throw new Error('Frame was detached');
                                 ^

Error: Frame was detached
    at Frame._context (C:\Users\mermyly\AppData\Local\pypoetry\Cache\virtualenvs\avito-parser-aOSDG-gG-py3.12\Lib\site-packages\patchright\driver\package\lib\server\frames.js:606:34)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:454:9)
    
     File "C:\Users\mermyly\AppData\Local\pypoetry\Cache\virtualenvs\avito-parser-aOSDG-gG-py3.12\Lib\site-packages\patchright\_impl\_connection.py", line 472, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
Exception: Page.goto: Connection closed while reading from the driver
@kaliiiiiiiiii kaliiiiiiiiii changed the title Page.goto: Connection closed while reading from the driver [BUG] Page.goto: Connection closed while reading from the driver Nov 28, 2024
@kaliiiiiiiiii kaliiiiiiiiii added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants