Search code examples
androidaws-device-farm

AWS Device Farm: Signing error with app or tests - how to troubleshoot?


I'm trying to test a native Android app using AWS Device Farm

The job's status completes as "SKIPPED" and aws list-jobs returns the following error message for each device:

Signing error with app or tests. The service could not schedule the job as there was an error with re-signing the app or test package at our end.

There is a link to troubleshooting doc but it doesn't list this specific failure.

The output of aws get-run shows this

"resultCode": "PARSING_FAILED"

But again no specific error.

The apk is built with the default debug configuration, and is therefore signed with the default debug key (it builds on CI, so it's a new debug key every time, but that should not matter).

The error started after I've updated the app to compile against Android SDK 34 using build tools 34.

Another app which I've also updated to SDK / build tools 34 still runs on Device Farm just fine.

Does anyone have any suggestions on how to troubleshoot this?


Solution

  • Answering my own question

    It was caused by upgrading Kotlin and kotlinx-serialization

    A combination of Kotlin 1.8.10 and kotlinx-serialization 1.0.0-RC works

    A more recent version of either doesn't

    Turns out AWS Device Farm parses the binary code inside the test .apk to extact test names. For this they use a third party library that has not been updated in over two years, so it's somewhat not surprising that there are issues.