awslabs / aws-device-farm-jenkins-plugin

Jenkins plugin for AWS Device Farm.
Apache License 2.0
89 stars 66 forks source link

Can not schedule "APPIUM_JAVA_JUNIT" #23

Closed martymarron closed 9 years ago

martymarron commented 9 years ago

AWS Device Farm Plugin Ver. 1.9 I' facing a issue when I create job to run "APPIUM_JAVA_JUNIT". When I execute job, I got error below:

[AWSDeviceFarm] Using App 'target/app/build/outputs/apk/app-debug.apk'
[AWSDeviceFarm] Archiving artifact 'app-debug.apk'
[AWSDeviceFarm] Uploading app-debug.apk to S3
[AWSDeviceFarm] Waiting for upload app-debug.apk to be ready (current status: INITIALIZED)
[AWSDeviceFarm] Getting test to schedule.
[AWSDeviceFarm] Archiving artifact 'zip-with-dependencies.zip'
[AWSDeviceFarm] Uploading zip-with-dependencies.zip to S3
[AWSDeviceFarm] Waiting for upload zip-with-dependencies.zip to be ready (current status: PROCESSING)
[AWSDeviceFarm] Scheduling 'APPIUM_JAVA_JUNIT' run 'app-debug.apk (Jenkins)'
ERROR: Build step failed with exception
com.amazonaws.services.devicefarm.model.ArgumentException: Missing or unprocessed resources. (Service: AWSDeviceFarm; Status Code: 400; Error Code: ArgumentException; Request ID: f3f7c36d-5d17-11e5-ab63-e3978af19c81)
    at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1182)
    at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:770)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
    at com.amazonaws.services.devicefarm.AWSDeviceFarmClient.invoke(AWSDeviceFarmClient.java:1524)
    at com.amazonaws.services.devicefarm.AWSDeviceFarmClient.scheduleRun(AWSDeviceFarmClient.java:1460)
    at org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarm.scheduleRun(AWSDeviceFarm.java:419)
    at org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmRecorder.perform(AWSDeviceFarmRecorder.java:283)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
    at hudson.model.Run.execute(Run.java:1766)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
Build step 'Run Tests on AWS Device Farm' marked build as failure
Finished: FAILURE

Can you look at this? Thanks.

anurag1408 commented 9 years ago

Hi MasashiKurita

I have few questions which would help us debug the problem 1) Do you see this problem only for appium java Junit ? Are you able to run fuzz tests on the same app through Jenkins 2) Can you give me the link to the run in the device farm console corresponding to the failed build ? This is how you can give it a) Locate corresponding run in the AWS device farm console 2) Click on the run 3) Copy the URL in the browser

martymarron commented 9 years ago

Hi anurag1408

Thanks for quick response.

1) Do you see this problem only for appium java Junit ? Are you able to run fuzz tests on the same app through Jenkins

Yes, only for appium java Junit. This does not happen on fuzz tests.

2) Can you give me the link to the run in the device farm console corresponding to the failed build ?

Actually, the corresponding run was not created, even the plugin log said "[AWSDeviceFarm] Scheduling 'APPIUM_JAVA_JUNIT' run 'app-debug.apk (Jenkins)'". For the reference, here is the link to run created by using same .apk and .zip manually in the console. https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/projects/91538a70-8028-4659-a6b9-312e5d241ad5/runs/77dd7a9a-3786-4faa-8436-17745b3e6ad0

Thanks for your help!

anurag1408 commented 9 years ago

Hi MasashiKurita

You said you cannot schedule run and at the same time you have pointed to the run in the console What is the issue you are facing. Are your test failing or you are not even able to schedule run through jenkins I checked the run you have given. You run and all the jobs have completed. You can also double check this through your console. But as per the error signature you gave, the run was never scheduled. is i am missing something here

Meanwhile we are releasing a new Jenkins build next week which is fixing some stability issues in Device Farm plugin. my suggestion is to try running tests with that build and see if it works

anurag1408 commented 9 years ago

The new aws-device-farm plugin (build 1.10) with the fixes will be available from tomorrow Can you try that plugin and check if you still face the same problem. I am closing this issue. Please reopen if you see any issues

martymarron commented 9 years ago

Hi @anurag1408

Thanks for your comments and sorry for late reply. I checked your comments due to private vacation.

It works well now even I'm still using aws-device-farm plugin (build 1.0).

You said you cannot schedule run and at the same time you have pointed to the run in the console What is the issue you are facing. Are your test failing or you are not even able to schedule run through jenkins

I faced problem I could not schedule a appium java JUnit run by using plugin. When it happen again, I will reopen this again.

Anyway, thank you for you support.