android - AWS Device Farm - Failed upload when using the CLI -
i trying upload apk device farm using bash script, have used create-upload endpoint pre-signed url put request, , using curl put apk end point.
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 work, when check status using returned arn status failed, , reason "invalid application uploaded"
"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 upload same file through gui, on web console, application fine, , can run tests against it.
the upload name accepts word characters. upload failing because of forward slashes in name.
Comments
Post a Comment