Target page, context or browser has been closed on single FastAPI request processing #896
-
|
I am currently try to crawl multiple pages parallely for my LLM knowledge base using crawl4ai using an API endpoint from fast API. But after serving a single multi page crawl request. I get the following error "BrowserType.launch: Target page, context or browser has been closed". I could not seem to find a way to keep the page open or restart the API after crawl. Feel free to ask for any clarifications! Here is my FastAPI code: ` @asynccontextmanager app = FastAPI(lifespan=lifespan) class SearchRequest(BaseModel): @app.post("/web-search") if name == "main": |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Have the same exact error in FastAPI. |
Beta Was this translation helpful? Give feedback.
-
|
@Dopamine-Max @egehakan There's a bug reported for this. Already patched in bug fix branch. This will be merged soon! |
Beta Was this translation helpful? Give feedback.
@Dopamine-Max @egehakan There's a bug reported for this. Already patched in bug fix branch. This will be merged soon!