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.

After an app reset command, the protocol is switched from W3C to MJSONWP.

See original GitHub issue

The problem

Given a session started with W3C capabilities, when I run an app reset command, then the protocol is switched from W3C to MJSONWP.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.2-beta
  • Last Appium version that did not exhibit the issue (if applicable): unknown
  • Desktop OS/version used to run Appium: Mac
  • Node.js version (unless using Appium.app|exe): 8.11.1
  • Mobile platform/version under test: iOS
  • Real device or emulator/simulator: Simulator
  • Appium CLI or Appium.app|exe: CLI

Details

It seems that after the reset command, when creating the new session, it uses the same capabilities but does not end up with the same protocol being chosen. This can cause a problem on the client side if the client is expecting responses conforming to the W3C style.

Link to Appium logs

https://gist.github.com/studuffy/30697ec560769fc25055d2676d450ff4

Code To Reproduce Issue [ Good To Have ]

Create a W3C session:

curl -X "POST" "http://localhost:4723/wd/hub/session" \
     -H 'Content-Type: application/json' \
     -d $'{
  "capabilities": {
    "alwaysMatch": {
      "platformName": "iOS",
      "showXcodeLog": true,
      "app": "{path_to_app}",
      "deviceName": "Simulator",
      "platformVersion": "11.4",
      "udid": "{valid_udid}",
      "processArguments": {
        "args": [
          "ClearKeychain"
        ]
      },
      "automationName": "XCUITest",
      "language": "de"
    }
  }
}'

Then reset the app:

curl -X "POST" "http://localhost:4723/wd/hub/session/{session_id}/appium/app/reset" \
     -H 'Content-Type: application/json'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dpgrahamcommented, Jun 7, 2018

There’s a PR for this. Fix will be published today and will be available in appium beta.

0reactions
lock[bot]commented, Jun 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to turn off w3c in chromedriver to address the error ...
First the solution. As promised by John Chen [Owner - WebDriver for Google Chrome] yesterday, new versions of ChromeDriver 75.0.3770.90 and ...
Read more >
Is there a way to continue using the session before restarting ...
For testing, I always need to close the program by ctrl+c , and then re-run node test.js . At this time, the APP...
Read more >
Problem with running 'sample test' in iOS - Katalon Community
[debug] [MJSONWP] Responding to client with driver. ... are missing in W3C capabilities: [“app”,“automationName”,“deviceName”,“fullReset” ...
Read more >
Appium 2.0 migration doc - BrowserStack
Appium 2.0 enforces strict compatibility with the W3C webdriver protocol and deprecates legacy protocols such as JSONWP & MJSONWP protocol.
Read more >
WebDriver - W3C
The WebDriver protocol is organized into commands. ... or to continue to send commands after the session has been closed.
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