Skip to content

fix: browser.reset tries to dispose default implicit context #540#566

Merged
route merged 1 commit intomainfrom
fix-540-reset
Feb 16, 2026
Merged

fix: browser.reset tries to dispose default implicit context #540#566
route merged 1 commit intomainfrom
fix-540-reset

Conversation

@route
Copy link
Member

@route route commented Feb 16, 2026

Old Chrome doesn't even show implicit context.
Target.getBrowserContexts returns {"browserContextIds":[]} Target.setAutoAttach doesn't send any Target.attachedToTarget events nor does Target.setDiscoverTargets. This context is not even registered in Ferrum.

More recent Chrome < 145 still returns empty {"browserContextIds":[]} but starts to show target and context in Target.attachedToTarget and Target.targetCreated.

Chrome >= 145 returns defaultBrowserContextId {"browserContextIds":[],"defaultBrowserContextId":"7354CC1034D553EE803954E18CDEB447"} and shows target and context as above.

--no-startup-window flag tells Chrome not to open any browser window on startup thus affecting implicit context in a more recent Chrome. When flag is passed we create our own default context, and thus can dispose it. When flag is not passed we use implicit context and thus cannot dispose it.

Old Chrome doesn't even show implicit context.
`Target.getBrowserContexts` returns `{"browserContextIds":[]}`
`Target.setAutoAttach` doesn't send any `Target.attachedToTarget` events nor does `Target.setDiscoverTargets`. This context is not even registered in Ferrum.

More recent Chrome < 145 still returns empty {"browserContextIds":[]} but starts to show target and context in `Target.attachedToTarget` and `Target.targetCreated`.

Chrome >= 145 returns defaultBrowserContextId `{"browserContextIds":[],"defaultBrowserContextId":"7354CC1034D553EE803954E18CDEB447"}` and shows target and context as above.

--no-startup-window flag tells Chrome not to open any browser window on startup thus affecting implicit context in a more recent Chrome. When flag is passed we create our own default context, and thus can dispose it. When flag is not passed we use implicit context and thus cannot dispose it.
@route route merged commit 56a46cd into main Feb 16, 2026
7 checks passed
@route route deleted the fix-540-reset branch February 16, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant