[Webkit-unassigned] [Bug 274509] [WebDriver][socket] The "DELETE /session" command might not complete if the session has already been disconnected.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 24 03:00:38 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=274509

--- Comment #4 from haruhisa.shin <haruhisa.shin at open-tec.co.jp> ---
I reproduced it also with GTK port, so I will describe the procedure just in case.

Steps:
1. Build with GTK port without using flatpak to launch MiniBrowser and WebDriver directly.
2. Open three consoles. I will call them as A, B, and C.
3. Set the environment variable WEBKIT_INSPECTOR_SERVER on console A.
   > export WEBKIT_INSPECTOR_SERVER=127.0.0.1:34567
4. Launch MiniBrowser on console A. The "--automation" option is required.
   > ./MiniBrowser --automation
5. Start WebDriver on consle B.
   > ./WebKitWebDriver -t 127.0.0.1:34567 -p 41900
6. Run the selenium script on console C. The contents are described below.

Expected result:
The 'DONE!' is shown on console C, and the script exits normally.
Actual result:
The 'DONE!' is not shown, and the script does not terminate.


The selenium script used for reproduction is as follows.
The version of selenium is 4.9.0.
Note that the method of setting desired_capabilities is different for 4.10.0 and later.

The "url_of_crash_browser" is the content to crash WebProcess.
If it is difficult to prepare it, you should be able to get the same result by killing WebProcess from another terminal while the script execution is interrupted by time.sleep().
I have confirmed it that way as well.

This script uses webdriver.Remote, but the same result was obtained with webdriver.WebKitGTK.

```
from selenium import webdriver
from selenium.webdriver import WebKitGTKOptions
import time

target_address = '127.0.0.1:34567'
webdriver_host = '127.0.0.1'
webdriver_port = 41900

options = webdriver.WebKitGTKOptions()
driver = webdriver.Remote(
        command_executor="http://{0}:{1}".format(webdriver_host, webdriver_port),
        desired_capabilities={
                'webkitgtk:browserOptions':{
                        'targetAddress': target_address
                }
        }
)

try:
        driver.get(url_of_crash_browser)

except Exception as e:
        print(e)

finally:
        driver.quit()
        print('DONE!')
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240524/cf4327dd/attachment.htm>


More information about the webkit-unassigned mailing list