Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure

I ran some automated tests and I have this error in this line
driver = new IOSDriver(new URL(url), capabilities);

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: ‘…’, ip: ‘f…’
Build info: version: ‘4.13.0’, revision: ‘ba948ece5b*’
System info: os.name: ‘Mac OS X’, os.arch: ‘aarch64’, os.version: ‘14.5’, java.version: ‘11.0.22’
Driver info: io.appium.java_client.ios.IOSDriver
Command: [null, newSession {capabilities=[{appium:app=/Users/…/x.app, appium:automationName=XCUITest, appium:deviceName=iPhone Xs, platformName=IOS, appium:platformVersion=17.4}], desiredCapabilities=Capabilities {app: /…, automationName: XCUITest, deviceName: iPhone Xs, platformName: IOS, platformVersion: 17.4}}]
Capabilities {app: /…, automationName: XCUITest, deviceName: iPhone Xs, platformName: IOS, platformVersion: 17.4}

The response in browser from appium server if I run the test in debug mode
http://127.0.0.1:4723/status
{
“value”: {
“ready”: true,
“message”: “The server is ready to accept new connections”,
“build”: {
“version”: “2.5.1”
}
}
}

appium 2.5.1
xcode 15.4
MacOS: Sonoma 14.5
I added this new WDAgent

I’m getting the same error, on JDK 22 and I changed URL syntax from URL (String spec) to URI(string).toURL().

driver.set(new IOSDriver(url, capabilities));

Command: [null, newSession {capabilities=[Capabilities {AUTO_ACCEPT_ALERTS: true, FULL_RESET: true, appium:app: storage:filename=myCARFAX.ipa, appium:automationName: XCUITEST, appium:deviceName: iPhone., name: verifyUserLoginWithInvalidData, phoneOnly: true, platformName: IOS, platformVersion: 17, sauce:options: Capabilities {name: verifyU…}]}]
Capabilities {AUTO_ACCEPT_ALERTS: true, FULL_RESET: true, appium:app: storage:filename=myCARFAX.ipa, appium:automationName: XCUITEST, appium:deviceName: iPhone.
, name: verifyUserLoginWithInvalidData, phoneOnly: true, platformName: IOS, platformVersion: 17, sauce:options: Capabilities {name: verifyU…}