fix: browser.reset tries to dispose default implicit context #540#566
Merged
fix: browser.reset tries to dispose default implicit context #540#566
browser.reset tries to dispose default implicit context #540#566Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Old Chrome doesn't even show implicit context.
Target.getBrowserContextsreturns{"browserContextIds":[]}Target.setAutoAttachdoesn't send anyTarget.attachedToTargetevents nor doesTarget.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.attachedToTargetandTarget.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.