Closed sadym-chromium closed 3 weeks ago
I don't think this is the way we want to go, we would want to create a property on the CDP target to know what the status update or not, we already do that for Cache and Network, and Fetch, we should do it here as well.
I guess we are sending a DeviceAccess.disable
and that is causing the error, having a cached prevent from sending it.
I don't think this is the way we want to go, we would want to create a property on the CDP target to know what the status update or not, we already do that for Cache and Network, and Fetch, we should do it here as well. I guess we are sending a
DeviceAccess.disable
and that is causing the error, having a cached prevent from sending it.
If the Target.detachedFromTarget
is received BEFORE the command, the browsing context is not iterated. The problem happens when there is a race condition between command and Target.detachedFromTarget
event. E.g. in this case the timing is the following:
DeviceAccess.disable
.Target.detachedFromTarget
.Having that, we can either add a heuristic checking the exception, or add a client status. But in the second option we will have to make the check AFTER the command is finished. So basically we will end up with the same heuristic, as we don't want to silence other kind of exceptions.
Can you take a look at this - https://github.com/GoogleChromeLabs/chromium-bidi/pull/2609 I think this will solve the problem you are trying to fix here, but as it prevents sending usless command to CDP.
If we want we should have a general solution to the problem of unsubscribing as there are other commands that have similar behaviour.
Can you take a look at this - #2609 I think this will solve the problem you are trying to fix here, but as it prevents sending usless command to CDP.
I added a commit with test failing but expecting to pass. The PR does not address the race condition.
This causes a false-negative WPT tests in case of testdriverJS BiDi.