maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Receiving the following error on running iOS Maestro tests on Expo Server: Error: Request for viewHierarchy failed, because of unknown reason, body: {"code":"internal","errorMessage":"Unable to perform work on main run loop, process main thread busy for 30.0s"} 29 ❌ Error: BlockingCoroutine is cancelling

Open smehr123 opened this issue 1 year ago • 21 comments
trafficstars

Is there an existing issue for this?

  • [X] I have searched the existing issues and didn't find mine.

Steps to reproduce

Hi, when i run my maestro tests locally on iOS Mobile Dev app, it works beautifully but when i run them on Expo server, they all fail with the following exception. Any help would be greatly appreciated. Please Note: Android works fine on Expo server

Actual results

Failing with error -

Error: Request for viewHierarchy failed, because of unknown reason, body: {"code":"internal","errorMessage":"Unable to perform work on main run loop, process main thread busy for 30.0s"} 29 ❌ Error: BlockingCoroutine is cancelling 30 kotlinx.coroutines.JobCancellationException: BlockingCoroutine is cancelling; job=BlockingCoroutine{Cancelling}@1c6682dc 31 Caused by: UnknownFailure(errorResponse=Request for viewHierarchy failed, code: 500, body: {"code":"internal","errorMessage":"Unable to perform work on main run loop, process main thread busy for 30.0s"}) 32 at xcuitest.XCTestDriverClient.handleExceptions(XCTestDriverClient.kt:310) 33 at xcuitest.XCTestDriverClient.processResponse(XCTestDriverClient.kt:258) 34 at xcuitest.XCTestDriverClient.executeJsonRequest(XCTestDriverClient.kt:240) 35 at xcuitest.XCTestDriverClient.viewHierarchy(XCTestDriverClient.kt:72) 36 at ios.xctest.XCTestIOSDevice$viewHierarchy$1.invoke(XCTestIOSDevice.kt:40) 37 at ios.xctest.XCTestIOSDevice$viewHierarchy$1.invoke(XCTestIOSDevice.kt:38) 38 at ios.xctest.XCTestIOSDevice.execute(XCTestIOSDevice.kt:227) 39 at ios.xctest.XCTestIOSDevice.viewHierarchy(XCTestIOSDevice.kt:38) 40 at ios.LocalIOSDevice.viewHierarchy(LocalIOSDevice.kt:47) 41 at maestro.drivers.IOSDriver.viewHierarchy(IOSDriver.kt:152) 42 at maestro.drivers.IOSDriver.access$viewHierarchy(IOSDriver.kt:41) 43 at maestro.drivers.IOSDriver$contentDescriptor$1.invoke(IOSDriver.kt:147) 44 at maestro.drivers.IOSDriver$contentDescriptor$1.invoke(IOSDriver.kt:147) 45 at maestro.drivers.IOSDriver.runDeviceCall(IOSDriver.kt:499) 46 at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:147) 47 at maestro.ViewHierarchy$Companion.from-8JJjmZI(ViewHierarchy.kt:29) 48 at maestro.utils.ScreenshotUtils$Companion.viewHierarchy-c1iYVAs(ScreenshotUtils.kt:99) 49 at maestro.utils.ScreenshotUtils$Companion.waitForAppToSettle-OpTFbEc(ScreenshotUtils.kt:58) 50 at maestro.drivers.IOSDriver.waitForAppToSettle-5RpGHs4(IOSDriver.kt:429) 51 at maestro.Maestro.waitForAppToSettle-5RpGHs4(Maestro.kt:474) 52 at maestro.Maestro.waitForAppToSettle-5RpGHs4$default(Maestro.kt:469) 53 at maestro.Maestro.screenshotBasedTap-hbl3e4M(Maestro.kt:314) 54 at maestro.Maestro.performTap-hbl3e4M(Maestro.kt:283) 55 at maestro.Maestro.tap-BUbHBYE(Maestro.kt:195) 56 at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:777) 57 at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:240) 58 at maestro.orchestra.Orchestra.executeSubflowCommands(Orchestra.kt:605) 59 at maestro.orchestra.Orchestra.runSubFlow(Orchestra.kt:646) 60 at maestro.orchestra.Orchestra.runFlowCommand(Orchestra.kt:514) 61 at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:270) 62 at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:201) 63 at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:111) 64 at maestro.orchestra.Orchestra.runFlow$default(Orchestra.kt:75) 65 at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:185) 66 at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:54) 67 at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:51) 68 at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:145) 69 at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:51) 70 at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1$1.invoke(TestCommand.kt:291) 71 at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1$1.invoke(TestCommand.kt:249) 72 at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:107) 73 at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:58) 74 at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1.invokeSuspend(TestCommand.kt:249) 75 at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 76 at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) 77 at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) 78 at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) 79 at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585) 80 at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802) 81 at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706) 82 at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)

Expected results

Test should run smoothly on Expo server as they do locally

About app

React Native iOS app Build Tool: Expo Server Tests ran on iPhone 15 - iOS 17.5

About environment

mac Sonoma - 14.6.1 (23G93)

Logs

