appium / appium/java-client

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

Open
#1,934 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

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"))));
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the IOSDriver construction and the iOS device capabilities shown in the report, including setDeviceName, setPlatformVersion, and setUdid. The issue names no repository files or tests; determine first whether the reported UDID failure belongs to the Java client, then define a reproducible test or configuration change before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, java
Domain
mobile, testing
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.