Appium-desktop: Appium stuck at launching inspector

Created on 16 Mar 2018  Â·  5Comments  Â·  Source: appium/appium-desktop

Appium or Appium Desktop?

Appium Desktop

The problem

image

The screen is stuck launching the inspector. The app launched in the emulator and there is no activity in the console.

Console log -

[info] [Appium] Welcome to Appium v1.7.2
[info] [Appium] Non-default server args:
[info] [Appium]   port: 4724
[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4724[info] [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/sridhar.vadlamani/Documents/app.apk","appPackage":"com.dummy.mobile","deviceName":"Emulator","platformName":"Android","platformVersion":"8.1.0","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/sridhar.vadlamani/Documents/app.apk","appPackage":"com.dummy.mobile","deviceName":"Emulator","platformName":"Android","platformVersion":"8.1.0","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1521233689421 (13:54:49 GMT-0700 (PDT))
[info] [Appium] Creating new AndroidDriver (v1.37.0) session
[info] [Appium] Capabilities:
[info] [Appium]   app: /Users/sridhar.vadlamani/Documents/app.apk
[info] [Appium]   appPackage: com.dummy.mobile
[info] [Appium]   deviceName: Emulator
[info] [Appium]   platformName: Android
[info] [Appium]   platformVersion: 8.1.0
[info] [Appium]   newCommandTimeout: 0
[info] [Appium]   connectHardwareKeyboard: true
[warn] [BaseDriver] The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
[info] [BaseDriver] Session created with session id: e3ac809c-693c-40c7-8cf2-734074ecafe7
[debug] [AndroidDriver] Getting Java version
[info] [AndroidDriver] Java version is: 1.8.0_152
[info] [ADB] Checking whether adb is present
[info] [ADB] Using adb from /Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb
[info] [AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...[debug] [ADB] 1 device(s) connected
[info] [AndroidDriver] Looking for a device with Android '8.1.0'
[debug] [ADB] Setting device id to emulator-5554
[info] [ADB] Getting device platform version
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.release"]
[debug] [ADB] Current device property 'ro.build.version.release': 8.1.0
[info] [AndroidDriver] Using device: emulator-5554
[info] [ADB] Checking whether adb is present
[debug] [ADB] Setting device id to emulator-5554
[info] [BaseDriver] Using local app '/Users/sridhar.vadlamani/Documents/app.apk'
[debug] [AndroidDriver] Checking whether app is actually present
[info] [AndroidDriver] Starting Android session
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","wait-for-device"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","echo","ping"]
[warn] [AndroidDriver] setDeviceLanguageCountry requires language or country.
[warn] [AndroidDriver] Got language: 'undefined' and country: 'undefined'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","io.appium.settings"][debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.settings
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.settings"][info] [ADB] Checking whether aapt is present
[info] [ADB] Using aapt from /Users/sridhar.vadlamani/Library/Android/sdk/build-tools/27.0.1/aapt
[debug] [ADB] The installed 'io.appium.settings' package does not require upgrade (5 >= 5)
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.sdk"]
[debug] [ADB] Current device property 'ro.build.version.sdk': 27
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.settings"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","dump","io.appium.settings"][debug] [ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"][debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";"][debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-n","io.appium.settings/.Settings","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"][debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","appops","set","io.appium.settings","android:mock_location","allow"][debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","io.appium.unlock"][debug] [ADB] App is installed
[debug] [ADB] Getting package info for io.appium.unlock
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.unlock"]
[info] [ADB] Checking whether aapt is present
[debug] [ADB] The installed 'io.appium.unlock' package does not require upgrade (2 >= 2)
[info] [ADB] Getting device platform version
[debug] [ADB] Getting connected devices...[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.release"]
[debug] [ADB] Current device property 'ro.build.version.release': 8.1.0
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","wm","size"][debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.model"]
[debug] [ADB] Current device property 'ro.product.model': Android SDK built for x86
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.manufacturer"]
[debug] [ADB] Current device property 'ro.product.manufacturer': Google
[debug] [AndroidDriver] Parsing package and activity from app manifest
[info] [ADB] Checking whether aapt is present
[info] [ADB] Extracting package and launch activity from manifest
[debug] [ADB] badging package: com.dummy.mobile
[debug] [ADB] badging act: com.dummy.mobile.ui.WelcomeActivity
[debug] [AndroidDriver] Parsed package and activity are: com.dummy.mobile/com.dummy.mobile.ui.WelcomeActivity[info] [AndroidDriver] Remote apk path is /data/local/tmp/d6bb040f27b4a520571fd5114460ec62.apk
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ls","/data/local/tmp/d6bb040f27b4a520571fd5114460ec62.apk"]
[debug] [AndroidDriver] Checking if app is installed
[debug] [ADB] Getting install status for com.dummy.mobile
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","com.dummy.mobile"][debug] [ADB] App is installed
[info] [AndroidDriver] Apk is already on remote and installed, resetting
[debug] [AndroidDriver] Running fast reset (stop and clear)
[debug] [ADB] Getting connected devices...[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","am","force-stop","com.dummy.mobile"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","pm","clear","com.dummy.mobile"][debug] [AndroidDriver] Extracting strings from apk /Users/sridhar.vadlamani/Documents/app.apk undefined /var/folders/fs/353pb9ts1q3f4pf9vw60jxpxv4cmfs/T/com.dummy.mobile
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","persist.sys.locale"]
[debug] [ADB] Current device property 'persist.sys.locale': 
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.locale"]
[debug] [ADB] Current device property 'ro.product.locale': en-US[debug] [ADB] No strings.xml for language 'en', getting default strings.xml[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","push","/var/folders/fs/353pb9ts1q3f4pf9vw60jxpxv4cmfs/T/com.dummy.mobile/strings.json","/data/local/tmp"][debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","forward","tcp:4724","tcp:4724"]
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","push","/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-android-bootstrap/bootstrap/bin/AppiumBootstrap.jar","/data/local/tmp/"]
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[info] [ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.dummy.mobile","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false][debug] [UiAutomator] Moving to state 'online'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Loading json...
[info] [AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Getting connected devices...
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","window"]
[info] [AndroidDriver] Screen already unlocked, doing nothing
[debug] [ADB] Device API level: 27
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-n","com.dummy.mobile/com.dummy.mobile.ui.WelcomeActivity","-S"][debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'com.dummy.mobile' and activity: 'com.dummy.mobile.ui.WelcomeActivity' to be focused
[debug] [ADB] Possible activities, to be checked: 'com.dummy.mobile.ui.WelcomeActivity'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/sridhar.vadlamani/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","window","windows"]
[debug] [ADB] Found package: 'com.dummy.mobile' and fully qualified activity name : 'com.dummy.mobile.ui.WelcomeActivity'
[info] [Appium] New AndroidDriver session created successfully, session e3ac809c-693c-40c7-8cf2-734074ecafe7 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1521233699915 (13:54:59 GMT-0700 (PDT))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/Users/sridhar.vadlamani/Documents/app.apk","appPackage":"com.dummy.mobile","deviceName":"Emulator","platformName":"Android","platformVersion":"8.1.0","newCommandTimeout":0,"connectHardwareKeyboard":true},"app":"/Users/sridhar.vadlamani/Documents/app.apk","appPackage":"com.dummy.mobile","deviceName":"emulator-5554","platformName":"Android","platformVersion":"8.1.0","newCommandTimeout":0,"connectHardwareKeyboard":true,"deviceUDID":"emulator-5554","deviceScreenSize":"1440x2880","deviceModel":"Android SDK built for x86","deviceManufacturer":"Google","appWaitPackage":"com.dummy.mobile","appActivity":"com.dummy.mobile.ui.WelcomeActivity","appWaitActivity":"com.dummy.mobile.ui.WelcomeActivity"}
[info] [HTTP] <-- POST /wd/hub/session 200 10500 ms - 1012 

I tried re-installing, updating to latest version and updating appium to latest version.

Environment

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

    • [ âś”] Mac

    • [ ] Windows

    • [ ] Linux

Most helpful comment

Hey, @sridhar-vadlamani-ck - try adding waitForQuiescence=false (use as bool) to your capabilities. Fixed it for me. :)

All 5 comments

Same exact issue here.
Mac High Sierra 10.13.3
Appium Server 1.7.2
Appium Desktop 1.5.0 (1.5.0)

Interestingly, I am able to run successfully for Android with a physical device connected. I am unable to do the same with either an iOS device connected or with an iOS simulator. I do not currently have Droid emulators set up correctly so haven't tried that yet. On the physical iOS device, it installs the app and that's as far as it gets. On the iOS simulator, it installs the app and web driver, launches the app and then spins/freezes as described by the OP.

ONE time I was able to see the inspector but I've never been able to get it running successfully since.

Capabilities:
{
"platformName": "iOS",
"platformVersion": "11.2",
"deviceName": "iPhone 6",
"app": "/Users/mynamehere/Develop/git_repos/autom-ng1/apps/AppNameHere.app",
"automationName": "XCUITest"
}

So, in followup, this actually DOES run the Inspector. Unlike for Android, I just have to wait from 7-10 MINUTES for it to load. Crazy slow but it does eventually load up...

Hey, @sridhar-vadlamani-ck - try adding waitForQuiescence=false (use as bool) to your capabilities. Fixed it for me. :)

Thanks, I'll try that.

I am facing the same issue with the Android 9.0 and Appium v1.9.1

Getting the following error when trying to access the app running on android emulator.

Initially, it loads with the empty page and struck for some time

error

When I refresh the button on appium desktop, I am getting the app screenshot inside the appium desktop but getting the following error and couldn't inspect the element.

Could not obtain source: {"cause":{"sessionId":"62a3a01e-4dc7-4b8d-8ec6-73a786b6b745","status":13,"value":{"message":"An unknown server-side error occurred while processing the command."}},"jsonwire-error":{"detail":"An unknown server-side error occurred while processing the command.","status":13,"summary":"UnknownError"},"message":"[source()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command.","status":13}

Appium Desktop config
{
"platformName": "android",
"deviceName": "emulator-5554",
"app": "android/app/build/outputs/apk/debug/app-debug.apk",
"automationName": "androidTest",
"reset": "true"
}

Also I tried adding 'waitForQuiescence':false, but no luck

Was this page helpful?
0 / 5 - 0 ratings