SeleniumHQ / SeleniumHQ/selenium

[🐛 Bug]: BiDi events are not fired in order

Open
#14,436 8 comments 0 reactions 0 assignees View on GitHub
C-java I-defect
Dominant language
Java
Stars
34.5k
Forks
8.7k
Avg merge
2d 1h
Merged PRs (30d)
92

Description

### What happened?

This is basically the same problem for BiDi as for CDP, see issue https://github.com/SeleniumHQ/selenium/issues/13845

I stumbled into this while implementing network interception, using the `org.openqa.selenium.bidi.module.Network` class.
The events raised by the bidi connection are processed concurrently and not raised in order. This will make it hard to use things like `org.openqa.selenium.bidi.module.Network` as there is no guarantee `network.responseStarted` is the first event raised for this request.

So i think it might be worth looking into this and find a solution, before BiDi does leave the beta stage.

### How can we reproduce the issue?

```shell
This is not very likley to be seen in the wild, as network responses take some time, but especially the `network.fetchError` might be raised a very short time after `network.responseStarted` e.g. in case of CORS errors.
```

### Relevant log output

```shell
N/A
```

### Operating System

Win 10 x64

### Selenium version

4.23.0

### What are the browser(s) and version(s) where you see this issue?

N/A

### What are the browser driver(s) and version(s) where you see this issue?

N/A

### Are you using Selenium Grid?

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.