iOS: executeScript(mobile: installCertificates) weird server-side error

i’m using the new installCertificates method supported in appium-xcuitest-driver.

This is simple code that’s running

  var options = new AppiumOptions();
        options.AddAdditionalCapability("platformVersion", "14.6");
        options.AddAdditionalCapability("platformName", "iOS");
        options.AddAdditionalCapability("automationName", "XCUITest");
        options.AddAdditionalCapability("updatedWDABundleId", "***********");
        options.AddAdditionalCapability("deviceName", "iPhone 6s");
        options.AddAdditionalCapability("udid", "auto");
        options.AddAdditionalCapability("autoAcceptAlerts", true);
        options.AddAdditionalCapability("bundleId", "com.apple.calculator");
        var driver = new IOSDriver<IOSElement>(options, TimeSpan.FromSeconds(300));
        string filePath = "/Users/supportuser/Downloads/certificate.pem";
        var certContents = File.ReadAllBytes(filePath);
        string certificateData = Convert.ToBase64String(certContents);
        Console.Write(certificateData);
        driver.ExecuteScript("mobile:installCertificate", new Dictionary<string, string> { { "content", certificateData } });

i get a weird response that i’m not expecting which is

OpenQA.Selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot find {“type”:“accessibility id”,“value”:“Allow”} within 15000ms timeoutResult message:

Which i’m not sure what this means, as nothing else happens on the screen and the certficate isn’t installed

Most likely this means that it tries to install the certificate via UI and fails. Please provide the full server log to know more details.

Actually i’m running this on my MAC without an appium server, i’m not sure how it’s able to launch the calculator app but appium seems to be running. This is what i’m seeing:

Scenario 1: No appium server running, just launching from VS for Mac. I get the

OpenQA.Selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot find {“type”:“accessibility id”,“value”:“Allow”} within 15000ms timeoutResult message:

Scenario 2:
When i start an actual appium server, i get a timeout session error, and the test output is “OpenQA.Selenium.WebDriverException: A session is either terminated or not started.”

Sorry, I can help nothing without the log