Appium-desktop: Appium desktop don't open inspector.

Created on 4 Nov 2018  路  17Comments  路  Source: appium/appium-desktop

The problem

Appium desktop don't open inspector.

Environment

  • Appium version (or git revision) that exhibits the issue: Appium v1.9.1 (appium-desktop-1.7.1-x86_64.AppImage)
  • Desktop OS/version used to run Appium: 16.04.1-Ubuntu x86_64
  • Node.js version (unless using Appium.app|exe): v11.0.0
  • Mobile platform/version under test: Android 6.
  • Real device or emulator/simulator: Android emulator version 27.3.10.0 (build_id 4969155)
  • Appium CLI or Appium.app|exe:
  • Java: java version "1.8.0_152" / Java(TM) SE Runtime Environment (build 1.8.0_152-b16) / Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

Details

Using the following capabilities don't work:

{
"platformName": "Android",
"platformVersion": "6",
"deviceName": "emulator-5554",
"appPackage": "my.app.id",
"noReset": true,
"automationName": "UiAutomator2",
"appActivity": "path.to.my.StartupActivity"
}

Link to Appium logs

https://gist.github.com/jaelsonwagner/972f2adcfeafe3f4c3a34aa1dfe1571a

P0 bug

Most helpful comment

I'm facing the same issue here! Please help us!!!!

All 17 comments

[ADB] apksigner stderr: Exception in thread "main" java.nio.file.FileSystemException: /tmp/.mount_appiumNMDj4E/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk: Read-only file system

On Mac OS such problems are usually getting fixed by installing the app into Applications folder, so its temporary folders are writeable.

Hi @mykola-mokhnach, in my case I'm using Linux and I'm running the appium desktop from a sub directory in my home directory (~).
-rwxr-xr-x 1 jaelson domain^users 139696774 Out 17 20:44 appium-desktop-1.7.1-x86_64.AppImage*
Thanks.

@mykola-mokhnach, even setting a new temp directory for Appium, by setting the option "override temp path" in "Advanced" tab, don't work. Or even, running Appium as sudo, don't work.

[Appium] Welcome to Appium v1.9.1
[Appium] Non-default server args:
[Appium] log: /home/user/temp
[Appium] tmpDir: /home/user/temp
[Appium] Appium REST http interface listener started on 0.0.0.0:4723

I'm facing the same issue here! Please help us!!!!

I'll look into this. As a workaround, run Appium from terminal and run sessions using Custom Server.

@dpgraham, I'm already doing that.
Thanks!

Is someone able to help me reproduce this? Do I need to run this on Linux?

@dpgraham I have encountered this issue while running tests on Ubuntu. Steps to reproduce this issue.
1)Switch to Ubuntu (I use 18.04)
2)Download latest Appium desktop App Image(I am using 1.8.2)
3)Open terminal
4)sudo ./appium-desktop-1.8.2-x86_64.AppImage

Has anyone tried 1.10 yet? It uses a new version of our electron packager.

Sorry, I meant to say Appium Desktop 1.9.0, which uses Appium 1.10

Tested it on Appium Desktop 1.9.1 which uses 1.10 on Ubuntu 18.04. Getting the same error.

