org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: xxxx

未關閉
#1,934 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
15/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
ios, java
領域
mobile, testing

研究方向

從報告中顯示的 IOSDriver 建構以及 iOS 裝置 capabilities 開始,包括 setDeviceName、setPlatformVersion 和 setUdid。該 issue 未列出任何 repository 檔案或測試;首先判斷所回報的 UDID 失敗是否屬於 Java client,然後在實作之前定義可重現的測試或組態變更。

由索引模型根據 Issue 內容生成。

描述

Hi All,

I am getting "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID:xxxx" error when I execute my scripts in older device models like iPhone 6S, iPhone 8, iPad mini 2019/20 models which has 40 characters of UDID but the same is working fine in newer devices models which has 24 Characters of UDID. I am not sure if this is any compatibility issue or bug or its the expected behaviour. Also I am new to iOS Real Device Automation.

Please help me out to resolve this issue or please update me if anybody facing this issue and found any work around.

Below is my Environment:
Mac OS: Ventura 13.3.1(a)
Xcode: 14.3.1

New iPad (Where everything is working fine) : 16.3.1

===Getting the above Error with the below devices=====
iPhone 6S : 15.7.5
iPhone 8: 15.2
iPad mini 2019/2020 model: 12.5.7

Appium.io : 8.5.0
Selenium.io: 4.9.1

Below is my Capabilities:

switch (strExecutionMode){
case "Device":

            String strDeviceName = properties.getProperty("DeviceName");
            
           options.setDeviceName(strDeviceName);
            if(strInstallApp.equalsIgnoreCase("true")){
                options.setApp("xxx.app");
            }


            options.setPlatformName("iOS");
            options.setBundleId("xxxxx");

            switch (strDeviceName){
                case "iPad mini 2019/2020 model:":
                   
                    options.setPlatformVersion("12.5.7");
                    options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
                    break;
                case "New iPad":
                    options.setPlatformVersion("16.3.1");
                    options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxx");
                    break;
                case "iPhone 8":
                    options.setPlatformVersion("15.2");
                    options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
                    break;
                case "iPhone 6S":
                    options.setPlatformVersion("15.7.5");
                    options.setUdid("xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
                    break;
                default:
                    Assert.fail("If Execution Mode is Device then Device Name should be mandatory to configure");
                    break;
            }
            break;
        case "Simulator":
            options.setDeviceName("iPad (10th generation)");
            options.setApp("xxxxx.app");
            options.setPlatformVersion("16.2");
            options.setPlatformName("iOS");
            //options.usePrebuiltWda();
            break;
    }
    options.setAutoWebview(true);
    options.includeSafariInWebviews();
    options.getWebviewConnectTimeout();
    options.setWdaLaunchTimeout(Duration.ofSeconds(Long.parseLong(properties.getProperty("ImplicitWaitTime"))));
    driver = new IOSDriver(new URL("http://127.0.0.1:4723"),options);
    driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(Long.parseLong(properties.getProperty("ImplicitWaitTime"))));
}
主要語言
Java
星號
1.3k
分支
757
平均合併
21 小時 16 分鐘
30 天內合併 PR
29

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

appium/java-client 的其他 Issue

查看 appium/java-client 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。