weixin_39847034
weixin_39847034
2021-01-08 13:07

I was not able to use UIAutomator2 i getting an error "An unknown server-side error ....\\appium-uiautomator2-server-debug-androidTest.apk --override' exited with code 1 (WARNING: The server did not provide any stacktrace information)"

Appium or Appium Desktop?

You are reporting an issue at the Appium Desktop repository. Appium Desktop is a wrapper around Appium. If you are having trouble running tests, it is much more likely that the problem you are encountering is not a problem with Appium Desktop but with Appium. For that reason we require you to have tried your testcase with Appium CLI before reporting issues. Check the checkbox below to confirm that you have proven your issue does not reproduce on Appium itself:

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

The problem

Replace this section with a description of your issue

Environment

  • I am running Appium Desktop version .
  • I am on (pick one):
    • [ ] Mac
    • [ ] Windows
    • [ ] Linux

该提问来源于开源项目:appium/appium-desktop

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

66条回答

  • weixin_39915078 weixin_39915078 4月前

    selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: this.adb.getApplicationInstallState is not a function; environment: Appium 1.10.1, run as admin desired_caps['automationName'] = 'uiautomator2' # if not config uiautomator2, the test script passed

    点赞 评论 复制链接分享
  • weixin_39531761 weixin_39531761 4月前

    I'm running in the AppImage and the apk can't be signed as it's in a read-only file system

    点赞 评论 复制链接分享
  • weixin_39914825 weixin_39914825 4月前

    This issue is still coming even on Appium 1.10.0. Script is working fine with uiautomator but getting unknown error as soon as I changed to uiautomator2.

    点赞 评论 复制链接分享
  • weixin_39524842 weixin_39524842 4月前

    I am getting this error using the appium-desktop-1.10.0-x86_64.AppImage on linux. I can run the inspector just fine but as soon as I try to run a test I get the error. Tried running it as root and checking the override session option too.

    点赞 评论 复制链接分享
  • weixin_39738251 weixin_39738251 4月前

    I tried every suggestion, finally launch appium

    Try installing the appium just for your user, npm you just do not pass the -g parameter. *In appium desk run as admin

    thank you! finally resolved!

    点赞 评论 复制链接分享
  • weixin_39953618 weixin_39953618 4月前

    Try installing the appium just for your user, npm you just do not pass the -g parameter. *In appium desk run as admin

    thank you! finally resolved!

    点赞 评论 复制链接分享
  • weixin_39541600 weixin_39541600 4月前

    I found something that works for me when this happens: From command prompt - run adb uninstall io.appium.settings adb uninstall io.appium.unlock

    Reinstall appium You may have to reinstall a couple of times.

    点赞 评论 复制链接分享
  • weixin_39917718 weixin_39917718 4月前

    I have faced same problem in Ubuntu. I have resolved it in following way. 1) start appium from appium desktop 2) Click on Search icon to open Desired Capabilities dialog 3) stop appium from appium desktop 4) start appium from terminal without using sudo (use 'appium' to run server)

    点赞 评论 复制链接分享
  • weixin_39668527 weixin_39668527 4月前

    I solved this issue by uninstalling the appium application in the emulator. Then just run again with { "deviceName": "emulator-5554", "platformName": "android", "noReset": true, "automationName": "UiAutomator2" .... } Then it worked fine

    点赞 评论 复制链接分享
  • weixin_39945679 weixin_39945679 4月前

    I solved the issue by starting Appium desktop as administrator: Right click the Appium icon on windows desktop,select “Run as administrator”

    my environment: OS:windows 10 Appium desktop:v1.13.0 android device:emulator

    Hope it helpful to others there~

    点赞 评论 复制链接分享
  • weixin_39904268 weixin_39904268 4月前

    I am still getting the Original error Command '/usr/java/j2sdk1.5.0/bin/java -jar /Users/sumanthvakacharla/.virtualenvs/SomeVirtualEnvironmentName-pip3/lib/node_modules/appium/node_modules/appium-adb/jars/sign.jar /Users/sumanthvakacharla/.virtualenvs/SomeVirtualEnvironmentName-pip3/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.5.5.apk --override' errored out: Error: spawn /usr/java/j2sdk1.5.0/bin/java ENOENT I assumed some JAVA_HOME is the cause of this. Unfortunately i tried several possibilities in setting my path and other combinations, Nothing really worked. Moreover My j2sdsk version is 1.8.0, But it is complaining 1.5.0 But i came to know it Happens with Command line Appium 1.17.0 and uiautomator2 (on Emulator) But it's working fine with Appium Desktop 1.17.0 and uiautomator2 (on Emulator) So, there is fault with command line Appium 1.17.0 for Android only

    Please provide an update on resolving the issue.

    点赞 评论 复制链接分享
  • weixin_39894473 weixin_39894473 4月前

    Hi all. I tried to set up automationName=UIAutomator1 explicitly within the tests and it helped.

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    You error: " ‘Security exception: Permission Denial: ... ". Look for the permission capability, the moment you start the Driver. Developer options too.

    点赞 评论 复制链接分享
  • weixin_39603397 weixin_39603397 4月前

    Downloaded the new desktop version today, but still the same bug :(

    点赞 评论 复制链接分享
  • weixin_39737240 weixin_39737240 4月前

    Faced with the same error: ...Could not sign with default certificate... for Android. And it's very strange because all was fine before today (during last 3 months), didn't change anything.

    Solution: Update to Appium version 1.9.0

    点赞 评论 复制链接分享
  • weixin_39956036 weixin_39956036 4月前

    i encountered the same problem: Could not sign with default certificate. with the Advanced-Allow session override selected, my problem solved. I cleaned %Temp% folder. i used this command: npm install appium-uiautomator2-driver I didn't reinstall the Appium I restarted the computer

    点赞 评论 复制链接分享
  • weixin_39603397 weixin_39603397 4月前

    I was able to find a work around for this issue I installed the console version of appium and ran it on port 4723.

    Then started the desktop version on port 4724 And then pointing a session to the console version by navigating to Custom and then inputting localhost as the host and 4723 as the port

    This just confirms that it's a desktop only issue. I hope they fix it.

    点赞 评论 复制链接分享
  • weixin_39967938 weixin_39967938 4月前

    Thank you for your reply, I don't know how to do it, Could you please let me know?

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Tip: When you make new AndroidDriver, every time after the test write this: driver.Quit (); // indifferent to language

    It starts giving trouble if you do not end the session.

    Do you use selenium? If yes recommend using 3.11.2.

    Capabilities exemplo:

    ` DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.BROWSER_NAME, ""); capabilities.setCapability("deviceName", "Redmi 1s"); capabilities.setCapability("platformVersion", "4.4.4"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability("autoGrantPermissions": True); capabilities.setCapability("appPackage", "com.zipgo.customer"); capabilities.setCapability("appActivity", "SplashActivity"); capabilities.setCapability( MobileCapabilityType.NEW_COMMAND_TIMEOUT, "100");

        driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
            capabilities);
    

    ` * the capacity pertaining to the permit is capabilities.setCapability ("autoGrantPermissions": True); look above

    点赞 评论 复制链接分享
  • weixin_39967938 weixin_39967938 4月前

    Thank you so much, I did this in my appium server, However, I don't know how to it on inteliJ but problem solved in connecting via Appium server. Thank you all.

    点赞 评论 复制链接分享
  • weixin_39778150 weixin_39778150 4月前

    Well, anyway, strange thing to recommend switching to UiAutomator2 if this takes so many confusion and problems, why not to include UiAutomator2 automatically by default if "Appium" is set in the capability? I mean automatically for devices higher than android 7. Each time I try to set UiAutomator2 it just crushes everything and there is still no 100% solution.

    I get the same error

    selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate. Original error spawn ENOTDIR

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    your problem when reporting capacity UiAutomator2? If so, tell me the version of Appium and Selenium you are using.

    点赞 评论 复制链接分享
  • weixin_39778150 weixin_39778150 4月前

    Hi, I use Appium Desktop 1.7.1, not sure about selenium as I just run latest available Appium Desktop version and nothing else.

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Last week I tried to use Appium desk 1.7.0 and 1.7.1, none of them worked properly UiAutomator2. To work it would have to use the Appium Beta, if I am not mistaken it is 1.9.2 .

    Good how I need Appium desk: I use version 1.6.3 will work correctly UiAutomator2

    点赞 评论 复制链接分享
  • weixin_39778150 weixin_39778150 4月前

    thanks for your response, I will try it, though I don't think that I strongly need this, but this message "Shift to UiAutomator2 as UiAutomator is no longer supported" worries me each time I see it :)

    点赞 评论 复制链接分享
  • weixin_39872395 weixin_39872395 4月前

    Hello, I'm facing the same issue. I'm running this on an Ubuntu machine. A stupid question (I'm new to Appium)- How do I edit the desired capabilities. I mean from where does the appium pick up all the desired capabilities by default?

    Thanks!

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Easier to tell your problem. There is an example of me showing how to set up desired capabilities. It depends on the capabilities of the default value.

    点赞 评论 复制链接分享
  • weixin_39872395 weixin_39872395 4月前

    I'm sorry, I didn't mention my problem correctly. The problem: I get 'cannot use apk signer tool for signing' error when i use 'uiautomator2' as automationName capability.

    [ADB] Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Could not find apksigner in /usr/lib/android-sdk/platform-tools/apksigner,/usr/lib/android-sdk/emulator/apksigner,/usr/lib/android-sdk/tools/apksigner,/usr/lib/android-sdk/tools/bin/apksigner,/usr/lib/android-sdk/build-tools/24.0.0/apksigner,/usr/lib/android-sdk/build-tools/debian/apksigner. Do you have the Android SDK installed at '/usr/lib/android-sdk'? [debug] [ADB] Resigning apk. [debug] [UiAutomator2] Deleting UiAutomator2 session [debug] [UiAutomator2] Deleting UiAutomator2 server session [debug] [JSONWP 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

    Also, If I have to edit the desired capabilities, which file should I edit these in? version: npm list -g appium-uiautomator2-driver /home/linuxbrew/.linuxbrew/lib └─┬ appium.9.1 └── appium-uiautomator2-driver.19.0

    I'm using an Ubuntu PC by the way. Thank you

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Looking at your logs, accredited your android sdk problem is related. Could not find apksigner in /usr/lib/android-sdk/platform-tools/apksigner,/usr/lib/android-sdk/emulator/apksigner,/usr/lib/android-sdk/tools/apksigner,/usr/lib/android-sdk/tools/bin/apksigner,/usr/lib/android-sdk/build-tools/24.0.0/apksigner,/usr/lib/android-sdk/build-tools/debian/apksigner. Do you have the Android SDK installed at '/usr/lib/android-sdk'? Verifica esse caminho, configura o path do android sdk (ANDROID_HOME).

    If it does not resolve, try to get Appium 1.9.2 beta by npm

    点赞 评论 复制链接分享
  • weixin_39805355 weixin_39805355 4月前

    Hi, I'm facing the same issue. I'm running this on an Ubuntu machine(18.04), Appium 1.9.0, Appium Desktop 1.8.2, Is there any solution?

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    If you use UiAutomator2, I recommend using Appium Desk 1.6.3. Npm you use Appium 1.8.1

    点赞 评论 复制链接分享
  • weixin_39805355 weixin_39805355 4月前

    it does not work, is there another way to solve the problem? this is my server log

    
    [info] [Appium] Welcome to Appium v1.9.1
    [info] [Appium] Non-default server args:
    [info] [Appium]   sessionOverride: true
    [info] [Appium]   relaxedSecurityEnabled: true
    [info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> POST /wd/hub/session
    [info] [HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:platformVersion":"5.0","appium:deviceName":"SA17806148","appium:appPackage":"com.android.settings","appium:appActivity":".Settings","appium:newCommandTimeout":"1000000","appium:automationName":"UiAutomator2"}},"desiredCapabilities":{"platformName":"Android","platformVersion":"5.0","deviceName":"SA17806148","appPackage":"com.android.settings","appActivity":".Settings","newCommandTimeout":"1000000","automationName":"UiAutomator2"}}
    [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"5.0","deviceName":"SA17806148","appPackage":"com.android.settings","appActivity":".Settings","newCommandTimeout":"1000000","automationName":"UiAutomator2"},null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:platformVersion":"5.0","appium:deviceName":"SA17806148","appium:appPackage":"com.android.settings","appium:appActivity":".Settings","appium:newCommandTimeout":"1000000","appium:automationName":"UiAutomator2"}}]
    [debug] [BaseDriver] Event 'newSessionRequested' logged at 1541640323455 (09:25:23 GMT+0800 (CST))
    [info] [Appium] Could not parse W3C capabilities: 'newCommandTimeout' must be of type number
    [info] [Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
    [warn] [BaseDriver] The capabilities ["platformVersion","deviceName","appPackage","appActivity","newCommandTimeout","automationName"] are not standard capabilities and should have an extension prefix
    [warn] [Appium] Could not parse fixed W3C capabilities: 'newCommandTimeout' must be of type number. Falling back to JSONWP protocol
    [info] [Appium] Creating new AndroidUiautomator2Driver (v1.19.0) session
    [info] [Appium] Capabilities:
    [info] [Appium]   platformName: Android
    [info] [Appium]   platformVersion: 5.0
    [info] [Appium]   deviceName: SA17806148
    [info] [Appium]   appPackage: com.android.settings
    [info] [Appium]   appActivity: .Settings
    [info] [Appium]   newCommandTimeout: 1000000
    [info] [Appium]   automationName: UiAutomator2
    [info] [Appium] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument
    [debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"platformName":"Android","...
    [warn] [BaseDriver] Capability 'newCommandTimeout' changed from string ('1000000') to integer (1000000). This may cause unexpected behavior
    [info] [BaseDriver] Session created with session id: 4a0e2b8a-7913-4f4e-a9f2-9a22aba2f5bc
    [info] [AndroidDriver] Java version is: 1.8.0_181
    [info] [ADB] Checking whether adb is present
    [info] [ADB] Found 2 'build-tools' folders under '/home/hezj/Software/AndroidStudio/SDK/' (newest first):
    [info] [ADB]     /home/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2
    [info] [ADB]     /home/hezj/Software/AndroidStudio/SDK/build-tools/27.0.3
    [info] [ADB] Using adb from /home/hezj/Software/AndroidStudio/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 '5.0'
    [debug] [ADB] Setting device id to SA17607795
    [info] [ADB] Getting device platform version
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.build.version.release'
    [debug] [ADB] Current device property 'ro.build.version.release': 5.0
    [info] [AndroidDriver] Using device: SA17607795
    [debug] [ADB] Setting device id to SA17607795
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.build.version.sdk'
    [debug] [ADB] Current device property 'ro.build.version.sdk': 21
    [debug] [ADB] Device API level: 21
    [warn] [AndroidDriver] No app sent in, not parsing package/activity
    [info] [ADB] Getting device platform version
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.build.version.release'[debug] [ADB] Current device property 'ro.build.version.release': 5.0
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell wm size'[debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell wm density'[debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.product.model'[debug] [ADB] Current device property 'ro.product.model': M5-53
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.product.manufacturer'
    [debug] [ADB] Current device property 'ro.product.manufacturer': alps
    [debug] [ADB] Device API level: 21
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell am force-stop io.appium.uiautomator2.server'[debug] [ADB] Checking app cert for /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk
    [info] [ADB] Using apksigner from /home/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2/apksigner
    [debug] [ADB] Starting '/home/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2/apksigner' with args '["verify","--print-certs","/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk"]'[debug] [ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
    [debug] [ADB] Signer #1 certificate SHA-256 digest: 707bc2493ea5b0267dc10a9bd4cedbab5431976f13274cdd045d93470179556d
    [debug] [ADB] Signer #1 certificate SHA-1 digest: b8db0b11cec13cc7574a7d62f383ec16c0d275ee
    [debug] [ADB] Signer #1 certificate MD5 digest: 4fcd3b10d1e80a20bbd28758c8a3e19b
    [debug] [ADB] WARNING: META-INF/INDEX.LIST not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    [debug] [ADB] WARNING: META-INF/io.netty.versions.properties not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
    [debug] [ADB] 
    [debug] [ADB] '/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk' is not signed with debug cert.
    [info] [ADB] Checking whether zipalign is present
    [info] [ADB] Using zipalign from /home/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2/zipalign[debug] [ADB] /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk' is already zip-aligned. Doing nothing
    [debug] [ADB] Signing '/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk' with default cert
    [debug] [ADB] Starting '/home/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2/apksigner' with args '["sign","--key","/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8","--cert","/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem","/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk"]'[warn] [ADB] Got an error during apksigner execution: Command '/home/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2/apksigner sign --key /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8 --cert /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk' exited with code 1
    [warn] [ADB] apksigner stderr: Exception in thread "main" java.nio.file.FileSystemException: /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.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/hezj/Software/AndroidStudio/SDK/build-tools/28.0.2/apksigner sign --key /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8 --cert /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk' exited with code 1; StdErr: Exception in thread "main" java.nio.file.FileSystemException: /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.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/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell am force-stop com.android.settings'[debug] [ADB] Removing forwarded port socket connection: 8200 
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 forward --remove tcp\:8200'
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 forward --remove tcp\:8200'
    [warn] [UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
    [debug] [BaseDriver] Event 'newSessionStarted' logged at 1541640327036 (09:25:27 GMT+0800 (CST))
    [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_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/jars/sign.jar /tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.18.0.apk --override' exited with code 1
    [debug] [MJSONWP]     at ADB.callee$0$0$ (/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/apk-signing.js:109:13)
    [debug] [MJSONWP]     at tryCatch (/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    [debug] [MJSONWP]     at GeneratorFunctionPrototype.invoke [as _invoke] (/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    [debug] [MJSONWP]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    [debug] [MJSONWP]     at GeneratorFunctionPrototype.invoke (/tmp/.mount_appiumhI2hjP/app/resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    [debug] [MJSONWP]     at run (/tmp/.mount_appiumhI2hjP/app/resources/app/webpack:/~/babel-polyfill/~/core-js/modules/es6.promise.js:75:1)
    [debug] [MJSONWP]     at /tmp/.mount_appiumhI2hjP/app/resources/app/webpack:/~/babel-polyfill/~/core-js/modules/es6.promise.js:92:1
    [debug] [MJSONWP]     at flush (/tmp/.mount_appiumhI2hjP/app/resources/app/webpack:/~/babel-polyfill/~/core-js/modules/_microtask.js:18:1)
    [debug] [MJSONWP]     at process._tickCallback (internal/process/next_tick.js:61:11)
    [info] [HTTP]  POST /wd/hub/session
    [info] [HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:platformVersion":"5.0","appium:deviceName":"SA17806148","appium:appPackage":"com.android.settings","appium:appActivity":".Settings","appium:newCommandTimeout":"1000000","appium:automationName":"UiAutomator2"}},"desiredCapabilities":{"platformName":"Android","platformVersion":"5.0","deviceName":"SA17806148","appPackage":"com.android.settings","appActivity":".Settings","newCommandTimeout":"1000000","automationName":"UiAutomator2"}}
    [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"5.0","deviceName":"SA17806148","appPackage":"com.android.settings","appActivity":".Settings","newCommandTimeout":"1000000","automationName":"UiAutomator2"},null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:platformVersion":"5.0","appium:deviceName":"SA17806148","appium:appPackage":"com.android.settings","appium:appActivity":".Settings","appium:newCommandTimeout":"1000000","appium:automationName":"UiAutomator2"}}]
    [debug] [BaseDriver] Event 'newSessionRequested' logged at 1541640327047 (09:25:27 GMT+0800 (CST))
    [info] [Appium] Could not parse W3C capabilities: 'newCommandTimeout' must be of type number
    [info] [Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
    [warn] [BaseDriver] The capabilities ["platformVersion","deviceName","appPackage","appActivity","newCommandTimeout","automationName"] are not standard capabilities and should have an extension prefix
    [warn] [Appium] Could not parse fixed W3C capabilities: 'newCommandTimeout' must be of type number. Falling back to JSONWP protocol
    [info] [Appium] Creating new AndroidUiautomator2Driver (v1.19.0) session
    [info] [Appium] Capabilities:
    [info] [Appium]   platformName: Android
    [info] [Appium]   platformVersion: 5.0
    [info] [Appium]   deviceName: SA17806148
    [info] [Appium]   appPackage: com.android.settings
    [info] [Appium]   appActivity: .Settings
    [info] [Appium]   newCommandTimeout: 1000000
    [info] [Appium]   automationName: UiAutomator2
    [info] [Appium] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument
    [debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"platformName":"Android","...
    [warn] [BaseDriver] Capability 'newCommandTimeout' changed from string ('1000000') to integer (1000000). This may cause unexpected behavior
    [info] [BaseDriver] Session created with session id: 757bb414-890c-4b34-bddd-8e156d5b285b
    [info] [AndroidDriver] Java version is: 1.8.0_181
    [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 '5.0'
    [debug] [ADB] Setting device id to SA17607795
    [info] [ADB] Getting device platform version
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.build.version.release'
    [debug] [ADB] Current device property 'ro.build.version.release': 5.0
    [info] [AndroidDriver] Using device: SA17607795
    [debug] [ADB] Setting device id to SA17607795
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.build.version.sdk'
    [debug] [ADB] Current device property 'ro.build.version.sdk': 21
    [debug] [ADB] Device API level: 21
    [warn] [AndroidDriver] No app sent in, not parsing package/activity
    [info] [ADB] Getting device platform version
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.build.version.release'
    [debug] [ADB] Current device property 'ro.build.version.release': 5.0
    [debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell wm size'[debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell wm density'[debug] [ADB] Running '/home/hezj/Software/AndroidStudio/SDK/platform-tools/adb -P 5037 -s SA17607795 shell getprop ro.product.model'[info] [HTTP] 
    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Try installing the appium just for your user, npm you just do not pass the -g parameter. *In appium desk run as admin

    点赞 评论 复制链接分享
  • weixin_39685024 weixin_39685024 4月前

    Let me know if this is still an issue and I'll re-open.

    点赞 评论 复制链接分享
  • weixin_39774445 weixin_39774445 4月前

    Just clean your %temp% folder and run it again. It worked for me.

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Hello, there are good news, what our friend said above probably solves too. For those who use Appium Desktop Before starting server, click options Advanced and checkbox mark Allow Session Override. I left two days running the automation and I had no problems. But I believe you should check for failure when unchecked option.

    点赞 评论 复制链接分享
  • weixin_39756273 weixin_39756273 4月前

    Hi guys,

    I tried the both approaches (clean temp folder and also advanced option for allowing session override) but unfortunately no one helped. The same error still occurs.

    点赞 评论 复制链接分享
  • weixin_39774445 weixin_39774445 4月前

    What is your java & Appium version? And also provide some logs. try this npm cache clean --force

    点赞 评论 复制链接分享
  • weixin_39756273 weixin_39756273 4月前

    Hi, I tried 'npm cache verif' - same story :/

    java version "1.8.0_151"

    [Appium] Welcome to Appium v1.8.1 [Appium] Non-default server args: [Appium] sessionOverride: true [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> GET /wd/hub/sessions [HTTP] {} [MJSONWP] Calling AppiumDriver.getSessions() with args: [] [MJSONWP] Responding to client with driver.getSessions() result: [] [HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40 [HTTP] [HTTP] --> GET /wd/hub/sessions [HTTP] {} [MJSONWP] Calling AppiumDriver.getSessions() with args: [] [MJSONWP] Responding to client with driver.getSessions() result: [] [HTTP] <-- GET /wd/hub/sessions 200 1 ms - 40 [HTTP] [HTTP] --> POST /wd/hub/session [HTTP] {"desiredCapabilities":{"app":"/Users/ekaterina/IdeaProjects/my-cars-mobile-automation-master/src/test/resources/archives/cars-android-1.1.3-dev.apk","automationName":"UiAutomator2","deviceName":"emulator-5554","platformName":"Android","newCommandTimeout":0,"connectHardwareKeyboard":true}} [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/ekaterina/IdeaProjects/my-community-mobile-automation-master/src/test/resources/archives/cars-android-1.1.3-dev.apk","automationName":"UiAutomator2","deviceName":"emulator-5554","platformName":"Android","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null] [BaseDriver] Event 'newSessionRequested' logged at 1533293418782 (13:50:18 GMT+0300 (EEST)) [Appium] Creating new AndroidUiautomator2Driver (v1.12.0) session [Appium] Capabilities: [Appium] app: /Users/ekaterina/IdeaProjects/my-community-mobile-automation-master/src/test/resources/archives/cars-android-1.1.3-dev.apk [Appium] automationName: UiAutomator2 [Appium] deviceName: emulator-5554 [Appium] platformName: Android [Appium] newCommandTimeout: 0 [Appium] connectHardwareKeyboard: true [BaseDriver] Creating session with MJSONWP desired capabilities: {"app":"/Users/ekaterina/Id... [BaseDriver] The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard. [BaseDriver] Session created with session id: ed6dc404-c6e0-43de-be98-75f97ae9e2b8 [BaseDriver] Using local app '/Users/ekaterina/IdeaProjects/my-community-mobile-automation-master/src/test/resources/archives/cars-android-1.1.3-dev.apk' [UiAutomator2] Checking whether app is actually present [AndroidDriver] Getting Java version [AndroidDriver] Java version is: 1.8.0_151 [ADB] Checking whether adb is present [ADB] Found 2 'build-tools' folders under '/Users/ekaterina/Library/Android/sdk' (newest first): [ADB] /Users/ekaterina/Library/Android/sdk/build-tools/27.0.1 [ADB] /Users/ekaterina/Library/Android/sdk/build-tools/26.0.2 [ADB] Using adb from /Users/ekaterina/Library/Android/sdk/platform-tools/adb [AndroidDriver] Retrieving device list [ADB] Trying to find a connected android device [ADB] Getting connected devices... [ADB] 1 device(s) connected [AndroidDriver] Using device: emulator-5554 [ADB] Setting device id to emulator-5554 [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' [ADB] Current device property 'ro.build.version.sdk': 27 [ADB] Device API level: 27 [AndroidDriver] Parsing package and activity from app manifest [ADB] Using apkanalyzer from /Users/ekaterina/Library/Android/sdk/tools/bin/apkanalyzer [ADB] Starting '/Users/ekaterina/Library/Android/sdk/tools/bin/apkanalyzer' with args ["-h","manifest","print","/Users/ekaterina/IdeaProjects/cars-mobile-automation-master/src/test/resources/archives/cars-android-1.1.3-dev.apk"] [ADB] Package name: 'bg.cars.app' [ADB] Main activity name: 'bg.cars.app.MainActivity' [AndroidDriver] Parsed package and activity are: bg.cars.app/bg.cars.app.MainActivity [ADB] Getting device platform version [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [ADB] Current device property 'ro.build.version.release': 8.1.0 [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell wm size' [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell wm density' [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.model' [ADB] Current device property 'ro.product.model': Android SDK built for x86 [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer' [ADB] Current device property 'ro.product.manufacturer': Google [ADB] Device API level: 27 [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server' [ADB] Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk [ADB] Using apksigner from /Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/apksigner [ADB] Starting '/Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/apksigner' with args 'verify,--print-certs,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' [ADB] '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' is not signed with debug cert. [ADB] Zip-aligning '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' [ADB] Checking whether zipalign is present [ADB] Using zipalign from /Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/zipalign [ADB] Signing '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' with default cert [ADB] Starting '/Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/apksigner' with args 'sign,--key,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8,--cert,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' [ADB] Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command '/Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/apksigner sign --key /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8 --cert /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' exited with code 1; StdErr: Exception in thread "main" java.nio.file.AccessDeniedException: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk [ADB] at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) [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:338) [ADB] at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89) [ADB] [ADB] Resigning apk. [UiAutomator2] Deleting UiAutomator2 session [UiAutomator2] Deleting UiAutomator2 server session [UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: Error: Trying to proxy a session command without session id [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop bg.cars.app' [ADB] Removing forwarded port socket connection: 8200 [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200' [ADB] Running '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200' [UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/Users/ekaterina/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1'' [BaseDriver] Event 'newSessionStarted' logged at 1533293421271 (13:50:21 GMT+0300 (EEST)) [MJSONWP] Encountered internal error running command: Error: Could not sign with default certificate. Original error Command '/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -jar /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/jars/sign.jar /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk --override' exited with code 1 [MJSONWP] at ADB.callee$0$0$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/apk-signing.js:79:13) [MJSONWP] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) [MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) [MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) [MJSONWP] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) [MJSONWP] at [HTTP] <-- POST /wd/hub/session 500 2491 ms - 569 [HTTP]

    点赞 评论 复制链接分享
  • weixin_39774445 weixin_39774445 4月前

    update your build tool to the 28.0.1 and try again. Your issue is the uiautomator2 server 1.12.0 is not signed.

    [ADB] Starting '/Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/apksigner' with args 'sign,--key,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8,--cert,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' [ADB] Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command '/Users/ekaterina/Library/Android/sdk/build-tools/27.0.1/apksigner sign --key /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8 --cert /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' exited with code 1; StdErr: Exception in thread "main" java.nio.file.AccessDeniedException: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk

    点赞 评论 复制链接分享
  • weixin_39756273 weixin_39756273 4月前

    My problem is resolved already and I think that the key was just to reinstall Appium.

    点赞 评论 复制链接分享
  • weixin_39603397 weixin_39603397 4月前

    I'm also having this issue, reinstalling didn't work, clearing temp folder either. Updating the tool, didn't help either.

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    You have tried: Before you start the server, click the Advanced options and check the Allow session override option. ?? Another thing, try to evaluate if this failure always occurs at the same point.

    点赞 评论 复制链接分享
  • weixin_39683144 weixin_39683144 4月前

    have the same problem. I just update the appium desktop to 1.6.3 (latest). I have used "allow session override". It is caused by "UiAutomator2". "Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error" Maybe is caused on windows 10 because of the rights of specific folder. Any news how can avoid this behavior on windows 10?

    点赞 评论 复制链接分享
  • weixin_39774445 weixin_39774445 4月前

    and
    What's the java version? I had the issue with java-10 I switch back to Java-8 with latest build tools

    点赞 评论 复制链接分享
  • weixin_39603397 weixin_39603397 4月前

    I'm using Java 8. Yes, tried that as well, and yes it happens at the same point with the same error I'm using linux mint

    点赞 评论 复制链接分享
  • weixin_39683144 weixin_39683144 4月前

    This error doesn't appears if i start appium form console with admin rights.

    点赞 评论 复制链接分享
  • weixin_39774445 weixin_39774445 4月前

    you can start the Appium desktop with admin rights to resolve the issue. Or you can change the default access for appium. As appium is installed in %AppData% folder. Give your self a write and read access

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    If it happens at the same point in the test script. Try changing the implementation of the code. Uses alternate tools. I've seen cases that some wait did not work correctly in Uiautomator2, but it worked fine in Uiautomator.

    Example that worked only in Uiautomator: return (AndroidElement) wait.Until (SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible (By.Id (text)).) FindElement (By.Id (text));

    Example that worked in UiAutomator2: wait.Until (SeleniumExtras.WaitHelpers.ExpectedConditions.VisibilityOfAllElementsLocatedBy (By.Id (text))); return driver.FindElement (By.Id (text));

    If it were random the fault your problem would not be this, but as it happens at the same point. Probably a snippet of code is not compatible.

    点赞 评论 复制链接分享
  • weixin_39603397 weixin_39603397 4月前

    the test doesn't even start. The apk doesn't even get launched.

    I tried to get it running with the UiAutomator2 driver by running it as root:

    gksudo ./appium-desktop-1.6.3-x86_64.AppImage

    Didn't help

    点赞 评论 复制链接分享
  • weixin_39603397 weixin_39603397 4月前

    Can also comfirm that the npm version of appium is working correctly, the problem is only situated in the desktop app. Sadly I really need the Inspector :s

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Very strange, I use desktop application. Which version of selenium do you use?

    点赞 评论 复制链接分享
  • weixin_39967938 weixin_39967938 4月前

    I'm also having this issue, reinstalling didn't work, clearing temp folder either. Appium 1.6.3 I can start session with Calculator from Android itself, but for my application I can not. I see this Error in appium server :

    Error: Cannot start the ‘com.isinolsun.app’ application. Original error: Error executing adbExec. Original error: ‘Command ‘C\:\Users\naser\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 0eebac319805 shell am start -W -n com.isinolsun.app/com.isinolsun.app.activities.OnBoarderActivity -S’ exited with code 4294967295′; Stderr: ‘Security exception: Permission Denial: starting Intent { flg=0x10000000 cmp=com.isinolsun.app/.activities.OnBoarderActivity } from null (pid=12948, uid=2000) not exported from uid 10139

    and in Appium Inspector session :

    ERROR An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.isinolsun.app' application. Original error: Error executing adbExec. Original error: 'Command 'C\:\Users\naser\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 0eebac319805 shell am start -W -n com.isinolsun.app/com.isinolsun.app.activities.OnBoarderActivity -S' exited with code 4294967295'; Stderr: 'Security exception: Permission Denial: starting Intent { flg=0x10000000 cmp=com.isinolsun.app/.activities.OnBoarderActivity } from null (pid=15981, uid=2000) not exported from uid 10139

    java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.isinolsun.app/.activities.OnBoarderActivity } from null (pid=15981, uid=2000) not exported from uid 10139 at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1641) at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:443) at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:283) at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:822) at com.android.server.am.ActivityManagerService.startActivityAndWait(ActivityManagerService.java:4744) at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:412) at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:141) at android.os.ShellCommand.exec(ShellCommand.java:96) at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:15186) at android.os.Binder.shellCommand(Binder.java:594) at android.os.Binder.onTransact(Binder.java:492) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4243) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2971) at android.os.Binder.execTransact(Binder.java:697)'; Code: '4294967295' please help me if you have any solution.

    点赞 评论 复制链接分享
  • weixin_39683144 weixin_39683144 4月前

    Hi, On windows 10 i have reinstall desktop appium (latest). This solved my problem (maybe is not a solution for linux). Also as i mentioned above the issue is not present if in window, I run appium .exe form a command line open with admin rights. My current user with which i i have installed appium initially had admin rights but for some reason appium was unable to override some file in Program Files.

    点赞 评论 复制链接分享
  • weixin_39685024 weixin_39685024 4月前

    I'll need more details.

    点赞 评论 复制链接分享
  • weixin_39850697 weixin_39850697 4月前

    I am also facing the same issue. Pls help!! I am using Appium 1.7.1 and robot framework in python. Since I was not able to locate some elements on Android v7 which is working with below v7 I installed uiautomator2. I changed the desiredcapability for opening app as follows,

    OpenApplication ${Appium_server} platformName=${Platform_name} platformVersion=${Platform_version} deviceName=${Device_names["${Platform_Version}"]} app=${file_path}/Resources/${Application_APK_name} appActivity=${Activity_name} appPackage=${Package_name} automationName=uiautomator2

    But it gave me error Error: Could not sign with default certificate. Original error Command '/usr/lib/jvm/java-8-oracle/bin/java -jar /usr/lib/node_modules/appium/node_modules/appium-adb/jars/sign.jar /usr/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk --override' exited with code 1 at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13) at ADB.callee$0$0$ (../../../lib/tools/apk-signing.js:25:9) at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at process._tickCallback (internal/process/next_tick.js:109:7)

    点赞 评论 复制链接分享
  • weixin_39823200 weixin_39823200 4月前

    Seeing similar with the Appium Desktop 1.2.6 AppImage:

    
    [debug] [ADB] Checking app cert for /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk.
    [debug] [ADB] App not signed with debug cert.
    [debug] [ADB] Resigning apk.
    [ADB] Error: Could not sign with default certificate. Original error Command '/usr/lib/jvm/default-java/bin/java -jar /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-adb/jars/sign.jar /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk --override' exited with code 1
    

    The failing command:

    console
    $ /usr/lib/jvm/default-java/bin/java -jar /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-adb/jars/sign.jar /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk --override
    Exception in thread "main" java.lang.RuntimeException: Unable to rename input apk. /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk
    

    Permissions within the AppImage mount:

    console
    $ namei -l /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk
    f: /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk
    drwxr-xr-x root root /
    drwxrwxrwt root root tmp
    dr-xr-xr-x root root .mount_J3Ub7u
    drwxrwxr-x root 2000 usr
    drwxrwxr-x root 2000 bin
    drwxr-xr-x root 2000 resources
    drwxrwxr-x root 2000 app
    drwxrwxr-x root 2000 node_modules
    drwxrwxr-x root 2000 appium
    drwxrwxr-x root 2000 node_modules
    drwxrwxr-x root 2000 appium-uiautomator2-driver
    drwxrwxr-x root 2000 uiautomator2
    -rw-r--r-- root 2000 appium-uiautomator2-server-v0.1.8.apk
    $ sudo chmod g+w /tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk
    chmod: cannot access '/tmp/.mount_J3Ub7u/usr/bin/resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.1.8.apk': Permission denied
    

    This problem doesn't happen when using "Custom Server" to connect to an external appium.7.1 instance instead.

    点赞 评论 复制链接分享
  • weixin_39915700 weixin_39915700 4月前

    Same problem with me

    here is my config

    Appium - 1.7.1 Android 7.0

    I am using uiautomator2

    npm list -g appium-uiautomator2-driver /usr/local/lib ├─┬ appium.7.1 │ └── appium-uiautomator2-driver.6.5 └── appium-uiautomator2-driver.7.3

    And here is my log on gist https://gist.github.com/arjunbm13/7ceeb043487c59035c4c6eb8d8470788

    点赞 评论 复制链接分享
  • weixin_39834488 weixin_39834488 4月前

    Hi all, I am facing the same uiautomator2 issue while running on Linux (ubuntu 17.10):

    ERROR: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate. Original error Command '/usr/lib/jvm/java-8-oracle/bin/java -jar /usr/local/lib/node_modules/appium/node_modules/appium-adb/jars/sign.jar /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/uiautomator2/appium-uiautomator2-server-v0.2.0.apk --override' exited with code 1

    Any idea how to fix/workaround this blocker?

    点赞 评论 复制链接分享
  • weixin_39850697 weixin_39850697 4月前

    -letgo I was also getting the same error. It was because of a bug in the "apk-signing.js" file residing in location "/usr/lib/node_modules/appium/node_modules/appium-adb/build/lib/tools" Please chk below links for editing the file and for more details.

    https://github.com/appium/appium/issues/8751

    https://discuss.appium.io/t/appium-1-7-1-canot-singin-appium-uiautomator2-server-debug-androidtest-apk/19233/4

    点赞 评论 复制链接分享
  • weixin_39966053 weixin_39966053 4月前

    I met same problem with my first try of appium. But it works after removing ""automationName": "UiAutomator2"" from capabilities. Try to use "Appium (default)", see if it helps.

    点赞 评论 复制链接分享
  • weixin_39685024 weixin_39685024 4月前

    Closing this. If this is still an issue for anyone on the newest version of Appium Desktop I'll re-open.

    点赞 评论 复制链接分享
  • weixin_39581845 weixin_39581845 4月前

    I am still facing the issue with - Appium-uiautomator2-server-v1.9.1.apk file doesn't exist with appium desktop version 1.6.2 which has appium 1.8.1. Please suggest i am not able to proceed with uiautomator2, but removing it works fine

    点赞 评论 复制链接分享
  • weixin_39773215 weixin_39773215 4月前

    i am seeing this issue with latest appium desktop. please reopen this issue

    点赞 评论 复制链接分享
  • weixin_39756273 weixin_39756273 4月前

    Today I faced the same issue: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk --override' exited with code 1

    点赞 评论 复制链接分享
  • weixin_39709979 weixin_39709979 4月前

    Hi, Searching on google saw many people with same problem recently, I'm having the same problem. I would like to help in finding solution for UiAutomator2. My last alternative was to update sdk to version 7. I'll be picking up to let you know.

    点赞 评论 复制链接分享