Appium session gets terminated when i try to install app on real iOS device using a URL

The app gets installed but the appium session gets terminated. Below are the error logs.
Please note that i’ve removed the actual url due to security reasons. It works fine for simulators.

[XCUITestDriver@139e] Creating session with W3C capabilities: {
[XCUITestDriver@139e] “alwaysMatch”: {
[XCUITestDriver@139e] “platformName”: “iOS”,
[XCUITestDriver@139e] “appium:automationName”: “XCUITest”,
[XCUITestDriver@139e] “appium:udid”: “00008101-001D444A1EC2001E”,
[XCUITestDriver@139e] “appium:appInstallStrategy”: “ios-deploy”,
[XCUITestDriver@139e] “appium:deviceName”: “9 iPhone 12 mini”,
[XCUITestDriver@139e] “appium:platformVersion”: “17.3”,
[XCUITestDriver@139e] “appium:clearSystemFiles”: true,
[XCUITestDriver@139e] “appium:newCommandTimeout”: 60,
[XCUITestDriver@139e] “appium:app”: “url”,
[XCUITestDriver@139e] “appium:connectHardwareKeyboard”: true
[XCUITestDriver@139e] },
[XCUITestDriver@139e] “firstMatch”: [
[XCUITestDriver@139e] {}
[XCUITestDriver@139e] ]
[XCUITestDriver@139e] }
[XCUITestDriver@139e (d7e998d0)] Session created with session id: d7e998d0-aff1-4c7e-bd46-add6e61a4f8d
[XCUITest] Current user: ‘ishan.nehu’
[XCUITestDriver@139e (d7e998d0)] Available devices: 00008101-001D444A1EC2001E
[XCUITest] Creating iDevice object with udid ‘00008101-001D444A1EC2001E’
[XCUITestDriver@139e (d7e998d0)] Determining device to run tests on: udid: ‘00008101-001D444A1EC2001E’, real device: true
[XCUITestDriver@139e (d7e998d0)] Event ‘xcodeDetailsRetrieved’ logged at 1712763219469 (17:33:39 GMT+0200 (Central European Summer Time))
[BaseDriver] Using downloadable app ‘https://appcenter.web.mediaworks.de/apps/category/1/app/771484/download?authorization=xxxxxxxxnisdnTqkB9nqQU5hQxREZRuHY5MjxA0HjKHeyppi3JbPUJzpTP
[BaseDriver] Etag: undefined
[BaseDriver] Last-Modified: Wed, 10 Apr 2024 14:14:41 GMT
[BaseDriver] Cache-Control: max-age=0, must-revalidate, private
[BaseDriver] Content-Type: application/octet-stream
[BaseDriver] Content-Disposition: attachment; filename=“compare.ipa”
[BaseDriver] The application (460.38 MB) has been downloaded to ‘/var/folders/fn/97l7k3d928z34hn8jsgxn_1r0000gn/T/2024310-89063-18toknx.pkm/compare.ipa’ in 43.597s
[BaseDriver] Approximate download speed: 10.56 MB/s
[XCUITestDriver@139e (d7e998d0)] Found 1 bundle in ‘compare.ipa’: Payload/compare.app
[XCUITestDriver@139e (d7e998d0)] ‘Payload/compare.app’ is the resulting application bundle selected from ‘/var/folders/fn/97l7k3d928z34hn8jsgxn_1r0000gn/T/2024310-89063-18toknx.pkm/compare.ipa’
[XCUITestDriver@139e (d7e998d0)] Event ‘appConfigured’ logged at 1712763273358 (17:34:33 GMT+0200 (Central European Summer Time))
[XCUITest] Checking whether app ‘/var/folders/fn/97l7k3d928z34hn8jsgxn_1r0000gn/T/2024310-89063-es12ko.77krg/compare.app’ is actually present on file system
[XCUITest] App is present
[XCUITest] Getting bundle ID from app ‘/var/folders/fn/97l7k3d928z34hn8jsgxn_1r0000gn/T/2024310-89063-es12ko.77krg/compare.app’: ‘de.mediaworks.mediaworks.compare.alpha’
[XCUITestDriver@139e (d7e998d0)] Event ‘resetStarted’ logged at 1712763273362 (17:34:33 GMT+0200 (Central European Summer Time))
[XCUITest] Reset: running ios real device reset flow
[XCUITestDriver@139e (d7e998d0)] Event ‘resetComplete’ logged at 1712763273362 (17:34:33 GMT+0200 (Central European Summer Time))
[XCUITestDriver@139e (d7e998d0)] Using WDA path: ‘/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent’
[XCUITestDriver@139e (d7e998d0)] Using WDA agent: ‘/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj’
[XCUITest] Crash reports root ‘/Users/ishan.nehu/Library/Logs/CrashReporter/MobileDevice/9 iPhone 12 mini’ does not exist. Got nothing to gather.
[XCUITestDriver@139e (d7e998d0)] Event ‘logCaptureStarted’ logged at 1712763273484 (17:34:33 GMT+0200 (Central European Summer Time))
[XCUITestDriver@139e (d7e998d0)] Setting up real device
[XCUITest] Verifying application platform
[XCUITest] CFBundleSupportedPlatforms: [“iPhoneOS”]
[XCUITestDriver@139e (d7e998d0)] App ‘de.mediaworks.mediaworks.compare.alpha’ is not installed yet or it has an offload and cannot be detected, which might keep the local data.
[XCUITest] Installing ‘/var/folders/fn/97l7k3d928z34hn8jsgxn_1r0000gn/T/2024310-89063-es12ko.77krg/compare.app’ on device with UUID ‘00008101-001D444A1EC2001E’…
[XCUITest] Using ‘ios-deploy’ app deployment strategy. You could change it by providing another value to the ‘appInstallStrategy’ capability
[XCUITestDriver@139e (d7e998d0)] Parsed BUILD_DIR configuration value: ‘/Users/ishan.nehu/Library/Developer/Xcode/DerivedData/WebDriverAgent-bnqaucvleszuxcdcergprpefpqdg/Build/Products’
[XCUITestDriver@139e (d7e998d0)] Got derived data root: ‘/Users/ishan.nehu/Library/Developer/Xcode/DerivedData/WebDriverAgent-bnqaucvleszuxcdcergprpefpqdg’
[XCUITestDriver@139e (d7e998d0)] {}
[DevCon Factory] Releasing connections for 00008101-001D444A1EC2001E device on any port number
[DevCon Factory] No cached connections have been found
[XCUITest] Did not find the temporary XCTest logs root at ‘/var/folders/fn/97l7k3d928z34hn8jsgxn_1r0000gn/T/com.apple.dt.XCTest*/’
[XCUITest] Cleaning test logs in ‘/Users/ishan.nehu/Library/Developer/Xcode/DerivedData/WebDriverAgent-bnqaucvleszuxcdcergprpefpqdg/Logs’ folder
[XCUITest] Clearing log files
[XCUITest] Deleting ‘/Users/ishan.nehu/Library/Developer/Xcode/DerivedData/WebDriverAgent-bnqaucvleszuxcdcergprpefpqdg/Logs’. Freeing 115M.
[XCUITest] Finished clearing log files
[AppiumDriver@25b6] Event ‘newSessionStarted’ logged at 1712763470880 (17:37:50 GMT+0200 (Central European Summer Time))
[AppiumDriver@25b6] Encountered internal error running command: Error: 2024-04-10 17:37:50.564 ios-deploy[89978:9858472] [ !! ] Error 0xe800002d: Could not send a message to the device. AMDeviceStopSession(device)
[AppiumDriver@25b6]
[AppiumDriver@25b6] at installWithIosDeploy (/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/lib/ios-deploy.js:74:15)
[AppiumDriver@25b6] at IOSDeploy.install (/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/lib/ios-deploy.js:80:7)
[AppiumDriver@25b6] at installToRealDevice (/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/lib/real-device-management.js:85:5)
[AppiumDriver@25b6] at XCUITestDriver.installAUT (/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:1682:9)
[AppiumDriver@25b6] at XCUITestDriver.start (/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:598:5)
[AppiumDriver@25b6] at XCUITestDriver.createSession (/Users/ishan.nehu/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:401:7)
[AppiumDriver@25b6] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:717:35)
[HTTP] ← POST /session 500 251453 ms - 788
[HTTP]

You are getting an actual error code from ios-deploy. You should report it as a bug on their github:

Make sure you give all the information that you’ve included here but also the Appium version–they will probably need that to determine the version of ios-deploy bundled.

You could try to get around using ios-deploy with the appInstallStrategy capability, but from your log it looks like you may have already tried that.