Bug 252014

Summary: Web Inspector: SafariDriver times out when connecting iOS Safari
Product: WebKit Reporter: Jack Wellborn <w0nka>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: bburg
Priority: P2    
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   

Description Jack Wellborn 2023-02-09 14:40:00 PST
Summary
SafariDriver times out when connecting to iOS Safari. 

Reproduction Steps
0. Make sure Remote Automation is enabled in iOS Safari Settings
1. Start safari driver in terminal with the following command: `safaridriver -p 4444`
2. Create a session using the following curl command:

```
curl --location --request POST '127.0.0.1:4444/session' \
--header 'Content-Type: application/json' \
--data-raw '{
    "capabilities": {
        "firstMatch": [{
            "browserName": "Safari",
            "platformName": "iOS"  
        }],
    }
}'
```

Expected Result
A webdriver session is returned.

Actual Result
The request times out with the following body.

```
{
    "value": {
        "error": "session not created",
        "message": "Could not create a session: The session timed out while connecting to a Safari instance.",
        "stacktrace": ""
    }
}
```

Platform Details
iPhone 11 running iOS 16.3 tethered to a 2021 MacBook Pro running macOS Ventura 13.2. 

Other Notes
The same curl command successfully creates a webdriver session when targeting macOS Safari.
```
curl --location --request POST '127.0.0.1:4444/session' \
--header 'Content-Type: application/json' \
--data-raw '{
    "capabilities": {
        "firstMatch": [{
            "browserName": "Safari",
            "platformName": "macOS"  
        }],
    }
}'
```
Comment 1 Sam Sneddon [:gsnedders] 2023-02-10 06:50:43 PST
Gonna close this as invalid, as any issue with the iOS device/macOS device communication isn't in the scope of WebKit at all.

You're probably better off filing this via Feedback Assistant where you can provide sysdiagnoses for both sides of the (failed) connection, as without any further logging there's not really any way to understand what's going wrong here.
Comment 2 Jack Wellborn 2023-02-10 12:26:50 PST
Created feedback FB11986936.