appium: Appium 1.7.1 is stuck at [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities"

The problem

When upgraded into Appium 1.7.1, everytime app started by Appium in Simulator , I need to wait 2~6 mins to let test run. After check the Appium log, I found Appium paused at:

[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.***.****","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}

after 6 mins, Appium get the following, and start to run

[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"396FCBB1-11DE-4C6D-8A07-751C97CEB2DC","capabilities":{"device":"iphone","browserName":null,"sdkVersion":"11.1","CFBundleIdentifier":null}},"sessionId":"396FCBB1-11DE-4C6D-8A07-751C97CEB2DC","status":0}

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.0, 1.7.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.6.5 (no issues)
  • Desktop OS/version used to run Appium: Mac OS 10.12.6
  • Node.js version (unless using Appium.app|exe): v7.10.0
  • Mobile platform/version under test: iOS 11.0, 11.1, 10.3.1
  • Real device or emulator/simulator: simulator
  • Appium CLI or Appium.app|exe: CLI
  • Xcode version: 9.0, 9.1

Details

Currently, after app launched, I always need to wait 2~6 mins to let Appium responded, and start to run my test…

Appium 1.6.5 can run it without any issue. I think it should be introduced by 1.7.0 and after.

https://github.com/appium/appium/issues/9482 has the same issue, although the issue has been closed, she reproduced it again recently, cannot find a solution.

Great thanks!!

Link to Appium logs

https://gist.github.com/shane51/7fe7e0d5362647ee51d7eaa591cf36bc

Simulator logs:

https://gist.github.com/shane51/140a4f9556ecb5b9169354c348feed35

Code To Reproduce Issue [ Good To Have ]


    private void iOSCaps() {
        String IOS_APP_PATH = "/src/main/resources/*** - QA.app";
        File app = new File(System.getProperty("user.dir") + IOS_APP_PATH);
        capabilities = new DesiredCapabilities();
        capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.IOS);
        capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
        capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, devicesUtils.IOS_DEVICE_NAME);
        capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, devicesUtils.SIMULATOR_VERSION);
        capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
        capabilities.setCapability(MobileCapabilityType.UDID, devicesUtils.SIMULATOR_UUID);
        capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
        capabilities.setCapability("bundleId", "com.***.qa2");
        capabilities.setCapability("useNewWDA", true);
        //you are free to set additional capabilities
    }

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 49

Commits related to this issue

Most upvoted comments

The issue magicly disappeared for me after adding

    clearSystemFiles: true,
    wdaStartupRetryInterval: 1000,
    useNewWDA: true,
    waitForQuiescence: false,
    shouldUseSingletonTestManager: false

caps for Ruby. I didn’t play around about what is optional, just a sum up after lurking through this and similar issues on internet.

Appium 1.8 xcode 9.4

capabilities.setCapability("waitForQuiescence", false) capabilities.setCapability("useNewWDA", true) capabilities.setCapability("shouldUseSingletonTestManager", false) capabilities.setCapability("clearSystemFiles", true) capabilities.setCapability("shouldUseTestManagerForVisibilityDetection", true)

still have the issue… It’s weird, it opens and closes the app 3 times and then just hangs…

@mykola-mokhnach The app under test works fine with Appium 1.6.x for half a year. This waiting issue came out after I upgrade Appium 1.6.5 to 1.7.0. When I downgrade to 1.6.5, it works fine. So it should related some changes in 1.7.0

Hey @quintuschen, after add the suggested configs I have stable tests. Actually, I’m integrating the appium on my project, so I don’t have many test cases. After you asked me this, I tried to add more tests, and the suite still running well. Would you like to know my environment specs or something like that? Just let me know 😃