-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 #1967
Comments
Hey, thanks for creating this issue! Unfortunately, it's not reproducible to us. Please provide a minimal, reproducible example that clearly explains how to reproduce the problem with the detailed, step-by-step instructions (that can be easily run by me or other maintainers). This issue does not contain such an example, therefore if more accurate reproduction steps aren't provided, we'll have to reluctantly close it. If you don't have time to do it right now, that's totally OK. Feel free to open a new issue in the future with all the required information provided. |
Hi, I am attaching the Expo Server Maestro log that contains the details Also here are the test steps
|
The above flow fails on my machine because I don't have the app |
the flow works fine locally on iOS simulator but fail on Expo. |
Please make sure you understand what a minimal, reproducible example is, and provide one. |
To provide a reproducible example, we need to share the app binary and other test input details, which we're not comfortable disclosing at the moment. Additionally, setting up Expo on your end will be required, as the test passes locally. I’ve attached the maestro_expo log to the ticket to help with troubleshooting. We’re still investigating and will provide the reproduction steps as soon as we have them. |
Gotcha. I understand that you may not want to share an app binary, but for us to fix the problem, we need to reproduce it. Otherwise it's very hard and usually not worth the time investment. Alternatively, you can debug and submit a PR with a fix yourself. |
Hey Team is this issue solved , facing this issue not able to reach the simulator using the maestro |
Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. When creating a new issue, please make sure to diligently fill out the issue template. Thank you for your contribution to our open-source community! |
Our team is running into the same issue for iOS only on EAS builds - everything works fine for Android or running locally. After doing some research, it seems like there have been similar reports in Appium and direct XCTest UI tests with no resolution. I understand the reluctance to begin debugging without a minimal reproducible example, but it seems like none of the bug reporters know how to easily construct one, given that the bug only manifests in complex native apps running Maestro on EAS Build. Any guidance would be appreciated here. I would be willing to spend some time doing so if I knew where to even start. Instead of prematurely closing issues that are affecting multiple users as "completed", I would appreciate if we could explore other avenues of debugging. For example, is there a simple way to increase the timeout from 30s to 60s or 5min? That could help us gauge whether it's a timeout issue or if something is actually crashing/frozen. Alternatively, if there's a way to get more detailed debugging information like a stack dump, we could provide that to look into. Thanks for looking into this! |
Hey @navignaw, thanks for chiming in and sharing more info.
We have this automation in place to only close issues that have had the You're welcome to create a new issue and mention the closed issue. It's OK. If you'd like to explore changing the timeout, feel free to do so and share a PR with us. You might want to expose it behind an env var. |
Thanks @bartekpacia , appreciate the response. From the stack trace, I see that the IOS driver is executing a POST request with json to That leads me to believe that the POST request itself is timing out after 30s and returning an error. Unfortunately I have no idea where to find documentation for this POST request, and whether it even accepts JSON parameters for configuring the timeout. Do you have any ideas on how to track this down? (Let me know if you'd prefer I create a new issue or discussion around this!) |
@bartekpacia it seems like the following RC of maestro does have a fix around this error but its a fix to show the real problem. Any more insights into this? |
Hey @smehr123, unfortunately no more insights. I no longer work at @mobile-dev-inc (at least for now! – my internship ended), but @amanjeetsingh150 takes over stuff that was my responsibility. |
Thank you @bartekpacia |
Same issue here, breaks at different points, there is no visible pattern to make it reproducable other than it failing on iOS only |
If you're talking about #2036 it looks like that change will start showing a stack trace in addition to the "Error: BlockingCoroutine is cancelling" which might help us root cause! Could be worth trying it out in https://github.com/mobile-dev-inc/maestro/releases/tag/cli-1.39.0-dev.2 or waiting for the next published release. Thanks for all the help @bartekpacia 🫡 hope you enjoyed the internship! |
Thank you @navignaw . One quick question, i deleted the maestro folder from root so as to run the installation script of [1.39.0-dev.2]. The script ran fine but it still returns maestro -v as 1.38.1 |
installation worked using dev.2 |
I'm running maestro inside of EAS build and run into this issue seemingly randomly at different points of the tests. Everything passes locally. I've tried updating to Heres an example stack trace from the output json:
|
I think this issue is caused due to keyboard. When we use inputText to populate the value of text field it opens the keyboard. I dont know why it is causing this issue. But when i supply the default value and dont use inputText it seem to work |
Is there an existing issue for this?
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
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
The text was updated successfully, but these errors were encountered: