Giter Site home page Giter Site logo

Comments (17)

mykola-mokhnach avatar mykola-mokhnach commented on July 17, 2024

This is most likely happening because the

"appium:usePreinstalledWDA": true,

capability is enabled. Are you sure the system version of the device under test is 16?

from appium.

gointoit avatar gointoit commented on July 17, 2024

This is most likely happening because the

"appium:usePreinstalledWDA": true,

capability is enabled. Are you sure the system version of the device under test is 16?

I am sure, all configurations are absolutely normal, WDA was also pre installed on the phone, Not only iOS 16.0, but also iOS 16.6 and iOS 16.3.1 are all the same errors,I suspect there may be compatibility issues under xcode 15.4?
I can run it normally on other computers(The WDA is also compiled by the corresponding computer), but the xcode version on other computers is 14.*

from appium.

gointoit avatar gointoit commented on July 17, 2024

Why do I use xcode 15? It's because I want to test ios17, But before testing ios17, I want to verify if ios16 works properly in xcode 15, but it runs abnormally. 😭

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on July 17, 2024

I can run it normally on other computers(The WDA is also compiled by the corresponding computer), but the xcode version on other computers is 14.*

You are right, this might be the culprit. Since iOS 17 Apple has completely changed the way the preinstalled WDA feature works, so we have switched to use of devicectl tool. Although this tool does not work for iOS devices running os version 16.

As a workaround you may:

  • Downgrade xCode to version 14 for iOS 16 devices and use version 15 only with iOS 17
  • Disable the usePreinstalledWDA feature for Xcode 15/iOS 16 combination

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on July 17, 2024

FYI @KazuCocoa

from appium.

gointoit avatar gointoit commented on July 17, 2024

I can run it normally on other computers(The WDA is also compiled by the corresponding computer), but the xcode version on other computers is 14.*

You are right, this might be the culprit. Since iOS 17 Apple has completely changed the way the preinstalled WDA feature works, so we have switched to use of devicectl tool. Although this tool does not work for iOS devices running os version 16.

As a workaround you may:

  • Downgrade xCode to version 14 for iOS 16 devices and use version 15 only with iOS 17
  • Disable the usePreinstalledWDA feature for Xcode 15/iOS 16 combination

Thank you very much for your suggestion,I will verify ios17 on xcode15

from appium.

gointoit avatar gointoit commented on July 17, 2024

I can run it normally on other computers(The WDA is also compiled by the corresponding computer), but the xcode version on other computers is 14.*

You are right, this might be the culprit. Since iOS 17 Apple has completely changed the way the preinstalled WDA feature works, so we have switched to use of devicectl tool. Although this tool does not work for iOS devices running os version 16.

As a workaround you may:

  • Downgrade xCode to version 14 for iOS 16 devices and use version 15 only with iOS 17
  • Disable the usePreinstalledWDA feature for Xcode 15/iOS 16 combination

I still fail when using iOS 17, but the error message has changed
appium.log

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on July 17, 2024

