appium: Appium session gets terminated when i try to install app on real iOS device using a URLbug: </h1> <div class="body"><h3>Do I have the most recent component updates?</h3> <ul> <li><input checked disabled type="checkbox"> I use the most recent available driver/plugin and server versions</li> </ul> <h3>Is the component officially supported by the Appium team?</h3> <ul> <li><input checked disabled type="checkbox"> I have verified the component repository is present under the Appium organization in GitHub</li> </ul> <h3>Is there an existing issue for this?</h3> <ul> <li><input checked disabled type="checkbox"> I have searched the existing issues</li> </ul> <h3>Current Behavior</h3> <p>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.</p> <p>[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 ‘<a href="https://appcenter.web.mediaworks.de/apps/category/1/app/771484/download?authorization=1fxxxxxxxxtQhbRnisdnTqkB9nqQU5hQxREZRuHY5MjxA0HjKHeyppi3JbPUJzpTP">https://appcenter.web.mediaworks.de/apps/category/1/app/771484/download?authorization=1fxxxxxxxxtQhbRnisdnTqkB9nqQU5hQxREZRuHY5MjxA0HjKHeyppi3JbPUJzpTP</a>’ [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]</p> <h3>Expected Behavior</h3> <p>The appium session remains active and test cases can run after app installation.</p> <h3>Minimal Reproducible Example</h3> <img alt="Screenshot 2024-04-10 at 17 40 34" src="https://github.com/appium/appium/assets/60988110/617aa0fc-c26b-4153-b49d-3bdde3a44b90"> <h3>Environment</h3> <ul> <li>Operating system:</li> <li>Appium server version (output of <code>appium --version</code>): v2.5.2</li> <li>Appium driver(s) and their version(s): uiautomator2@2.44.3 (automationName ‘UiAutomator2’) xcuitest@6.0.2 (automationName ‘XCUITest’)</li> <li>Appium plugin(s) and their version(s): None</li> <li>Node.js version (output of <code>node --version</code>): v18.17.1</li> <li><code>npm</code> version (output of <code>npm --version</code>): 9.6.7</li> <li>Last component(s) version which did <em>not</em> exhibit the problem:</li> <li>Platform and version under test: iOS app install using a URL</li> <li>Real device or emulator/simulator: iOS Real device</li> </ul> <h3>Link to Appium Logs</h3> <p><em>No response</em></p> <h3>Further Information</h3> <img alt="Screenshot 2024-04-10 at 17 40 34" src="https://github.com/appium/appium/assets/60988110/904ff7d2-344f-4880-ae84-e12e60c60de3"> </div> </section> <section class="issueAnalyticsMobile" id="analytics"> <h2>About this issue</h2> <ul> <li><a href="https://github.com/appium/appium/issues/19990" rel="nofollow">Original URL</a></li> <li>State: closed</li> <li>Created 3 months ago</li> <li>Comments: 18 (3 by maintainers)</li> </ul> </section><section class="issueComments" id="topComments"> <h2>Most upvoted comments</h2> <div class="comments"> <div class="comment" key="0"> <div class="commentBody"><p>it does not work like that. Check <a href="https://github.com/appium/appium/blob/d7cf01340199edc30cf7befe351865e7c9124d1a/packages/appium/docs/en/guides/migrating-1-to-2.md?plain=1#L147">https://github.com/appium/appium/blob/d7cf01340199edc30cf7befe351865e7c9124d1a/packages/appium/docs/en/guides/migrating-1-to-2.md?plain=1#L147</a> on how to update installed drivers. You could also fully reinstalll the driver to get the most recent version of it</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/mykola-mokhnach" rel="nofollow">mykola-mokhnach</a> on <a href="https://github.com/appium/appium/issues/19990#issuecomment-2051428120" rel="nofollow">Apr 12, 2024</a> </div> </div> </div><div class="comment" key="1"> <div class="commentBody"><p>the patch has been published to xcuitest driver v 7.11.3</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/mykola-mokhnach" rel="nofollow">mykola-mokhnach</a> on <a href="https://github.com/appium/appium/issues/19990#issuecomment-2051162838" rel="nofollow">Apr 12, 2024</a> </div> </div> </div><div class="comment" key="2"> <div class="commentBody"><p>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</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/mykola-mokhnach" rel="nofollow">mykola-mokhnach</a> on <a href="https://github.com/appium/appium/issues/19990#issuecomment-2049761061" rel="nofollow">Apr 11, 2024</a> </div> </div> </div> </div> <div class="moreComments"> <a href="https://github.com/appium/appium/issues/19990" rel="nofollow">Read more comments on GitHub</a> </div> </section><section class="issueNavigation"> <div class="back"> <a href="https://errorism.dev/issues/appium-appium-appium-server-uiautomator2-server-apk-v191-does-not-exist"> ← appium: Appium Server uiautomator2 server apk v.1.9.1 does not exist </a> </div> <div class="forward"> <a href="https://errorism.dev/issues/appium-appium-appium-takes-too-long-to-find-elements-ios"> appium: Appium takes too long to find elements (iOS) → </a> </div> </section> </div> <aside class="sidebar"> <div class="tocWrapper"> <span class="tocTitle">Table of contents</span> <a class="tocItem" href="#issueDescription">Issue description</a> <a class="tocItem" href="#topComments">Top comments</a> </div> <div class="analyticsWrapper"> <span class="analyticsTitle">About this issue</span> <a class="analyticsItem" href="https://github.com/appium/appium/issues/19990" rel="nofollow">Original URL</a> <span class="analyticsItem">State: closed</span> <span class="analyticsItem">Created 3 months ago</span> <span class="analyticsItem">Comments: 18 (3 by maintainers)</span> </div> </aside> </div> </main> <!--<footer class="footerContainer">--> <!-- <div class="footerContent">--> <!-- <div class="footerLinks">--> <!-- <a class="footerLink" href="/about">About Errorism</a>--> <!-- <a class="footerLink" href="/privacy-policy">Privacy Policy</a>--> <!-- <a class="footerLink" href="/contact">Contact</a>--> <!-- </div>--> <!-- </div>--> <!--</footer>--> </div> </body></html>