Skip to content

APK sign check does not work on Windows due to windowsVerbatimArguments #867

@ynerant

Description

@ynerant

Hello! I'm having trouble running Appium on my Windows computer. When I launch Appium to start an app, an error occurs while verifying the APK's signature:

Error: Could not find or load main class Files\Java\jdk-25.0.2\bin\java.exe

The full command was 'C:\Program Files\Java\jdk-25.0.2\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\XXX\AppData\Local\Android\Sdk\build-tools\36.1.0\lib\apksigner.jar verify --print-certs C:\Users\XXX\AppData\Local\Temp\ApiDemos-debug.apk, which works correctly when run on its own.

Afer some research, I found that the problem was caused by the windowsVerbatimArguments setting, which has been automatically set to true for the past four years on Windows: 926b598

I didn't understand this decision, removing the quotes causes issueswhen parsing the arguments, especially when the path to the binary contains spaces.

I think that the issue was not discovered before because the teen_process module supports the windowsVerbatimArguments only for one week:
appium/node-teen_process@7db347d#diff-915c0270f47fcb8047102dd461bb8aa59db3233ac9018c9f442262305e41b8cdR174

So, why is this setting automatically set to true by default in Windows? Shouldn't it be removed? If not, how can I properly resolve my issue without modifying the code?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions