appium: Appium session gets terminated when i try to install app on real iOS device using a URLbug:
Do I have the most recent component updates?
- I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
- I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
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=1fxxxxxxxxtQhbRnisdnTqkB9nqQU5hQxREZRuHY5MjxA0HjKHeyppi3JbPUJzpTP’ [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]
Expected Behavior
The appium session remains active and test cases can run after app installation.
Minimal Reproducible Example
Environment
- Operating system:
- Appium server version (output of
appium --version
): v2.5.2 - Appium driver(s) and their version(s): uiautomator2@2.44.3 (automationName ‘UiAutomator2’) xcuitest@6.0.2 (automationName ‘XCUITest’)
- Appium plugin(s) and their version(s): None
- Node.js version (output of
node --version
): v18.17.1 npm
version (output ofnpm --version
): 9.6.7- Last component(s) version which did not exhibit the problem:
- Platform and version under test: iOS app install using a URL
- Real device or emulator/simulator: iOS Real device
Link to Appium Logs
No response
Further Information
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Comments: 18 (3 by maintainers)
it does not work like that. Check https://github.com/appium/appium/blob/d7cf01340199edc30cf7befe351865e7c9124d1a/packages/appium/docs/en/guides/migrating-1-to-2.md?plain=1#L147 on how to update installed drivers. You could also fully reinstalll the driver to get the most recent version of it
the patch has been published to xcuitest driver v 7.11.3
It might be the app is just too big, so it needs a lot of time to complete the installation. Currently this timeout (60s) is not configurable, but I could add a new capability to change that