[info] [Appium] Welcome to Appium v1.10.0
[info] [Appium] Non-default server args:
[info] [Appium]   address: 127.0.0.1
[info] [Appium] Appium REST http interface listener started on 127.0.0.1:4723[info] [HTTP] --> GET /wd/hub/sessions
[info] [HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getSessions() with args: []
[debug] [GENERIC] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 8 ms - 40
[info] [HTTP] [info] [HTTP] --> POST /wd/hub/session
[info] [HTTP] {"desiredCapabilities":{"appActivity":"com.myapp.SplashScreen","appPackage":"com.myapp","automationName":"UiAutomator2","deviceName":"AndroidEmulator","platformName":"Android","version":"7.0","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.myapp.SplashScreen","appPackage":"com.myapp","automationName":"UiAutomator2","deviceName":"AndroidEmulator","platformName":"Android","version":"7.0","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1546334755670 (14:55:55 GMT+0530 (IST))
[info] [Appium] Creating new AndroidUiautomator2Driver (v1.24.0) session
[info] [Appium] Capabilities:
[info] [Appium]   appActivity: com.myapp.SplashScreen
[info] [Appium]   appPackage: com.myapp
[info] [Appium]   automationName: UiAutomator2
[info] [Appium]   deviceName: AndroidEmulator
[info] [Appium]   platformName: Android
[info] [Appium]   version: 7.0
[info] [Appium]   newCommandTimeout: 0
[info] [Appium]   connectHardwareKeyboard: true
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"appActivity":"com.wishboo...
[warn] [BaseDriver] The following capabilities were provided, but are not recognized by appium: version, connectHardwareKeyboard.
[info] [BaseDriver] Session created with session id: ebc9f365-91f3-4fb5-95ee-8bedd9dd5de8[info] [AndroidDriver] Java version is: 1.8.0_171
[info] [ADB] Checking whether adb is present
[info] [ADB] Found 4 'build-tools' folders under '/home/tester/Android/' (newest first):
[info] [ADB]     /home/tester/Android/build-tools/28.0.2
[info] [ADB]     /home/tester/Android/build-tools/28.0.0
[info] [ADB]     /home/tester/Android/build-tools/27.0.3
[info] [ADB]     /home/tester/Android/build-tools/25.0.2
[info] [ADB] Using adb from /home/tester/Android/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] Using device: 3300d64127ec6317
[debug] [ADB] Setting device id to 3300d64127ec6317
[debug] [ADB] Running '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 shell getprop ro.build.version.sdk'[debug] [ADB] Current device property 'ro.build.version.sdk': 24
[debug] [ADB] Device API level: 24
[warn] [AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 shell ps'[debug] [ADB] Running '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 shell am force-stop io.appium.uiautomator2.server'[debug] [ADB] Checking app cert for /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v2.8.0.apk
[info] [ADB] Using apksigner from /home/tester/Android/build-tools/28.0.2/apksigner
[debug] [ADB] Starting '/home/tester/Android/build-tools/28.0.2/apksigner' with args '["verify","--print-certs","/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v2.8.0.apk"]'[debug] [ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] '/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v2.8.0.apk' is already signed.
[debug] [ADB] Checking app cert for /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting '/home/tester/Android/build-tools/28.0.2/apksigner' with args '["verify","--print-certs","/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk"]'[debug] [ADB] apksigner stdout: Signer #1 certificate DN: CN=Android Debug, O=Android, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: 3e4f2ab66d641bbbd363421151755f8b12b66ea37a5db43c52116596b7392a8e
[debug] [ADB] Signer #1 certificate SHA-1 digest: e24fc8971c0aad07d1df6cc62af7fb0d48b45b60
[debug] [ADB] Signer #1 certificate MD5 digest: 5623d53469c7f7147b52ace9d09901eb
[debug] [ADB] 
[debug] [ADB] '/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with non-default certificate
[info] [ADB] Checking whether zipalign is present
[info] [ADB] Using zipalign from /home/tester/Android/build-tools/28.0.2/zipalign[debug] [ADB] /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is already zip-aligned. Doing nothing
[debug] [ADB] Signing '/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' with default cert
[debug] [ADB] Starting '/home/tester/Android/build-tools/28.0.2/apksigner' with args '["sign","--key","/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/keys/testkey.pk8","--cert","/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/keys/testkey.x509.pem","/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk"]'[warn] [ADB] Got an error during apksigner execution: Command '/home/tester/Android/build-tools/28.0.2/apksigner sign --key /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/keys/testkey.pk8 --cert /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/keys/testkey.x509.pem /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' exited with code 1
[warn] [ADB] apksigner stderr: Exception in thread "main" java.nio.file.FileSystemException: /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk: Read-only file system
[warn] [ADB]  at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
[warn] [ADB]  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
[warn] [ADB]  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
[warn] [ADB]  at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:447)
[warn] [ADB]  at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
[warn] [ADB]  at java.nio.file.Files.move(Files.java:1395)
[warn] [ADB]  at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:342)
[warn] [ADB]  at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
[warn] [ADB] 
[warn] [ADB] Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command '/home/tester/Android/build-tools/28.0.2/apksigner sign --key /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/keys/testkey.pk8 --cert /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/keys/testkey.x509.pem /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' exited with code 1; StdErr: Exception in thread "main" java.nio.file.FileSystemException: /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk: Read-only file system
[warn] [ADB]  at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
[warn] [ADB]  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
[warn] [ADB]  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
[warn] [ADB]  at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:447)
[warn] [ADB]  at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
[warn] [ADB]  at java.nio.file.Files.move(Files.java:1395)
[warn] [ADB]  at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:342)
[warn] [ADB]  at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
[warn] [ADB] 
[debug] [ADB] Resigning apk.[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [JSONWP Proxy] Matched '/' to command name 'deleteSession'
[warn] [UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[debug] [ADB] Running '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 shell am force-stop com.myapp'[debug] [ADB] Removing forwarded port socket connection: 8200 
[debug] [ADB] Running '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 forward --remove tcp\:8200'
[debug] [ADB] Running '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 forward --remove tcp\:8200'
[warn] [UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/home/tester/Android/platform-tools/adb -P 5037 -s 3300d64127ec6317 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
[debug] [ADB] Device API level: 24
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1546334765735 (14:56:05 GMT+0530 (IST))
[debug] [MJSONWP] Encountered internal error running command: Error: Could not sign with default certificate. Original error Command '/usr/lib/jvm/java-8-oracle/bin/java -jar /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/jars/sign.jar /tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk --override' exited with code 1
[debug] [MJSONWP]     at ADB.apkSigningMethods.signWithDefaultCert (/tmp/.mount_appiumuClWEj/resources/app/node_modules/appium-adb/lib/tools/apk-signing.js:124:13)
[info] [HTTP] <-- POST /wd/hub/session 500 10086 ms - 483
[info] [HTTP] [info] [HTTP] --> DELETE /wd/hub/session
[info] [HTTP] {}
[debug] [HTTP] No route found. Setting content type to 'text/plain'
[info] [HTTP] <-- DELETE /wd/hub/session 404 5 ms - 57
[info] [HTTP] 

Just in case if this helps to someone. This issue seems to be happening when using the uiautomator2 as the automation name for android. Since the issue is with Appium desktop version, i tried to run the appium installed from npm from the command prompt and opened the appium desktop just to open the appium inspector which worked.

Has anyone tried 1.10 yet? It uses a new version of our electron packager.

Yes 谋'm trying it on 1.10 but problem is still unsolved.

Any update on this issue? Still getting it with Appium-Desktop 1.13.0

Just in case if this helps to someone. This issue seems to be happening when using the uiautomator2 as the automation name for android. Since the issue is with Appium desktop version, i tried to run the appium installed from npm from the command prompt and opened the appium desktop just to open the appium inspector which worked.

okay, how can i open appium inspector from command prompt?

@AndrewElfimov what I did to accomplish this was:

  1. start the Appium server via the desktop application.
  2. Then start inspector session
  3. Stop desktop Appium server
  4. Start Appium server from Terminal
  5. Set desired capabilities
  6. Start session

This got me past the splashscreen and finally to my MainActivity so I can start reviewing elements.

Hope that helps if it's not too late for you.

That helped me @lefty1975 - thank you!

Was this page helpful?
0 / 5 - 0 ratings