Running on iPhone 15 - iOS 17.5 - 441BCF51-BE26-4C2A-86FB-437067509B08

Flow Run ${console.log('Starting the flow to access the replay screen')}...Run helpers/signIn.yaml... Run helpers/signIn.yaml... Launch app "com.autograph.fangraph.dev" with clear state... COMPLETED Tap on id: sign-in-btn-id... COMPLETED Assert that "Welcome back to Autograph. Enjoy the latest updates and features." is visible... COMPLETED

Tap on id: email-address-input-id... COMPLETED Wait for animation to end... COMPLETED Take screenshot BeforeEnteringEmail... COMPLETED Run ../java-script-helpers/console.js... COMPLETED ... COMPLETED Take screenshot AfterEnteringEmail... COMPLETED Copy text from element with id: email-address-input-id... COMPLETED Run ../java-script-helpers/console.js... Run flow when "[email protected]" is visible... Run flow when "[email protected]" is visible... Error: Request for viewHierarchy failed, because of unknown reason, body: {"code":"internal","errorMessage":"Unable to perform work on main run loop, process main thread busy for 30.0s"} ❌ Error: BlockingCoroutine is cancelling kotlinx.coroutines.JobCancellationException: BlockingCoroutine is cancelling; job=BlockingCoroutine{Cancelling}@1c6682dc Caused by: UnknownFailure(errorResponse=Request for viewHierarchy failed, code: 500, body: {"code":"internal","errorMessage":"Unable to perform work on main run loop, process main thread busy for 30.0s"}) at xcuitest.XCTestDriverClient.handleExceptions(XCTestDriverClient.kt:310) at xcuitest.XCTestDriverClient.processResponse(XCTestDriverClient.kt:258) at xcuitest.XCTestDriverClient.executeJsonRequest(XCTestDriverClient.kt:240) at xcuitest.XCTestDriverClient.viewHierarchy(XCTestDriverClient.kt:72) at ios.xctest.XCTestIOSDevice$viewHierarchy$1.invoke(XCTestIOSDevice.kt:40) at ios.xctest.XCTestIOSDevice$viewHierarchy$1.invoke(XCTestIOSDevice.kt:38) at ios.xctest.XCTestIOSDevice.execute(XCTestIOSDevice.kt:227) at ios.xctest.XCTestIOSDevice.viewHierarchy(XCTestIOSDevice.kt:38) at ios.LocalIOSDevice.viewHierarchy(LocalIOSDevice.kt:47) at maestro.drivers.IOSDriver.viewHierarchy(IOSDriver.kt:152) at maestro.drivers.IOSDriver.access$viewHierarchy(IOSDriver.kt:41) at maestro.drivers.IOSDriver$contentDescriptor$1.invoke(IOSDriver.kt:147) at maestro.drivers.IOSDriver$contentDescriptor$1.invoke(IOSDriver.kt:147) at maestro.drivers.IOSDriver.runDeviceCall(IOSDriver.kt:499) at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:147) at maestro.ViewHierarchy$Companion.from-8JJjmZI(ViewHierarchy.kt:29) at maestro.utils.ScreenshotUtils$Companion.viewHierarchy-c1iYVAs(ScreenshotUtils.kt:99) at maestro.utils.ScreenshotUtils$Companion.waitForAppToSettle-OpTFbEc(ScreenshotUtils.kt:58) at maestro.drivers.IOSDriver.waitForAppToSettle-5RpGHs4(IOSDriver.kt:429) at maestro.Maestro.waitForAppToSettle-5RpGHs4(Maestro.kt:474) at maestro.Maestro.waitForAppToSettle-5RpGHs4$default(Maestro.kt:469) at maestro.Maestro.screenshotBasedTap-hbl3e4M(Maestro.kt:314) at maestro.Maestro.performTap-hbl3e4M(Maestro.kt:283) at maestro.Maestro.tap-BUbHBYE(Maestro.kt:195) at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:777) at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:240) at maestro.orchestra.Orchestra.executeSubflowCommands(Orchestra.kt:605) at maestro.orchestra.Orchestra.runSubFlow(Orchestra.kt:646) at maestro.orchestra.Orchestra.runFlowCommand(Orchestra.kt:514) at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:270) at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:201) at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:111) at maestro.orchestra.Orchestra.runFlow$default(Orchestra.kt:75) at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:185) at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:54) at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:51) at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:145) at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:51) at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1$1.invoke(TestCommand.kt:291) at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1$1.invoke(TestCommand.kt:249) at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:107) at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:58) at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1.invokeSuspend(TestCommand.kt:249) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693) /bin/bash --login -eo pipefail /var/folders/vn/nzbsghpn733f46w61_gbp33r0000gn/T/eas-build/9536a2f7-ffe1-44b4-9cfc-deb539cf5e9f/steps/41f20da3-de32-44f1-b08f-15dcfdbf6858/scripts/e39f8b70-8875-49c1-a443-4b15beeb9181.sh exited with non-zero code: 1

Maestro version

1.37.9

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

No response

smehr123 avatar Aug 28 '24 21:08 smehr123