WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED MOVED
268330
SafariDriver doesn't respond after /url POST with non-default profile
https://bugs.webkit.org/show_bug.cgi?id=268330
Summary
SafariDriver doesn't respond after /url POST with non-default profile
Jack Wellborn
Reported
2024-01-29 14:10:00 PST
Created
attachment 469607
[details]
Video demonstrating the issue. SafariDriver doesn't respond after /url POST. This is happening in Safari 17.3 as well as in Safari Technology Preview Release 187. Reproduction Steps: 1. Start safaridriver on port 4446 (or whichever port you desire) safaridriver -p 4446 2. Create a new Webdriver session. This reliably returns a session ID ``` curl --location '
http://localhost:4446/session
' \ --header 'Content-Type: application/json' \ --data '{ "capabilities": { "firstMatch": [ {} ], "alwaysMatch": { "browserName": "Safari Technology Preview", "acceptInsecureCerts": false, "safari:options": {} } } } ``` 3. Using the session ID in the response from step 2, set the URL to "
https://webkit.org
". ``` curl --location '
http://localhost:4446/session/B3B532DD-1080-4947-B712-7EB0CFA17D2A/url
' \ --header 'Content-Type: application/json' \ --data '{"url":"
https://webkit.org
"}' ``` Expected result: SafariDriver navigates Safari to the page and returns an HTTP response Actual result: SafariDriver navigates Safari to the page, but never returns with an HTTP response
Attachments
Video demonstrating the issue.
(3.44 MB, video/mp4)
2024-01-29 14:10 PST
,
Jack Wellborn
no flags
Details
SafariDriver issue with non-default profiles
(7.88 MB, video/mp4)
2024-02-28 06:59 PST
,
Jack Wellborn
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-01-30 15:50:39 PST
<
rdar://problem/121966935
>
Jack Wellborn
Comment 2
2024-02-22 10:52:58 PST
Happy to report that this seems to be resolved as of STP 189. Safari 17.3.1 still has the issue, but I am hoping the fix will work its way into blue soon. Thanks all.
Sam Sneddon [:gsnedders]
Comment 3
2024-02-22 16:26:30 PST
This works fine for me with Safari 17.3.1 on macOS 14.3.1 (23D60), though obviously without the "browserName" capability being set. Note it isn't expected that the system safaridriver (/usr/bin/safaridriver) will work with Safari Technology Preview; you need to use the safaridriver within the STP bundle (/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver) to control STP. If it continues to not work with the system Safari & safaridriver, it's probably worthwhile filing feedback via Feedback Assistant (
https://developer.apple.com/bug-reporting/
) with a sysdiagnose if you're willing, as the issue is highly unlikely to be within WebKit.
Jack Wellborn
Comment 4
2024-02-23 12:50:36 PST
Would you look at that, I restarted blue Safari 17.3.1 and everything is working again. Huzzah! Good thing too, because running our automated tests in Safari unveiled a nasty race condition bug in our project. Thanks all! Closing as resolved.
Jack Wellborn
Comment 5
2024-02-28 06:59:40 PST
Created
attachment 470084
[details]
SafariDriver issue with non-default profiles
Jack Wellborn
Comment 6
2024-02-28 07:00:25 PST
I have more information on what's causing SafariDriver to hang. It's Safari profiles. If Safari's frontmost window is using my "Work" profile, SafariDriver hangs. If the frontmost window is using my "Personal" profile, which is the default, the test runs as expected. I have attached a new video. Since this seems to be more Safari than Webkit, let me know if I should submit a Feedback. This is happening in Safari 17.3.1 Reproduction Steps: 1. Open Safari. 2. Open two new windows, one that is using the default profile and another that is using a non default profile. 3. Navigate both windows to apple.com. 4. Make the window using the the non-default profile frontmost. 5. Start safaridriver on port 4446 (or whichever port you desire) `safaridriver -p 4446` 6. Create a new Webdriver session. This reliably returns a session ID ``` curl --location '
http://localhost:4446/session
' \ --header 'Content-Type: application/json' \ --data '{ "capabilities": { "firstMatch": [ {} ], "alwaysMatch": { "browserName": "Safari", "acceptInsecureCerts": false, "safari:options": {} } } }' ``` 7. Using the session ID in the response from step 6, set the URL to "
https://webkit.org
". ``` curl --location '
http://localhost:4446/session/B3B532DD-1080-4947-B712-7EB0CFA17D2A/url
' \ --header 'Content-Type: application/json' \ --data '{"url":"
https://webkit.org
"}' ``` 8. SafariDriver won't respond so cancel out of the terminal process (^C) and stop the automation. 9. Bring the window using the default profile frontmost. Make sure it is active. 10. Repeat steps 6 and 7. Expected result: SafariDriver navigates Safari to the page and returns an HTTP response regardless of profile. Actual result: SafariDriver navigates Safari to the page, but never returns with an HTTP response when using a non-default profile
Jack Wellborn
Comment 7
2024-02-28 07:00:42 PST
See previous comment
Sam Sneddon [:gsnedders]
Comment 8
2024-02-29 06:28:16 PST
Yeah, this is very much going to be a Safari bug. This is plenty to reproduce the bug, so don't worry about filing it via Feedback Assistant.
Sam Sneddon [:gsnedders]
Comment 9
2024-02-29 06:36:27 PST
Also, just to note, for the sake of anyone reading here, it _does_ in fact return an HTTP response (a timeout error) after the pageLoad timeout, though the default pageLoad timeout is 300s.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug