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.

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

See original GitHub issue

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
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:49

github_iconTop GitHub Comments

5reactions
alexttransislandcommented, Dec 18, 2017

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.

3reactions
jpitacommented, Jun 13, 2018

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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appum Execution get stuck [debug] [JSONWP Proxy] Proxying ...
[XCUITest] Detected that WebDriverAgent is running at url 'http://192.168.2.4:8100' [XCUITest] WebDriverAgent started at url ...
Read more >
Appium 1.7.1 is stuck at [JSONWP Proxy] Proxying [POST /session ...
Appium 1.7.1 is stuck at [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities"
Read more >
Appium/Protractor - Cordova app - When I try to run simple test ...
It seems to be a common appium problem. Issue from github: https://github.com/appium/python-client/issues/255.
Read more >
WebDriver - W3C on GitHub
Let body be a new JSON Object initialized with the following properties: ... POST, /session/{ session id }/timeouts, Set Timeouts.
Read more >
Record/Spy change desiredCapabilities values sent to ...
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:52208/session\] with body: {“desiredCapabilities”:{“bundleId”:“.
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