question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error parsing session info from SauceLabs

See original GitHub issue

Description

When I run the attached code with Appium version 8.0.0-beta on SauceLabs, in the SauceLabs dashboard I see the test running, I see the device launching and the app starting, so I know the session had started. But then the client fails with this error:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Unable to parse remote response

See full exception log here: https://gist.github.com/itaibh/5cdf5eb606de58299aed0abb4005c0e0

Environment

I give here sample code that uses the following capabilities:

  • IOS 13.0 Simulator
  • Appium 1.17.1

However, the same issue occurs on other configurations, where the common thing is that I use Appium Java Client 8.0.0-beta and SauceLabs. Notice this doesn’t happen on BrowserStack (which is the only other provider I tested on).

Code To Reproduce Issue

import io.appium.java_client.AppiumDriver;
import org.openqa.selenium.MutableCapabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
import java.net.URL;

public class TestAppiumOnSauceLabs {
    @Test
    public void TestOnSauce() {
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("browserName", "");
        caps.setCapability("name", "iOS Native Demo");
        caps.setCapability("platformName", "iOS");
        caps.setCapability("appium:platformVersion", "13.0");
        caps.setCapability("appiumVersion", "1.17.1");
        caps.setCapability("appium:deviceName", "iPhone XS Simulator");

        MutableCapabilities sauceOpts = new MutableCapabilities();
        sauceOpts.setCapability("username", System.getenv("SAUCE_USERNAME"));
        sauceOpts.setCapability("accessKey", System.getenv("SAUCE_ACCESS_KEY"));
        caps.setCapability("sauce:options", sauceOpts);

        caps.setCapability("app", "https://applitools.jfrog.io/artifactory/Examples/eyes-ios-hello-world/1.2/eyes-ios-hello-world.zip");

        WebDriver driver = null;
        try {
            driver = new AppiumDriver(new URL("https://ondemand.saucelabs.com:443/wd/hub"), caps);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (driver != null) {
                driver.quit();
            }
        }
    }
}

Link To Appium Logs

https://gist.github.com/itaibh/d85b1a33257fa5101816f1214a48fda9

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
KazuCocoacommented, Dec 8, 2021

Python client handles connections via urllib3 as same as the base selenium client. It sets redirect stuff True by default, so I think python is also ok.

0reactions
madhusudhan-pathacommented, Dec 14, 2021

I have come across this issue with Serenity BDD (3.1.1) which has Appium java-client: 8.0.0-beta. Here are some observations.

  1. IOS tests are throwing the error, when executed using SauceLabs, as shown in description ( 303 status code, followed by unable to parse the json response). I have Reported a ticket, not knowing where the issue is coming from, https://github.com/serenity-bdd/serenity-core/issues/2634.
  2. But, Android test scripts got executed with Saucelabs with the same java client version and serenity BDD. It is not giving any redirect status codes or json parsing errors
Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Error Messages - Sauce Labs Documentation
Below are some Sauce Labs automated testing common error messages and how to fix them.
Read more >
Misconfigured -- Unsupported OS/browser/version/device ...
I wanted to run my scripts in Saucelabs by launching Edge driver but when the scripts is triggered getting an error as "...
Read more >
Resolve Mobile App Test Failures and Errors Faster - YouTube
In this session, you will learn how Sauce Labs mobile app diagnostics helps developers adopt test signals across the SDLC, capture network ...
Read more >
Sauce Labs FAQs | Comparably
This only happens when using Selenium 3.9.0 Java client bindings. The error looks like this: org.openqa.selenium.WebDriverException: Unable to parse remote ...
Read more >
Testing web apps in the cloud (Sauce Labs) using Selenium ...
This tutorial is based on Sauce Labs's own tutorial for TestNG. ... @return * @throws MalformedURLException if an error occurs parsing the url...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found