Skip to content
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

Open a non-existent application, the program gets stuck, then you need to restart the webdriveragent program #702

Closed
gassion opened this issue May 15, 2023 · 4 comments

Comments

@gassion
Copy link

gassion commented May 15, 2023

driver.launchApp();

POST /session/:session_id/appium/app/launch

Please help me, thank you very much!

@myungkyojung
Copy link

myungkyojung commented May 16, 2023

@mykola-mokhnach
The aut(chrome) is installed on the device, but cannot launch it.
The fb_isInstalled function returns false..

******** Request ********
http://localhost:5000/session/83A69245-C52E-4958-9996-1410EB65444D/wda/apps/launch
{
"bundleId": "com.google.chrome.ios"
}

********* Response *********(
{
"value": {
"error": "invalid argument",
"message": "The application 'com.google.chrome.ios' cannot be activated because it is not installed on the device under test",
"traceback": "(\n\t0 CoreFoundation 0x00000001aca46da0 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 40352\n\t1 libobjc.A.dylib 0x00000001a5b043d0 objc_exception_throw + 60\n\t2 CoreFoundation 0x00000001acbb3d08 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 1535240\n\t3 WebDriverAgentLib 0x00000001052d39cc -[FBApplication fb_assertInstalledByAction:] + 484\n\t4 WebDriverAgentLib 0x00000001052d3af4 -[FBApplication activate] + 44\n\t5 WebDriverAgentLib 0x00000001052ce3a8 -[XCUIApplication(FBCompatibility) fb_activate] + 36\n\t6 WebDriverAgentLib 0x0000000105292f80 -[FBSession launchApplicationWithBundleId:shouldWaitForQuiescence:arguments:environment:] + 524\n\t7 WebDriverAgentLib 0x00000001052b8a0c +[FBSessionCommands handleSessionAppLaunch:] + 360\n\t8 WebDriverAgentLib 0x000000010525c38c -[FBRoute_TargetAction mountRequest:intoResponse:] + 180\n\t9 WebDriverAgentLib 0x0000000105249118 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 424\n\t10 WebDriverAgentLib 0x000000010527e3e4 -[RoutingHTTPServer handleRoute:withRequest:response:] + 164\n\t11 WebDriverAgentLib 0x000000010527ee68 __72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 64\n\t12 libdispatch.dylib 0x00000001b3f05eac B74732B5-D7FE-34A4-9346-41945701F020 + 16044\n\t13 libdispatch.dylib 0x00000001b3f15500 B74732B5-D7FE-34A4-9346-41945701F020 + 79104\n\t14 libdispatch.dylib 0x00000001b3f05eac B74732B5-D7FE-34A4-9346-41945701F020 + 16044\n\t15 libdispatch.dylib 0x00000001b3f146a4 B74732B5-D7FE-34A4-9346-41945701F020 + 75428\n\t16 libdispatch.dylib 0x00000001b3f142f4 _dispatch_main_queue_callback_4CF + 44\n\t17 CoreFoundation 0x00000001acad5d18 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 625944\n\t18 CoreFoundation 0x00000001acab7650 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 501328\n\t19 CoreFoundation 0x00000001acabc4dc CFRunLoopRunSpecific + 612\n\t20 Foundation 0x00000001a6d5a0c4 35567930-FBC2-374B-B44B-1DDFE3ADA4A1 + 270532\n\t21 WebDriverAgentLib 0x0000000105247f18 -[FBWebServer startServing] + 352\n\t22 WebDriverAgentRunner 0x0000000104f7a804 -[UITestingUITests testRunner] + 92\n\t23 CoreFoundation 0x00000001acaafcf4 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 470260\n\t24 CoreFoundation 0x00000001aca5dd94 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 134548\n\t25 XCTestCore 0x0000000105c8454c +[XCTFailableInvocation invokeStandardConventionInvocation:completion:] + 88\n\t26 XCTestCore 0x0000000105c844ec __65+[XCTFailableInvocation invokeInvocation:lastObservedErrorIssue:]_block_invoke_3 + 28\n\t27 XCTestCore 0x0000000105c83cf8 __81+[XCTFailableInvocation invokeWithAsynchronousWait:lastObservedErrorIssue:block:]_block_invoke.13 + 112\n\t28 XCTestCore 0x0000000105c0a138 +[XCTSwiftErrorObservation observeErrorsInBlock:] + 156\n\t29 XCTestCore 0x0000000105c83b50 +[XCTFailableInvocation invokeWithAsynchronousWait:lastObservedErrorIssue:block:] + 500\n\t30 XCTestCore 0x0000000105c84134 +[XCTFailableInvocation invokeInvocation:lastObservedErrorIssue:] + 388\n\t31 XCTestCore 0x0000000105c6d2b4 __24-[XCTestCase invokeTest]_block_invoke_2 + 104\n\t32 XCTestCore 0x0000000105c1bacc -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 88\n\t33 XCTestCore 0x0000000105c77b90 -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] + 72\n\t34 XCTestCore 0x0000000105c6d208 __24-[XCTestCase invokeTest]_block_invoke.300 + 192\n\t35 XCTestCore 0x0000000105be77b0 -[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 180\n\t36 XCTestCore 0x0000000105c6cd24 -[XCTestCase invokeTest] + 880\n\t37 XCTestCore 0x0000000105c6e6cc __26-[XCTestCase performTest:]_block_invoke_2 + 48\n\t38 XCTestCore 0x0000000105be77b0 -[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 180\n\t39 XCTestCore 0x0000000105c6e600 __26-[XCTestCase performTest:]_block_invoke.416 + 124\n\t40 XCTestCore 0x0000000105c3125c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t41 XCTestCore 0x0000000105c6de40 -[XCTestCase performTest:] + 740\n\t42 XCTestCore 0x0000000105bbc8b4 -[XCTest runTest] + 64\n\t43 XCTestCore 0x0000000105c345b8 -[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 160\n\t44 XCTestCore 0x0000000105c34424 __27-[XCTestSuite performTest:]_block_invoke + 216\n\t45 XCTestCore 0x0000000105c33dc4 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 48\n\t46 XCTestCore 0x0000000105c3125c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t47 XCTestCore 0x0000000105c33d60 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 192\n\t48 XCTestCore 0x0000000105c3409c -[XCTestSuite performTest:] + 240\n\t49 XCTestCore 0x0000000105bbc8b4 -[XCTest runTest] + 64\n\t50 XCTestCore 0x0000000105c345b8 -[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 160\n\t51 XCTestCore 0x0000000105c34424 __27-[XCTestSuite performTest:]_block_invoke + 216\n\t52 XCTestCore 0x0000000105c33dc4 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 48\n\t53 XCTestCore 0x0000000105c3125c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t54 XCTestCore 0x0000000105c33d60 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 192\n\t55 XCTestCore 0x0000000105c3409c -[XCTestSuite performTest:] + 240\n\t56 XCTestCore 0x0000000105bbc8b4 -[XCTest runTest] + 64\n\t57 XCTestCore 0x0000000105c345b8 -[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 160\n\t58 XCTestCore 0x0000000105c34424 __27-[XCTestSuite performTest:]_block_invoke + 216\n\t59 XCTestCore 0x0000000105c33dc4 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 48\n\t60 XCTestCore 0x0000000105c3125c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t61 XCTestCore 0x0000000105c33d60 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 192\n\t62 XCTestCore 0x0000000105c3409c -[XCTestSuite performTest:] + 240\n\t63 XCTestCore 0x0000000105bbc8b4 -[XCTest runTest] + 64\n\t64 XCTestCore 0x0000000105bbe85c __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke_2 + 160\n\t65 XCTestCore 0x0000000105c3125c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t66 XCTestCore 0x0000000105bbe7ac __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 152\n\t67 XCTestCore 0x0000000105bbe970 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.104 + 116\n\t68 XCTestCore 0x0000000105bdf5cc -[XCTestObservationCenter _observeTestExecutionForBlock:] + 340\n\t69 XCTestCore 0x0000000105bbe4fc -[XCTTestRunSession runTestsAndReturnError:] + 504\n\t70 XCTestCore 0x0000000105c2e774 -[XCTestDriver _runTests] + 464\n\t71 XCTestCore 0x0000000105bbcf88 _XCTestMain + 100\n\t72 WebDriverAgentRunner-Runner 0x0000000104ca155c -[_XCTRunnerAppDelegate application:didFinishLaunchingWithOptions:] + 0\n\t73 WebDriverAgentRunner-Runner 0x0000000104ca1540 _XCTRunnerRunTests + 0\n\t74 CoreFoundation 0x00000001aca807c0 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 276416\n\t75 CoreFoundation 0x00000001acae7300 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 697088\n\t76 CoreFoundation 0x00000001acab71d8 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 500184\n\t77 CoreFoundation 0x00000001acabc4dc CFRunLoopRunSpecific + 612\n\t78 GraphicsServices 0x00000001e7d1c35c GSEventRunModal + 164\n\t79 UIKitCore 0x00000001aee4837c B0858D8E-7220-37BF-873F-ECC2B0A358C3 + 3789692\n\t80 UIKitCore 0x00000001aee47fe0 UIApplicationMain + 340\n\t81 WebDriverAgentRunner-Runner 0x0000000104ca1770 main + 192\n\t82 dyld 0x00000001cbf44dec 41605DC7-F412-37D1-B51B-FEE1A26701E9 + 89580\n)"
},
"sessionId": "83A69245-C52E-4958-9996-1410EB65444D"
}

@mykola-mokhnach
Copy link

Works for me on Simulators. @KazuCocoa Could you please confirm if the install detection works as expected on real devices as well?

@gassion
Copy link
Author

gassion commented May 16, 2023

@mykola-mokhnach thank you very much!

@gassion gassion closed this as completed May 16, 2023
@KazuCocoa
Copy link
Member

KazuCocoa commented May 16, 2023

Actually fb_assertInstalledByAction raised an error for installed app. Once I commented out the assertion and just called [super activate], the app started while with fb_assertInstalledByAction, it raised no installed app error in a real device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants