Playwright issues
aysan0
PROOP

a year ago

I get an error like the following:
playwright._impl._errors.TargetClosedError: BrowserType.launch: Target page, context or browser has been closed

Interestingly, I can actually see a single scrape work before I get this error. Trying to understand what is causing it. A key dependency on a new feature we are releasing.

Solved

4 Replies

aysan0
PROOP

a year ago

Interesting nuance. the first browser succeeds. I use it in context like

async with AsyncWebCrawler() as crawler:
some code ## This succeeds

...some other code...

async with AsyncwebCrawler() as crawler:
some crawling code ## This fails.

I verified that the first browser launch always succeeds.


chandrika
EMPLOYEE

a year ago

Hey there, this seems like an application level issue but from looking around for this error it might have to do with making sure that the browser context is properly closed after each use or checking for any unhandled promises that might be causing the browser to close unexpectedly. You could also review the AsyncWebCrawler for resource management issues


Status changed to Awaiting User Response Railway 12 months ago


aysan0
PROOP

a year ago

Interesting. I can see that the issue does not repro locally and that browser sessions are properly closed.


Status changed to Awaiting Railway Response Railway 12 months ago


chandrika
EMPLOYEE

a year ago

Apologies but this looks like an issue with the application level code, we can offer help on platform level issues here but as this thread is public, the community might be able to help


Status changed to Awaiting User Response Railway 12 months ago


Railway
BOT

7 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 7 months ago


Loading...