appium / WebDriverAgent

A WebDriver server for iOS and tvOS
Other
1.23k stars 389 forks source link

iOS18 using Xcode 16 with Sequoia 15.0.1 #948

Closed KingRat0011 closed 1 month ago

KingRat0011 commented 1 month ago

When building and test to iOS18 I get this in the debug console

WebDriverAgentRunner-Runner(1624,0x1f2a602c0) malloc: xzm: failed to initialize deferred reclamation buffer (46) Running tests... Could not find method -[XCUIApplicationProcess waitForQuiescenceIncludingAnimationsIdle:] Test Suite 'All tests' started at 2024-10-21 07:28:58.600. Test Suite 'WebDriverAgentRunner.xctest' started at 2024-10-21 07:28:58.600. Test Suite 'UITestingUITests' started at 2024-10-21 07:28:58.600. t = nans Suite Set Up Couldn't write values for keys ( KeyboardAutocorrection ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( "KeyboardAutocorrection_changedAt" ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( "KeyboardAutocorrection_buildAtChange" ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( "KeyboardAutocorrection_previousValue" ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( "KeyboardAutocorrection_analyzedAt" ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( KeyboardPrediction ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( KeyboardShowPredictionBar ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Couldn't write values for keys ( DidShowGestureKeyboardIntroduction ) in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access Not updating lastKnownShmemState in CFPrefsPlistSource<0x300a8d4d0> (Domain: com.apple.keyboard.preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 25 -> 25 Test Case '-[UITestingUITests testRunner]' started. t = 0.00s Start Test at 2024-10-21 07:28:58.707 t = 0.00s Set Up Built at Oct 21 2024 07:28:16 en0:192.168.1.5 ServerURLHere->http://192.168.1.5:8100<-ServerURLHere

And trying to read the /SOURCE I get

`When trying to do a curl -X GET $JSON_HEADER $DEVICE_URL/source

bash-3.2$ ps -ef | grep -w "iproxy -s" | grep -v grep 501 9130 9092 0 7:39AM ttys002 0:00.01 iproxy -s 0.0.0.0 -u 00008110-0006394E22C3401E 6109 8100 501 9131 9092 0 7:39AM ttys002 0:00.01 iproxy -s 0.0.0.0 -u 00008110-0006394E22C3401E 6110 9100 bash-3.2$ idevice_id -l

00008110-0006394E22C3401E bash-3.2$ JSON_HEADER='-H "Content-Type:application/json"' bash-3.2$ port_no="6103" bash-3.2$ DEVICE_URL=http://localhost:$port_no bash-3.2$ echo $DEVICE_URL http://localhost:6103/ bash-3.2$ echo $JSON_HEADER -H "Content-Type:application/json" bash-3.2$ curl -X GET $JSON_HEADER $DEVICE_URL/source { "value" : { "error" : "unknown error", "message" : "-[XCUIApplicationProcess waitForQuiescenceIncludingAnimationsIdle:]: unrecognized selector sent to instance 0x2818eba80", "traceback" : "(\n\t0 CoreFoundation 0x00000001806b3c74 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 601204\n\t1 libobjc.A.dylib 0x0000000197ee3ee4 objc_exception_throw + 56\n\t2 CoreFoundation 0x00000001807846e8 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 1455848\n\t3 CoreFoundation 0x000000018064d54c EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 181580\n\t4 CoreFoundation 0x000000018064c75c _CF_forwarding_prep_0 + 92\n\t5 WebDriverAgentLib 0x000000010511713c -[XCUIElement(FBUtilities) fb_waitUntilStableWithTimeout:] + 308\n\t6 WebDriverAgentLib 0x00000001050ccb44 +[FBXPath writeXmlWithRootElement:indexPath:elementStore:includedAttributes:writer:] + 644\n\t7 WebDriverAgentLib 0x00000001050cc2f8 +[FBXPath xmlRepresentationWithRootElement:writer:elementStore:query:excludingAttributes:] + 1264\n\t8 WebDriverAgentLib 0x00000001050cb310 +[FBXPath xmlStringWithRootElement:options:] + 716\n\t9 WebDriverAgentLib 0x00000001050d5534 -[XCUIApplication(FBHelpers) fb_xmlRepresentationWithOptions:] + 76\n\t10 WebDriverAgentLib 0x0000000105110e6c +[FBDebugCommands handleGetSourceCommand:] + 968\n\t11 WebDriverAgentLib 0x00000001050e7930 -[FBRoute_TargetAction mountRequest:intoResponse:] + 168\n\t12 WebDriverAgentLib 0x00000001050d0890 37-[FBWebServer registerRouteHandlers:]_block_invoke + 408\n\t13 WebDriverAgentLib 0x000000010510aa44 -[RoutingHTTPServer handleRoute:withRequest:response:] + 168\n\t14 WebDriverAgentLib 0x000000010510b534 72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 64\n\t15 libdispatch.dylib 0x0000000180374094 9CCDBDE3-15E1-3A45-B330-4A5E2C3F92BD + 409748\n\t16 libdispatch.dylib 0x0000000180321a30 9CCDBDE3-15E1-3A45-B330-4A5E2C3F92BD + 72240\n\t17 libdispatch.dylib 0x0000000180374094 9CCDBDE3-15E1-3A45-B330-4A5E2C3F92BD + 409748\n\t18 libdispatch.dylib 0x0000000180320d44 9CCDBDE3-15E1-3A45-B330-4A5E2C3F92BD + 68932\n\t19 libdispatch.dylib 0x0000000180320994 9CCDBDE3-15E1-3A45-B330-4A5E2C3F92BD + 67988\n\t20 CoreFoundation 0x000000018066f014 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 319508\n\t21 CoreFoundation 0x000000018062c4f8 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 46328\n\t22 CoreFoundation 0x000000018063f174 CFRunLoopRunSpecific + 572\n\t23 Foundation 0x0000000181d4beac F9235FC7-EC4E-31C9-B56E-95CF10B07239 + 97964\n\t24 WebDriverAgentLib 0x00000001050cf6d4 -[FBWebServer startServing] + 328\n\t25 WebDriverAgentRunner 0x0000000100ec0210 -[UITestingUITests testRunner] + 80\n\t26 CoreFoundation 0x0000000180641cf0 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 134384\n\t27 CoreFoundation 0x000000018065ddd8 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 249304\n\t28 XCTestCore 0x000000010104ccc4 +[XCTFailableInvocation invokeStandardConventionInvocation:completion:] + 64\n\t29 XCTestCore 0x000000010104cc7c 90+[XCTFailableInvocation invokeInvocation:withTestMethodConvention:lastObservedErrorIssue:]_block_invoke_3 + 24\n\t30 XCTestCore 0x000000010104c4e8 81+[XCTFailableInvocation invokeWithAsynchronousWait:lastObservedErrorIssue:block:]_block_invoke + 300\n\t31 XCTestCore 0x000000010102b308 49+[XCTSwiftErrorObservation observeErrorsInBlock:]_block_invoke + 28\n\t32 libXCTestSwiftSupport.dylib 0x0000000104fc8a48 $sIyB_Ieg_TR + 16\n\t33 libXCTestSwiftSupport.dylib 0x0000000104fc88a8 $sSo24XCTSwiftErrorObservationC6XCTestE14_observeErrors33_B0397D3B80CBC8D7FB9A5B33AB2A74B8LL2inAC8XCTIssueVSgycyyXEtFZyyXEfU + 48\n\t34 libXCTestSwiftSupport.dylib 0x0000000104fc8d58 $sSo24XCTSwiftErrorObservationC6XCTestE14_observeErrors33_B0397D3B80CBC8D7FB9A5B33AB2A74B8LL2inAC8XCTIssueVSgycyyXE_tFZyyXEfU_TA + 28\n\t35 libswift_Concurrency.dylib 0x00000001e9fc0074 $ss9TaskLocalC9withValue_9operation4file4lineqd__x_qdyKXESSSutKlF + 216\n\t36 libXCTestSwiftSupport.dylib 0x0000000104fc86c8 $sSo24XCTSwiftErrorObservationC6XCTestE14_observeErrors33_B0397D3B80CBC8D7FB9A5B33AB2A74B8LL2inAC8XCTIssueVSgycyyXE_tFZ + 504\n\t37 libXCTestSwiftSupport.dylib 0x0000000104fc89bc $sSo24XCTSwiftErrorObservationC6XCTestE14_observeErrors33_B0397D3B80CBC8D7FB9A5B33AB2A74B8LL2inAC8XCTIssueVSgycyyXE_tFZTo + 84\n\t38 XCTestCore 0x000000010102b204 +[XCTSwiftErrorObservation observeErrorsInBlock:] + 160\n\t39 XCTestCore 0x000000010104c2c8 +[XCTFailableInvocation invokeWithAsynchronousWait:lastObservedErrorIssue:block:] + 184\n\t40 XCTestCore 0x000000010104c9cc +[XCTFailableInvocation invokeInvocation:withTestMethodConvention:lastObservedErrorIssue:] + 432\n\t41 XCTestCore 0x000000010104cd50 +[XCTFailableInvocation invokeInvocation:lastObservedErrorIssue:] + 68\n\t42 XCTestCore 0x0000000101001148 24-[XCTestCase invokeTest]_block_invoke_2.87 + 84\n\t43 XCTestCore 0x000000010102f598 -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 76\n\t44 XCTestCore 0x00000001010043dc -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] + 88\n\t45 XCTestCore 0x0000000101000ecc 24-[XCTestCase invokeTest]_block_invoke.80 + 384\n\t46 XCTestCore 0x0000000101006d04 -[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 160\n\t47 XCTestCore 0x0000000101000914 -[XCTestCase invokeTest] + 660\n\t48 XCTestCore 0x00000001010026ec 26-[XCTestCase performTest:]_block_invoke.124 + 32\n\t49 XCTestCore 0x0000000101006d04 -[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 160\n\t50 XCTestCore 0x0000000101002114 __26-[XCTestCase performTest:]_block_invoke.114 + 492\n\t51 XCTestCore 0x0000000100fe102c +[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172\n\t52 XCTestCore 0x0000000100fe0f2c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100\n\t53 XCTestCore 0x0000000101001bc0 -[XCTestCase performTest:] + 248\n\t54 XCTestCore 0x0000000100ffdac8 -[XCTest runTest] + 44\n\t55 XCTestCore 0x000000010100d364 -[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 64\n\t56 XCTestCore 0x000000010100d1e8 27-[XCTestSuite performTest:]_block_invoke + 160\n\t57 XCTestCore 0x000000010100cc70 59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40\n\t58 XCTestCore 0x0000000100fe102c +[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172\n\t59 XCTestCore 0x0000000100fe0f2c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100\n\t60 XCTestCore 0x000000010100cbec -[XCTestSuite _performProtectedSectionForTest:testSection:] + 152\n\t61 XCTestCore 0x000000010100ce94 -[XCTestSuite performTest:] + 192\n\t62 XCTestCore 0x0000000100ffdac8 -[XCTest runTest] + 44\n\t63 XCTestCore 0x000000010100d364 -[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 64\n\t64 XCTestCore 0x000000010100d1e8 27-[XCTestSuite performTest:]_block_invoke + 160\n\t65 XCTestCore 0x000000010100cc70 59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40\n\t66 XCTestCore 0x0000000100fe102c +[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172\n\t67 XCTestCore 0x0000000100fe0f2c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100\n\t68 XCTestCore 0x000000010100cbec -[XCTestSuite _performProtectedSectionForTest:testSection:] + 152\n\t69 XCTestCore 0x000000010100ce94 -[XCTestSuite performTest:] + 192\n\t70 XCTestCore 0x0000000100ffdac8 -[XCTest runTest] + 44\n\t71 XCTestCore 0x000000010100d364 -[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 64\n\t72 XCTestCore 0x000000010100d1e8 27-[XCTestSuite performTest:]_block_invoke + 160\n\t73 XCTestCore 0x000000010100cc70 59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40\n\t74 XCTestCore 0x0000000100fe102c +[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172\n\t75 XCTestCore 0x0000000100fe0f2c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100\n\t76 XCTestCore 0x000000010100cbec -[XCTestSuite _performProtectedSectionForTest:testSection:] + 152\n\t77 XCTestCore 0x000000010100ce94 -[XCTestSuite performTest:] + 192\n\t78 XCTestCore 0x0000000100ffdac8 -[XCTest runTest] + 44\n\t79 XCTestCore 0x000000010102c4f8 __89-[XCTTestRunSession executeTestsWithIdentifiers:skippingTestsWithIdentifiers:completion:]_block_invoke + 100\n\t80 XCTestCore 0x0000000100fe102c +[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172\n\t81 XCTestCore 0x0000000100fe0f2c +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100\n\t82 XCTestCore 0x000000010102c3c0 -[XCTTestRunSession executeTestsWithIdentifiers:skippingTestsWithIdentifiers:completion:] + 252\n\t83 XCTestCore 0x000000010101ed58 72-[XCTExecutionWorker enqueueTestIdentifiersToRun:testIdentifiersToSkip:]_block_invoke_2 + 120\n\t84 XCTestCore 0x000000010101ff2c XCTAsyncEnumerateWithWaiter_block_invoke + 224\n\t85 XCTestCore 0x00000001010200c4 XCTAsyncEnumerate_block_invoke.98 + 52\n\t86 XCTestCore 0x000000010101ebd8 XCTAsyncEnumerateWithWaiter + 500\n\t87 XCTestCore 0x000000010101e998 72-[XCTExecutionWorker enqueueTestIdentifiersToRun:testIdentifiersToSkip:]_block_invoke + 108\n\t88 XCTestCore 0x000000010101ee8c -[XCTExecutionWorker runWithError:] + 76\n\t89 XCTestCore 0x000000010101ced0 25-[XCTestDriver _runTests]_block_invoke.200 + 52\n\t90 XCTestCore 0x0000000101035f1c -[XCTestObservationCenter _observeTestExecutionForTestBundle:inBlock:] + 180\n\t91 XCTestCore 0x000000010101c880 -[XCTestDriver _runTests] + 1088\n\t92 XCTestCore 0x000000010101e658 _XCTestMain + 116\n\t93 WebDriverAgentRunner-Runner 0x00000001009e12d4 -[_XCTRunnerAppDelegate application:didFinishLaunchingWithOptions:] + 0\n\t94 WebDriverAgentRunner-Runner 0x00000001009e10e0 _XCTRunnerRunTests + 0\n\t95 CoreFoundation 0x000000018068e68c EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 448140\n\t96 CoreFoundation 0x000000018068f4b0 EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 451760\n\t97 CoreFoundation 0x000000018062be1c EEC1287D-059B-38C8-9BC1-58A0C8B1E6C2 + 44572\n\t98 CoreFoundation 0x000000018063f174 CFRunLoopRunSpecific + 572\n\t99 GraphicsServices 0x00000001a117e988 GSEventRunModal + 160\n\t100 UIKitCore 0x0000000182e41a88 9D301877-2593-385C-8F72-F075AA0B48FA + 5134984\n\t101 UIKitCore 0x0000000182bdaf78 UIApplicationMain + 336\n\t102 WebDriverAgentRunner-Runner 0x00000001009e1544 main + 176\n\t103 dyld 0x0000000100ad44d0 start + 444\n)" }, "sessionId" : "85EF7786-F670-4F12-86DE-226BC5850A64" }bash-3.2$`

{ "BuildVersion": "22A3370", "ConnectionType": "USB", "DeviceClass": "iPhone", "DeviceName": "Ios18", "Identifier": "00008110-0006394E22C3401E", "ProductType": "iPhone14,7", "ProductVersion": "18.0.1", "UniqueDeviceID": "00008110-0006394E22C3401E" } Please do you have any idea on how to fix this?

KazuCocoa commented 1 month ago

Duplicate of https://github.com/appium/appium/issues/20239#issuecomment-2277352021