Appium-desktop: Appium Desktop crashes and session terminated when selecting element from attached inspector session

Created on 10 May 2018  Â·  19Comments  Â·  Source: appium/appium-desktop

Appium or Appium Desktop?

  • [x] I have verified that my issue does not occur with Appium and should be investigated as an Appium Desktop issue

The problem

Appium Desktop crashes and session terminated when selecting element from attached inspector session. This was working until I updated yesterday afternoon. I tried to find a crash log, but ~/Library/Logs/appium-desktop doesn't exist.

Steps to reproduce

  • In Appium Desktop, Start Server
  • In Terminal, create session via arc command
  • In Appium Desktop, Start Inspector Session and Attach to Session
  • Wait for the app to load in inspector window
  • Select an element in inspector window and Appium Desktop crashes resulting in session terminated

Environment

  • I am running Appium Desktop version 1.6.1.
  • I am on (pick one):

    • [x] Mac (10.13.3)



      • Xcode 9.2


      • Device: iPhone 6 (11.2)


      • Ruby 2.5.1


      • Ruby Gems:





        • appium_console (2.8.1)



        • appium_lib (9.12.0)



        • appium_lib_core (1.5.0)






    • [ ] Windows

    • [ ] Linux

bug

Most helpful comment

Alright, so I got a chance to dig into it some more. The problem is that the client that appium desktop uses (admc/wd) only accepts MJSONWP sessions. The ARC command is creating a W3C session and the wd session blows up when it tries to attach to it and then find an element, due to incompatibility.

I opened a new issue to track this: https://github.com/appium/appium/issues/10682 and I'm going to close this one

For the time being though, you can get it working by updating your capabilities to this:

[caps]
platformName = "ios"
deviceName = "iPhone 6"
platformVersion = "11.3"
app = "./SampleAppiumApp.app"
automationName = "XCUITest"
forceMjsonwp = true

This forces it to use an MJSONWP session so that it will be compatible with Appium Desktop.

Thanks again for your help on this, this was really helpful.

All 19 comments

@JoelWhitney Did this start happening with 1.6.1? Did it work on previous versions?

@dpgraham yes, this was working before I updated to 1.6.1 yesterday

Do you have a sample app I can use? I can't seem to reproduce this.

@dpgraham I tried to uninstall / re-install Appium Desktop, but I'm still seeing the crash.. I'll add some more Environment details above

I can reproduce with this sample project
https://github.com/JoelWhitney/sample-appium-test

Steps to reproduce

  • Clone sample-appium-test
  • In Appium Desktop, Start Server
  • Open Terminal at sample-appium-test directory
  • Create session via arc command
  • In Appium Desktop, Start Inspector Session and Attach to Session
  • Wait for the app to load in inspector window
  • Select Sample Appium App element and it crashes

39882595-3c4548b4-5452-11e8-804d-f15c71ca6d18

@JoelWhitney I just tried it and wasn't able to reproduce, but I didn't use arc.... what is arc?

Do you have the appium server logs too?

@dpgraham okay, so looks like the problem is related to how I'm starting my session and then trying to use the Attach to Session capability in Desktop to hook into the session I already have running. I'm assuming you're starting the session right from desktop and passing in the desired capabilities?

I'm using the Ruby clients (appium_lib / appium_console) and running arc in the same directory as the appium.txt file to start the Appium Ruby Console, which allows me to interact with the application using the console. I then start an inspector session and attach to the session that was created when I started the Appium Ruby Console.

If I go through the workflow that you are using, Appium Desktop does not crash. If I follow my workflow, Appium Desktop crashes and all windows are closed (not sure how to get the appium logs since it completely exits).

I can reproduce it now. Thanks for reporting this @JoelWhitney

Alright, so I got a chance to dig into it some more. The problem is that the client that appium desktop uses (admc/wd) only accepts MJSONWP sessions. The ARC command is creating a W3C session and the wd session blows up when it tries to attach to it and then find an element, due to incompatibility.

I opened a new issue to track this: https://github.com/appium/appium/issues/10682 and I'm going to close this one

For the time being though, you can get it working by updating your capabilities to this:

[caps]
platformName = "ios"
deviceName = "iPhone 6"
platformVersion = "11.3"
app = "./SampleAppiumApp.app"
automationName = "XCUITest"
forceMjsonwp = true

This forces it to use an MJSONWP session so that it will be compatible with Appium Desktop.

Thanks again for your help on this, this was really helpful.

Great, thanks for following up and providing a workaround @dpgraham

I did the workaround here in previous version of appium and it worked. I just updated to the latest v1.9.1, server 1.7.1 and this issue is now happening even with the workaround applied.

Why this issue is closed while problem is still happening ?

@hsafari Because it was resolved at the time and came back.

So I'm on 1.9.1 and this issue is still present- any chance a fix is coming soon?

@dpgraham Did set that server cap and is still broken even after upgrading to Appium 1.8.2 Server v1.9.1. Same issue, closes out Appium.

@rcuyugan I'm working on updating the client that Appium Desktop uses so that we can attach to W3C sessions.

A temporary workaround is to use an old version of a client that doesn't use W3C

Since I have the problem of using appium desktop to inspect element as it will end crash the appium server.
The last appium-desktop version that is working for me is v1.5.0
Ever since I have upgraded to appium v1.9.1.
I can no longer use appium-desktop v1.5.0

I need a way to inspect the ui element for iOS and Android.

@rcuyugan I'm working on updating the client that Appium Desktop uses so that we can attach to W3C sessions.

A temporary workaround is to use an old version of a client that doesn't use W3C

Hi, in which release or version can this bug be fixed?
It's still reproducing at 1.10

Appium-desktop Version 1.10.0.
Appium custom server version: 1.9.1
macOS High sierra 10.13.6
Jan 15 14:16:32 lmxmn150 com.apple.xpc.launchd[1] (io.appium.desktop.9084[56019]): Service exited with abnormal code: 1

Still reproduced when I choose an element.

@rcuyugan I'm working on updating the client that Appium Desktop uses so that we can attach to W3C sessions.
A temporary workaround is to use an old version of a client that doesn't use W3C

Hi, in which release or version can this bug be fixed?
It's still reproducing at 1.10

Jan 15 14:16:32 lmxmn150 com.apple.xpc.launchd[1] (io.appium.desktop.9084[56019]): Service exited with abnormal code: 1

Still reproduced when I choose an element.
Appium version: Version 1.10.0 (1.10.0.20181230.2)
macOS High sierra 10.13.6

When I use custom server(Appium 1.9.1), and appium-desktop 1.10,
This bug reproduced.

Please re-open the issue, we are still seeing this issue, appium desktop crashes when trying to select an element.

Appium version v1.10.0 and react-native version 0.59.8

Was this page helpful?
0 / 5 - 0 ratings