An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate. Original error spawn ENOTDIR
I am trying to start an android app using Appium Desktop app. Appium server shows the following error log;
Starting '/home/santoshpc/Android/Sdk/build-tools/28.0.3/apksigner' with args '["sign","--key","/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8","--cert","/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem","/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk"]' [ADB] Got an error during apksigner execution: Command '/home/santoshpc/Android/Sdk/build-tools/28.0.3/apksigner sign --key /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8 --cert /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' exited with code 1 [ADB] apksigner stderr: Exception in thread "main" java.nio.file.FileSystemException: /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk: Read-only file system [ADB] at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) [ADB] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) [ADB] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) [ADB] at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:447) [ADB] at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) [ADB] at java.nio.file.Files.move(Files.java:1395) [ADB] at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:342) [ADB] at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89) [ADB] [ADB] Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command '/home/santoshpc/Android/Sdk/build-tools/28.0.3/apksigner sign --key /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8 --cert /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/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_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk: Read-only file system [ADB] at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) [ADB] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) [ADB] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) [ADB] at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:447) [ADB] at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) [ADB] at java.nio.file.Files.move(Files.java:1395) [ADB] at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:342) [ADB] at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89) [ADB] [ADB] Resigning apk. [UiAutomator2] Deleting UiAutomator2 session [UiAutomator2] Deleting UiAutomator2 server session [WD Proxy] Matched '/' to command name 'deleteSession' [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 [ADB] Running '/home/santoshpc/Android/Sdk/platform-tools/adb -P 5037 -s 0123456789ABCDEF shell am force-stop eu.niko.smart.naswi.main' [Logcat] Stopping logcat capture [ADB] Removing forwarded port socket connection: 8200 [ADB] Running '/home/santoshpc/Android/Sdk/platform-tools/adb -P 5037 -s 0123456789ABCDEF forward --remove tcp:8200' [UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/home/santoshpc/Android/Sdk/platform-tools/adb -P 5037 -s 0123456789ABCDEF forward --remove tcp:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1'' [BaseDriver] Event 'newSessionStarted' logged at 1552282079530 (11:12:59 GMT+0545 (+0545)) [MJSONWP] Encountered internal error running command: Error: Could not sign with default certificate. Original error spawn ENOTDIR [MJSONWP] at ADB.apkSigningMethods.signWithDefaultCert (/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/apk-signing.js:124:13) [HTTP] <-- POST /wd/hub/session 500 9847 ms - 206 [HTTP] [HTTP] --> DELETE /wd/hub/session [HTTP] {} [HTTP] No route found. Setting content type to 'text/plain' [HTTP] <-- DELETE /wd/hub/session 404 5 ms - 57
I have added following DesiredCapabilities
{
"noReset": true,
"automationName": "uiautomator2",
"appPackage": "myapp package name",
"appActivity": "my app activity name",
"deviceName": "My device",
"platformName": "android"
}
Appium Desktop version: 1.11.1 OS - ubuntu