By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS Device Farm

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

DVTErrorPresenter: Unable to load simulator devices in Device Farm

Hello everyone, I'm getting this error to try run ios tests on device farm: DVTErrorPresenter: Unable to load simulator devices in Device Farm Used tools: Appium version: 1.22.0 ios version: 15.x Link of run: https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-east-2#/mobile/projects/a5325ea5-f090-4ac3-aabb-dcec96a31cd4/runs/7aba46fc-69db-4e2f-8170-93cb0115639d/jobs/00000 Logs: ``` [DeviceFarm] export TEST_PLATFORM=ios [DeviceFarm] export EXECUTION_ENVIRONMENT=AWS [DeviceFarm] export SLACK_SOS_FILE=/tmp/slackMSG.tmp [DeviceFarm] rm -f $SLACK_SOS_FILE [DeviceFarm] echo "Start Appium TestNG test" Start Appium TestNG test [DeviceFarm] java -Djdk.tls.client.protocols=TLSv1.2 -javaagent:dependency-jars/aspectjweaver-1.9.5.jar -Dallure.results.directory=/tmp/allure-results org.testng.TestNG -d $DEVICEFARM_LOG_DIR/test-output testng.xml WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/private/tmp/scratchXJtgqt.scratch/test-packagebB21R6/dependency-jars/groovy-2.5.8.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int) WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO ] ***oo try to write fileName: /tmp/slackMSG.tmp text: https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/projects/a5325ea5-f090-4ac3-aabb-dcec96a31cd4/runs/7aba46fc-69db-4e2f-8170-93cb0115639d [com.mach.core.util.FileUtil.writeFile(FileUtil.java:44)] [13:26:27,817] [0] [INFO ] ***oo capabilities from java: Capabilities {appPushTimeout: 1000, automationName: XCUITest, deviceName: 00008110-001A75102604801E, newCommandTimeout: 420, platformName: iOS, platformVersion: 15.1, updatedWDABundleId: com.facebook.WebDriverAgent..., useNewWDA: true} [com.mach.core.config.driver.AppiumDriverFactory.getIOSCapabilities(AppiumDriverFactory.java:165)] [13:26:27,963] [146] [ERROR] ***** check the capabilities, e: [com.mach.core.config.driver.AppiumDriverFactory.getIOSDriver(AppiumDriverFactory.java:122)] [13:27:20,945] [53128] org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message: 2022-02-02 13:27:10.270 xcodebuild[1191:8716] DVTErrorPresenter: Unable to load simulator devices. Domain: DVTCoreSimulatorAdditionsErrorDomain Code: 3 Failure Reason: The version of the CoreSimulator framework installed on this Mac is out-of-date and not supported by this version of Xcode. Recovery Suggestion: Please ensure that you have installed all available updates to your Mac's software, and that you are running the most recent version of Xcode supported by macOS. -- CoreSimulator is out of date. Current version (757.5.0) is older than build version (776.3.0). Domain: DVTCoreSimulatorAdditionsErrorDomain Code: 3 -- 2022-02-02 13:27:10.270 xcodebuild[1191:8716] iOSSimulator: [SimServiceContext sharedServiceContextForDeveloperDir:error:] returned nil (Error Domain=DVTCoreSimulatorAdditionsErrorDomain Code=3 "CoreSimulator is out of date. Current version (757.5.0) is older than build version (776.3.0)." UserInfo={NSLocalizedDescription=CoreSimulator is out of date. Current version (757.5.0) is older than build version (776.3.0).}). Simulator device support disabled. Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -project /usr/local/avm/versions/1.22.0/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /tmp/scratchXJtgqt.scratch/DerivedDatakuxIoL -destination id=00008110001A75102604801E IPHONEOS_DEPLOYMENT_TARGET=15.1 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO User defaults from command line: IDEDerivedDataPathOverride = /tmp/scratchXJtgqt.scratch/DerivedDatakuxIoL IDEPackageSupportUseBuiltinSCM = YES Build settings from command line: COMPILER_INDEX_STORE_ENABLE = NO GCC_TREAT_WARNINGS_AS_ERRORS = 0 IPHONEOS_DEPLOYMENT_TARGET = 15.1 2022-02-02 13:27:12.088 xcodebuild[1191:8717] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-19114/DTDeviceKitBase/DTDKRemoteDeviceData.m:373 Details: (null) deviceType from 00008110001A75102604801E was NULL when -platform called. Object: <DTDKMobileDeviceToken: 0x7fbc90f8c120> Method: -platform Thread: <NSThread: 0x7fbc8ec124e0>{number = 3, name = (null)} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. 2022-02-02 16:27:19.723982-0500 WebDriverAgentRunner-Runner[417:15887] Running tests... 2022-02-02 16:27:19.726461-0500 WebDriverAgentRunner-Runner[417:15887] Unable to load configuration data from specified path /; error: The file “System” couldn’t be opened. 2022-02-02 16:27:19.726518-0500 WebDriverAgentRunner-Runner[417:15887] XCTRunner Arguments: ( "/var/containers/Bundle/Application/3B1C00BC-8B46-437E-923A-C3A20F6DA262/WebDriverAgentRunner-Runner.app/WebDriverAgentRunner-Runner" ) 2022-02-02 16:27:19.726621-0500 WebDriverAgentRunner-Runner[417:15887] XCTRunner Environment: { "CA_ASSERT_MAIN_THREAD_TRANSACTIONS" = 0; "CA_DEBUG_TRANSACTIONS" = 0; "CFFIXED_USER_HOME" = "/private/var/mobile/Containers/Data/Application/3CE450E6-4DEF-46F3-BB9C-ACB104BA7E97"; HOME = "/private/var/mobile/Containers/Data/Application/3CE450E6-4DEF-46F3-BB9C-ACB104BA7E97"; LOGNAME = mobile; "MJPEG_SERVER_PORT" = ""; "MTC_CRASH_ON_REPORT" = 1; NSUnbufferedIO = YES; "OS_ACTIVITY_DT_MODE" = YES; PATH = "/usr/bin:/bin:/usr/sbin:/sbin"; "RUN_DESTINATION_DEVICE_ECID" = 7447061612232734; "RUN_DESTINATION_DEVICE_NAME" = PDX640550096; "RUN_DESTINATION_DEVICE_PLATFORM_IDENTIFIER" = "com.apple.platform.iphoneos"; "RUN_DESTINATION_DEVICE_UDID" = 00008110001A75102604801E; SHELL = "/bin/sh"; "SQLITE_ENABLE_THREAD_ASSERTIONS" = 1; TMPDIR = "/private/var/mobile/Containers/Data/Application/3CE450E6-4DEF-46F3-BB9C-ACB104BA7E97/tmp/"; "UPGRADE_TIMESTAMP" = 1643837138604; USER = mobile; "USE_PORT" = 8100; "WDA_PRODUCT_BUNDLE_IDENTIFIER" = "com.facebook.WebDriverAgentRunner"; XCTestBundlePath = "PlugIns/WebDriverAgentRunner.xctest"; XCTestConfigurationFilePath = ""; XCTestSessionIdentifier = "88DCC108-B122-4D1C-84E4-DA839C9021CD"; "XPC_FLAGS" = 0x0; "XPC_SERVICE_NAME" = "UIKitApplication:com.apple.test.WebDriverAgentRunner-Runner[9ca9][rb-legacy]"; "__CF_USER_TEXT_ENCODING" = "0x1F5:0:0"; } 2022-02-02 13:27:19.643 xcodebuild[1191:8639] [MT] IDETestOperationsObserverDebug: 6.524 elapsed -- Testing started completed. 2022-02-02 13:27:19.643 xcodebuild[1191:8639] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start 2022-02-02 13:27:19.643 xcodebuild[1191:8639] [MT] IDETestOperationsObserverDebug: 6.524 sec, +6.524 sec -- end Test session results, code coverage, and logs: /tmp/scratchXJtgqt.scratch/DerivedDatakuxIoL/Logs/Test/Test-WebDriverAgentRunner-2022.02.02_13-27-13--0800.xcresult Testing failed: WebDriverAgentRunner: WebDriverAgentRunner-Runner (417) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: The test runner exited with code 1 before checking in. If you believe this error represents a bug, please attach the result bundle at /tmp/scratchXJtgqt.scratch/DerivedDatakuxIoL/Logs/Test/Test-WebDriverAgentRunner-2022.02.02_13-27-13--0800.xcresult)) ** TEST EXECUTE FAILED ** Testing started. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'ip-192-168-10-5.us-west-2.compute.internal', ip: 'fe80:0:0:0:14c0:e6ff:c23e:5cb3%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.16', java.version: '12.0.2' Driver info: driver.version: IOSDriver ... ```
1
answers
0
votes
31
views
asked 8 months ago

Device Farm: Appium iOS test never launches app, WebdriverAgent shows error "Failed to get automation session"

Problem: my tests are not running and eventually get terminated. While I see both the app and WDA getting installed in the video, the app will never get launched. Testspec output does not reveal any meaningful info, only shows "Terminated: 15". Reviewing the syslog output, I'm able to see a couple of issues with WDA: ``` WebDriverAgentRunner-Runner(WebDriverAgentLib)[416] <Notice>: Enqueue Failure: Application 'test.bundle.id.here' has not loaded accessibility /Users/saaandr/Downloads/WebDriverAgent-2.20.8/WebDriverAgentRunner/UITestingUITests.m 38 1 ``` and ``` WebDriverAgentRunner-Runner(WebDriverAgentLib)[416] <Notice>: Enqueue Failure: Failed to get automation session for test.bundle.id.here:0: Timed out while requesting automation session for test.bundle.id.here (pid:0) ``` [ARN run](https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/mobile/projects/c248fb2e-1df2-4c2c-8499-5bf7523ce683/runs/4e9ab72e-c9d7-4081-ad7d-9341c4d10eb2): arn:aws:devicefarm:us-west-2:223051165180:run:c248fb2e-1df2-4c2c-8499-5bf7523ce683/4e9ab72e-c9d7-4081-ad7d-9341c4d10eb2 As far as desired capabilities, I am not modifying anything from the default capabilities. Also, the testspec yml uses the latest testspec for iOS (v 7.0) as a starting point, modified only with a custom py.test command. This is the behavior that I see when I choose to run test on an iOS14.0, or 13.3.1 device. Executing the xcodebuild -version command in the install phase of the testspec shows that it is running Xcode 11.7, which was released back in Sept 2020. The test run eventually gets terminated by the WebDriverAgentRunner not being able to find the app running. But when I attempt to run on a device with iOS14.8 or 15.x, the setup fails within 2 minutes, since the app cannot be installed due to a resigning issue, similar to [this post](https://repost.aws/questions/QUy77blDSqQc-I6jnDZfvY5w/i-phone-application-not-installing-on-i-os-14-8#CO4MziupFYRJ6KpGTsnkiqmA). Worth mentioning, this same test runs with no problems on an Android device. Any help is appreciated.
1
answers
0
votes
152
views
asked 8 months ago

AWS Device Farm can not get the correct app activity for Android app to launch app using Appium

Hi, I'm trying to run a small test for an Android app using Appium and TestNG on AWS device farm and I'm facing this problem. As recommendation from AWS, I just kept the desired capabilities empty like this and I could run the test successfully on my local machine ``` @BeforeSuite public void setUpAppium() throws MalformedURLException { final String URL_STRING = "http://127.0.0.1:4723/wd/hub"; URL url = new URL(URL_STRING); DesiredCapabilities capabilities = new DesiredCapabilities(); driver = new AndroidDriver<MobileElement>(url, capabilities); driver.manage().timeouts().implicitlyWait(35, TimeUnit.SECONDS); } ``` Then I followed all the steps in the instruction: uploaded the apk, zip file, etc. to AWS Device farm. And then when I ran the test on AWS, I got this error: > Cannot start the 'com.simplemobiletools.notes.pro' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name '.com.simplemobiletools.notes.pro.activities.SplashActivity.Grey_black' used to start the app doesn't exist or cannot be launched As the error message, AWS tried to launch the activity ".com.simplemobiletools.notes.pro.activities.SplashActivity.Grey_black" which is kind of weird because when I used the command "adb shell dumpsys window | grep -E 'mCurrentFocus'" to check the app activity then I got this result "com.simplemobiletools.calculator.activities.MainActivity" and I don't know where AWS got that activity. So I guessed because of the wrong activity, appium couldn't start my app and the test couldn't be run on the device farm. I also checked with other apps and I saw the same problem. App activity that I used the adb shell command to check is always different to the app activity AWS got. AWS seems to tend to add the word "Splash" into the app activity and I don't know what it meant I tried this solution from this link "[https://forums.aws.amazon.com/thread.jspa?messageID=959277&tstart=0](https://forums.aws.amazon.com/thread.jspa?messageID=959277&tstart=0)" by adding appActivity and appWaitActivity to the yaml file ``` - echo "Start appium server" - >- appium --log-timestamp --default-capabilities "{\"deviceName\": \"$DEVICEFARM_DEVICE_NAME\", \"platformName\":\"$DEVICEFARM_DEVICE_PLATFORM_NAME\", \"app\":\"$DEVICEFARM_APP_PATH\", \"udid\":\"$DEVICEFARM_DEVICE_UDID\", \"platformVersion\":\"$DEVICEFARM_DEVICE_OS_VERSION\", \"chromedriverExecutable\":\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\,\"appActivity\":\"com.simplemobiletools.notes.pro.activities.MainActivity\",\"appWaitActivity\":\"com.simplemobiletools.notes.pro.activities.MainActivity\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 & - >- ``` but it didn't work either. Now I get another error "Waiting for appium server to start. Sleeping for 1 second". I tried to find any solution but couldn't find anything Please help me resolve this issue, I really appreciate your help!
1
answers
0
votes
98
views
asked 9 months ago