Closed lloydasamoah26 closed 8 months ago
What the result of logs with showXcodeLog
capability?
[38;5;32m[XCUITestDriver@2c30 (c1cd7689)][0m Beginning **** with command 'xcodebuild build-for-****ing ****-without-building -project /Users/distiller/nuggets/mobile/react-native/appium-****s/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent-bthntghqwpxelefdtqmrfsgiegry -destination id=17D29414-B320-4BD1-AB35-F487D5AEA0CA IPHONEOS_DEPLOYMENT_TARGET=16.2 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/distiller/nuggets/mobile/react-native/appium-****s/node_modules/appium-webdriveragent'
[38;5;32m[XCUITestDriver@2c30 (c1cd7689)][0m Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability
[38;5;32m[XCUITestDriver@2c30 (c1cd7689)][0m Waiting up to 60000ms for WebDriverAgent to start
Or I guess test
was replaced with ****
in the log but that the result of below command issued by Appium:
xcodebuild build-for-ing -without-building -project /Users/distiller/nuggets/mobile/react-native/appium-****s/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent-bthntghqwpxelefdtqmrfsgiegry -destination id=17D29414-B320-4BD1-AB35-F487D5AEA0CA IPHONEOS_DEPLOYMENT_TARGET=16.2 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO
[38;5;32m[XCUITestDriver@2c30 (c1cd7689)][0m Got response with status 500: {"value":{"error":"session not created","message":"Cannot launch life.nuggets.app application. Make sure the correct bundle identifier has been provided in capabilities and check the device log for possible crash report occurrences","traceback":""},"sessionId":null}
From what I see in the above log the WDA starts properly, but the app itself fails to start. Are you sure it does not crash? Hve you tried to manually run it on a simulator?
Hi @KazuCocoa pease find the appium logs with Xcode Logs enabled here: https://gist.github.com/lloydasamoah26/35058967dfa3c820a7617425f7d47db0
@mykola-mokhnach thats what i thought initially but then
Using the xcode application on my machine i was able to build the .app file then install and launch it on the simulator just fine.
I then built the .app file using fastlane and and used the following commands to install it and launch it on the simulator on my machine successfully:
xcrun simctl install booted /Users/lloydasamoah/Library/Developer/Xcode/DerivedData/NuggetsLife-fhqbpughyfbychfqikoukyonsesk/Build/Products/Release-iphonesimulator/NuggetsLife.app
xcrun simctl launch booted life.nuggets.app
I was then able to run appium against our application locally no issues
So as part of the circle ci job i decided to run the above xcrun commands before attempting to run appium and starting the tests and there was no issue.
It is now only when webdriver attempts to launch the application do i get the error "Failed to create WDA session (A new session could not be created. Details: Cannot launch life.nuggets.app application. Make sure the correct bundle identifier has been provided in capabilities and check the device log for possible crash report occurrences). Retrying...".
Have you actually checked the device log from CircleCI? Might it be your machine is building for arm, but the remote one is Intel?
@mykola-mokhnach nope both my local machine and the circle ci machine are both running x86_64 intel machines which i have verified running uname -m.
I don't have any other ideas. Fetch the Simulator log. Most likely the app just crashes on execution
Closed because of no response
Do I have the most recent component updates?
Is the component officially supported by the Appium team?
Is there an existing issue for this?
Current Behavior
When running appium in circle ci to perform test execution(WebdriverIO) against our react native ios application on an ios simulator I am getting the following error from the XCUITestDriver: "Failed to create WDA session (A new session could not be created. Details: Cannot launch XXXXX.app application. Make sure the correct bundle identifier has been provided in capabilities and check the device log for possible crash report occurrences). Retrying..." however when i run the same setup locally appium is able to launch the application on the simulator no issue and the tests run just fine.
Expected Behavior
I expected the appium to launch the ios application and begin running the tests
Minimal Reproducible Example
Unfortunately the project where this issue has occurred can't be shared for security reasons and I am unable to share the .app file publicly, However this issue can be recreated using any react native application . Please find the structure for the the appium tests within the project in question:
This should help you to understand the paths used within the config.yml, wdio.ios.simulator.conf.js, and wdio.ios.real.conf.js i have included here: https://gist.github.com/lloydasamoah26/65e1ae98034730a21eae9a5f05cb5d80 to help you get your project set up to recreate the issue. I have the appium-tests directory sitting within a react native project as follows:
Environment
All the details below are in relation to the circle environment where this issue occurs:
appium --version
): 2.4.1node --version
): 16.20.1npm
version (output ofnpm --version
): Not sureLink to Appium Logs
https://gist.github.com/lloydasamoah26/75499f8a561288d409b66f47178a1588
Further Information
No response