You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CdtrChromeClient.MainContext crashes on NullReferenceException.
Failed to GetBackendNodeId: System.AggregateException: One or more errors occurred. (Runtime.evaluate: Cannot find context with specified id)
---> BaristaLabs.ChromeDevTools.Runtime.CommandResponseException: Runtime.evaluate: Cannot find context with specified id
at BaristaLabs.ChromeDevTools.Runtime.ChromeSession.SendCommand(String commandName, JToken params, CancellationToken cancellationToken, Nullable`1 millisecondsTimeout, Boolean throwExceptionIfResponseNotReceived)
at BaristaLabs.ChromeDevTools.Runtime.ChromeSession.SendCommand[TCommand,TCommandResponse](TCommand command, CancellationToken cancellationToken, Nullable`1 millisecondsTimeout, Boolean throwExceptionIfResponseNotReceived)
at BaristaLabs.ChromeDevTools.Runtime.Runtime.RuntimeAdapter.Evaluate(EvaluateCommand command, CancellationToken cancellationToken, Nullable`1 millisecondsTimeout, Boolean throwExceptionIfResponseNotReceived)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Gripper.WebClient.Browser.BaristaLabsCdtr.CdtrContext.GetBackendNodeId(Nullable`1 contextId, ChromeSession chromeSession, ILogger logger) in C:\Users\TK\source\repos\Gripper\Gripper.WebClient\Browser\BaristaLabsCdtr\CdtrContext.cs:line 37
The text was updated successfully, but these errors were encountered:
This may happen when more than one execution contexts are related to the same iFrame. This happens when
All of them are valid, usually one is the DOM and the others are the background workers.
One of them is a zombie that remained in the lookup after it got destroyed. This means an ExecutionContextContextDestroyed event had been missed which is a bug.
tomaskrupka
changed the title
CdtrChromeClient.MainContext crashes on NullReferenceException.
More execution contexts related to one frame
Dec 15, 2021
Current implementation blindly takes the context with the greatest context id as the proper one for a given frame. This is OK in case of missed ExecutionContextDestroyed events, and most of the time for picking the DOM context as well as it's the last one to be created.
Make sure to redo this to actually identify the DOM context and pick it before merging/closing this issue.
(More execution contexts related to one frame). This takes the last context as the right one (highest id). This seems to work, but in theory it may still fail when the background worker is slower to register than the DOM. The issue remains open.
CdtrChromeClient.MainContext
crashes onNullReferenceException
.The text was updated successfully, but these errors were encountered: