AWS Device Farm - Failed Boot When Using CLI
I am trying to upload an apk to a device farm using a bash script, I used a create-add endpoint to get a pre-signed url for a put request, and then I curl to PUT the apk to the endpoint.
RESPONSE=$(aws devicefarm create-upload --project-arn %deviceFarmProjectARN% --name platforms/android/build/outputs/apk/android-release-unsigned.apk --type ANDROID_APP --content-type application/octet-stream)
APK_ARN=$(echo "$RESPONSE" | grep arn:aws:devicefarm | gawk 'match($0, "(arn:aws:devicefarm(.*))\"", ary) {print ary[1]}')
APK_PUT_URL=$(echo "$RESPONSE" | gawk 'match($0, "\"url\": \"(.*)\"", ary) {print ary[1]}')
echo "$APK_ARN" >> apkARN.txt
curl $APK_PUT_URL -X PUT --upload-file platforms/android/build/outputs/apk/android-release-unsigned.apk -H "Content-Type:application/octet-stream"
The file upload seems to work, but when I check the status using the returned ARN, the status is not satisfied and the reason is "Invalid application loaded"
"upload": {
"status": "FAILED",
"contentType": "application/octet-stream",
"name": "platforms/android/build/outputs/apk/android-release-unsigned.apk",
"created": 1437582538.139,
"type": "ANDROID_APP",
"arn": "arn:aws:devicefarm:us-west-2:208791684493:upload:a9153182-8e03-4bc3-a5db-bc02034f1331/190ac7a5-bdc4-46f2-aac2-46bb994f2cf3",
"metadata": "{\"errorMessage\":\"Invalid application uploaded.\"}"
}
However, when I load the exact same file through the GUI, the application is fine in the web console and I can run tests against it.
+3
source to share