Menu

#397 error while trying to close a browser page.

Backlog
open
nobody
2021-04-23
2019-10-13
Anonymous
No

Originally created by: gyy52380

Describe the bug
When using the cdp driver, during closing of a browser page, this error sometimes appears.

{"level":"warn","time":"x","url":"x","error":"rpcc: the connection is closing","time":"x","message":"failed to close browser page"}
{"level":"error","time":"x","error":": rpcc: the connection is closing: session: detach timed out for session 5C391DF4E758E985AE3CBAA03774E562","time":"x","message":"closing root scope"}

To Reproduce
Steps to reproduce the behavior:
Run a single program 10-50 times, 2 - 4 instances in parallel. Observe the error (sometimes).

Expected behavior
No error should be printed.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome 77
  • Version: latest

Additional context
I only observed this issue when I had multiple programs running in parallel (2 to 4 instances at a time).

I'm not sure the library even needs to close the page manually. Here, on line 377 the page is closed manually. This looks weird because of the context.Background() passed in as the parameter. At the end of the function the page's connection is closed. I think that this should be enough to close the page.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB