Skip to content

fix(browsers): Clean up BrowserPool and its plugins after a failed entry or exit - #2446

Draft
Mantisus wants to merge 3 commits into
apify:v2from
Mantisus:browser-pool-lifecycle
Draft

Mantisus wants to merge 3 commits into
apify:v2from
Mantisus:browser-pool-lifecycle

Conversation

@Mantisus

@Mantisus Mantisus commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • A failed or cancelled entry or exit of BrowserPool, PlaywrightBrowserPlugin or StagehandBrowserPlugin leaves it inactive, so it can be entered again. A pool whose entry fails exits the plugins it already entered, and a plugin whose entry fails stops the Playwright driver it started.
  • Exiting a pool closes every browser and plugin even when one of them fails, raises the first failure and logs the rest.

Issues

Testing

  • New unit tests for failed and cancelled entries and exits of the pool and both plugins.

✍️ Drafted by Claude Code

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 14, 2026
@Mantisus Mantisus self-assigned this Nov 14, 2026
@Mantisus
Mantisus marked this pull request as draft November 14, 2026 22:16
@Mantisus
Mantisus force-pushed the browser-pool-lifecycle branch 2 times, most recently from 53996cb to 92e630a Compare November 15, 2026 22:34
@Mantisus
Mantisus force-pushed the browser-pool-lifecycle branch from 92e630a to 05d91fa Compare November 15, 2026 22:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant