0

I'm having a problem using AWS Device Farm, but the problem is that Amazon is not very specific on what goes wrong.

After I created a new run and try to upload my apk file it shows this message before getting to finish the upload:

enter image description here

There was a problem uploading your file. Please try again.

There are no error codes. I have already tried several times using a signed app for debug and for release, but neither of them finishes the upload. Is this a temporal problem in Amazon cloud or it is a known error?

Camilo Ortegón
  • 3,414
  • 3
  • 26
  • 34

2 Answers2

0

I work for the AWS Device Farm team.

Sorry to hear that you are running in to issues.

  1. If it is the App that is giving you an error you should check if you are able to run the app locally on a real device. If yes, then this should be working on device farm. At times, app build for emulators/simulators are uploaded and can cause the error.

  2. If it is the test apk that you are uploading then the same thing as point 1 should be confirmed.

If both of the points above are true and you are still getting an error please start a thread on AWS Device Farm forums and we can take a closer look at your runs or you can share your run url here and we can take a look.

NikofTime
  • 729
  • 3
  • 4
0

Would it be possible to try and upload this file using the CLI[1]? The create-upload command will do the same thing the web console is doing and it can return more information than the web console.

aws devicefarm create-upload --project-arn <yourProjectsArn> --name <nameOfFile> --type <typeOfAppItIs> --region us-west-2 

This will return a upload-arn which you will need to use later so keep it handy. If you need a more verbosity on any of the CLI commands listed here you can use the --debug option.

The create-upload command will return a presigned-url which you can do a PUT command on.

curl:

curl -T someAppFileWithSameNameAsSpecifiedBefore "presigned-url"

Once you have the file now uploaded you can do a get-upload command to see the status of the upload and if there are any problems this will show why.

aws devicefarm get-upload --arn <uploadArnReturnToYouFromPreviousCommand> --region us-west-2

My output looks like this:

{
"upload": {
    "status": "SUCCEEDED",
    "name": "app-debug.apk",
    "created": 1500080938.105,
    "type": "ANDROID_APP",
    "arn": "arn:aws:devicefarm:us-west-2:<accountNum>:upload:<uploadArn>",
    "metadata": "{\"device_admin\":false,\"activity_name\":\"com.xamarin.simplecreditcardvalidator.MainActivity\",\"version_name\":\"1.1\",\"screens\":[\"small\",\"normal\",\"large\",\"xlarge\"],\"error_type\":null,\"sdk_version\":\"21\",\"package_name\":\"com.xamarin.simplecreditcardvalidator\",\"version_code\":\"2\",\"native_code\":[],\"target_sdk_version\":\"25\"}"
}}

Please let me know what this returns and I look forward to your response.

Best Regards

James

[1] http://docs.aws.amazon.com/cli/latest/reference/devicefarm/create-upload.html

Also used this article to learn how to do most of this: https://aws.amazon.com/blogs/mobile/get-started-with-the-aws-device-farm-cli-and-calabash-part-1-creating-a-device-farm-run-for-android-calabash-test-scripts/

jmp
  • 2,175
  • 2
  • 17
  • 16