2024-06-24 18:57:38:787 - �[38;5;25m[XCUITestDriver@cdcd]�[0m Error: Failed to start the preinstalled WebDriverAgent in 60000 ms. The WebDriverAgent might not be properly built or the device might be locked. The 'appium:wdaLaunchTimeout' capability modifies the timeout.

Are you sure the prebuilt WDA works on the target device? Maybe try to manually run it using the command from the log:

2024-06-24 18:56:37:130 - �[38;5;25m[XCUITestDriver@cdcd]�[0m Executing xcrun devicectl device process launch --device 00008020-001804200E8A002E --terminate-existing --environment-variables '{"USE_PORT":"8105","WDA_PRODUCT_BUNDLE_IDENTIFIER":"com.shopee.infra.automation.WebDriverAgentRunner.xctrunner","MJPEG_SERVER_PORT":"9105"}' com.shopee.infra.automation.WebDriverAgentRunner.xctrunner

and then verify it's listening using curl http://<device_ip>:8105/status

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on July 17, 2024

Also check https://github.com/appium/appium-xcuitest-driver/blob/master/docs/guides/run-preinstalled-wda.md
Usually WDA package needs additional adjustments to run properly being preinstalled.

from appium.

KazuCocoa avatar KazuCocoa commented on July 17, 2024

for the first attached. I haven't seen the error case, but it looks like launching WDA succeeded once but it ended immediately.

2024-06-24 16:58:20:061 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Process monitor update handler invoked for com.shopee.infra.automation.WebDriverAgentRunner.xctrunner
2024-06-24 16:58:20:061 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Computed display ID com.shopee.infra.automation.WebDriverAgentRunner.xctrunner from embeddedApplicationIdentifier: com.shopee.infra.automation.WebDriverAgentRunner.xctrunner, xpcServiceIdentifier: (null), bundleID: com.shopee.infra.automation.WebDriverAgentRunner.xctrunner
2024-06-24 16:58:20:061 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone runningboardd(RunningBoard)[31] <Notice>: Assertion 31-30465-4889 (target:[application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424]) will be created as active
2024-06-24 16:58:20:061 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Got reply for process assertion request, success: YES
2024-06-24 16:58:20:061 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Got reply for process assertion request for pid 31424, success: YES
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: <XCTDProcessMonitor: 0x107f087e0> passing update com.shopee.infra.automation.WebDriverAgentRunner.xctrunner@/private/var/containers/Bundle/Application/4090F275-199C-4C98-9186-8A52C9F32F8B/WebDriverAgentRunner-Runner.app pid: 31424 state: running background to <XCTDProcessManagementServicesProvider: 0x107f0a7c0>
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone kernel[0] <Notice>: memorystatus: set assertion priority(100) target WebDriverAgentRunner-Runner:31424
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone runningboardd(RunningBoard)[31] <Notice>: Attempting to rename power assertion 32964 for target application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner> to application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>;31-30465-4889:Developer testing(BackgroundUI);31-32-4884:FBApplicationProcess
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone runningboardd(RunningBoard)[31] <Notice>: Calculated state for application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>: running-active (role: NonUserInteractive)
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: <XCTestSession: 0x107f07140> pid 31424 com.shopee.infra.automation.WebDriverAgentRunner.xctrunner@/private/var/containers/Bundle/Application/4090F275-199C-4C98-9186-8A52C9F32F8B/WebDriverAgentRunner-Runner.app pid: 31424 state: running background
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone runningboardd(RunningBoard)[31] <Notice>: [application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424] Set jetsam priority to 100 [0] flag[1]
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Computed display ID com.shopee.infra.automation.WebDriverAgentRunner.xctrunner from embeddedApplicationIdentifier: com.shopee.infra.automation.WebDriverAgentRunner.xctrunner, xpcServiceIdentifier: (null), bundleID: com.shopee.infra.automation.WebDriverAgentRunner.xctrunner
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone runningboardd(RunningBoard)[31] <Notice>: [application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424] set Memory Limits to Hard Active (2098)
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: <XCTDProcessMonitor: 0x107f087e0> passing update com.shopee.infra.automation.WebDriverAgentRunner.xctrunner@/private/var/containers/Bundle/Application/4090F275-199C-4C98-9186-8A52C9F32F8B/WebDriverAgentRunner-Runner.app pid: 31424 state: running background to <XCTDProcessManagementServicesProvider: 0x107f0a7c0>
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone WebDriverAgentRunner-Runner(UIKitCore)[31424] <Notice>: sceneOfRecord: sceneID: sceneID:com.shopee.infra.automation.WebDriverAgentRunner.xctrunner-default  persistentID: 25880D4C-172B-4132-8EC9-83D9949C1106
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: <XCTestSession: 0x107f07140> pid 31424 com.shopee.infra.automation.WebDriverAgentRunner.xctrunner@/private/var/containers/Bundle/Application/4090F275-199C-4C98-9186-8A52C9F32F8B/WebDriverAgentRunner-Runner.app pid: 31424 state: running background
2024-06-24 16:58:20:062 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Test session EDE481AC-FC28-47D0-9278-2B65F30E360B requested transport for IDE
...
2024-06-24 16:58:20:064 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone backboardd(RunningBoardServices)[64] <Notice>: Received state update for 31424
2024-06-24 16:58:20:068 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone SpringBoard(FrontBoard)[32] <Notice>: [0x283eef190:(FBSceneManager):sceneID:com.shopee.infra.automation.WebDriverAgentRunner.xctrunner-default] Scene activity mode did change: suspended.
2024-06-24 16:58:20:068 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone SpringBoard(FrontBoard)[32] <Notice>: [0x283eef190:(FBSceneManager):sceneID:com.shopee.infra.automation.WebDriverAgentRunner.xctrunner-default] Scene assertion state did change: None.
2024-06-24 16:58:20:069 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone SpringBoard(FrontBoard)[32] <Notice>: [application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424] Launch assertion supersedes update of workspace assertion to BackgroundActive.
2024-06-24 16:58:20:069 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone SpringBoard(FrontBoard)[32] <Notice>: [application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424] Workspace assertion state did change: None (acquireAssertion = NO).
2024-06-24 16:58:20:069 - �[38;5;180m[ios-device]�[0m Test runner ready
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone WebDriverAgentRunner-Runner(XCTestCore)[31424] <Error>: Error while preparing for testing: (null)
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone SpringBoard(FrontBoard)[32] <Notice>: [application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424] Workspace connection invalidated.
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone SpringBoard(FrontBoard)[32] <Notice>: [application<com.shopee.infra.automation.WebDriverAgentRunner.xctrunner>:31424] Now flagged as pending exit for reason: workspace client connection invalidated
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone backboardd(IOKit)[64] <Notice>: Connection removed: IOHIDEventSystemConnection uuid:731DAF6B-D9AA-461B-A5FE-0B20060D19DC pid:31424 process:WebDriverAgentRunner-Runner type:Passive entitlements:0x0 caller:BackBoardServices: <redacted> + 280 attributes:{
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m     HighFrequency = 1;
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m     bundleID = "com.shopee.infra.automation.WebDriverAgentRunner.xctrunner";
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m     pid = 31424;
2024-06-24 16:58:20:070 - �[38;5;111m[IOSDeviceLog]�[0m } state:0x1 events:0 mask:0x0 dropped:0 dropStatus:0 droppedMask:0x0 lastDroppedTime:NONE
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone backboardd(BackBoardHIDEventFoundation)[64] <Notice>: Removing client connection <BKHIDClientConnection: 0x10785b610; IOHIDEventSystemConnectionRef: 0x107840fd0; vpid: 31424(v16F73); taskPort: 0x55EAB; bundleID: com.shopee.infra.automation.WebDriverAgentRunner.xctrunner> for client: IOHIDEventSystemConnection uuid:731DAF6B-D9AA-461B-A5FE-0B20060D19DC pid:31424 process:WebDriverAgentRunner-Runner type:Passive entitlements:0x0 caller:BackBoardServices: <redacted> + 280 attributes:{
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m     HighFrequency = 1;
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m     bundleID = "com.shopee.infra.automation.WebDriverAgentRunner.xctrunner";
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m     pid = 31424;
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m } state:0x1 events:0 mask:0x0 dropped:0 dropStatus:0 droppedMask:0x0 lastDroppedTime:NONE source:HID
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone backboardd(HIDAnalytics)[64] <Notice>: HIDAnalytics Unregister Send event com.apple.hid.queueUsage
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Test process connection invalidated or interrupted, closing test session <XCTestSession: 0x107f07140> pid 31424.
2024-06-24 16:58:20:071 - �[38;5;111m[IOSDeviceLog]�[0m Jun 24 16:58:19 qijintekiiPhone testmanagerd[30465] <Notice>: Closed <XCTestSession: 0x107f07140> pid 31424, removing from (

for #20290 (comment) , it didn't have ios log, but I guess the mykola's link is the reason. I wondered if the for iOS 17 thing also helps for Xcode 15 x iOS 16

from appium.

gointoit avatar gointoit commented on July 17, 2024

Also check https://github.com/appium/appium-xcuitest-driver/blob/master/docs/guides/run-preinstalled-wda.md Usually WDA package needs additional adjustments to run properly being preinstalled.

rm -rf WebDriverAgentRunner-Runner.app/Frameworks/XC*.framework
Through this method, the connection was successful 👏

from appium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.