Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Conversation

@ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Apr 29, 2024

What?

This fixes an error when Dispose is called during a navigation from a page that contains an iframe.

Why?

Dispose can panic when a navigation occurs on a page with an iframe. The specific error that is returned is "Cannot find context with specified id". The reason for this error is due to the fact that Chrome has already cleaned up the associated resource before it receives the CDP command to release it. Therefore it is safe to handle this error, log a debug log and carry on with the test.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates: #1144

@ankur22 ankur22 requested a review from inancgumus April 29, 2024 15:37
ankur22 added 2 commits April 29, 2024 16:38
Dispose can panic when a navigation occurs on a page with an iframe.
The specific error that is returned is "Cannot find context with
specified id". The reason for this error is due to the fact that Chrome
has already cleaned up the associated resource before it receives the
CDP command to release it. Therefore it is safe to handle this error,
log a debug log and carry on with the test.
@ankur22 ankur22 force-pushed the fix/dispose-cannot-find-ctx branch from 72239a3 to 7e42ae9 Compare April 29, 2024 15:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants