Test Script failed in aws device farm

i am new to appium and AWS devicefarm, i created a java maven project in eclipse and write a sample scripting for my application testing. The Script written for my application works fine in my physical test mobile. and i created the zip file for the aws device farm using the below command

mvn clean package -DskipTests=true

and i uploaded the apk and zip file to the project i created in aws device farm but it failed i was getting the following error

i also tried the sample application provided by aws and it works fine in my aws,the sample i tried is from the below link https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app

The code i tried is given below

**base.java

package ********;

public class ****Base {
     protected AndroidDriver driver;
        protected WebDriverWait wait;

        //before Test Annotation makes a java function to run every time before a TestNG test case
        @BeforeTest
        protected void createAppiumDriver() throws MalformedURLException, InterruptedException {

              DesiredCapabilities capabilities = new DesiredCapabilities();

                //relative path to apk file
                final File classpathRoot = new File(System.getProperty("user.dir"));
                final File appDir = new File(classpathRoot, "src/test/resources/apps/");
                final File app = new File(appDir, "******.apk");

                driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);        
                driver.manage().timeouts().implicitlyWait(500, TimeUnit.SECONDS);
                WebDriverWait wait = new WebDriverWait(driver, 300);
                wait.until(ExpectedConditions.elementToBeClickable(By.className("android.widget.FrameLayout")));
        }

        //After Test Annotation makes a java function to run every time after a TestNG test case
        @AfterTest
        public void afterTest(){

        driver.quit();
        }

    }

Quickpay.java

public class QuickPay extends ******Base {

//Login Starts   

/*--------------------------Select the language and click on Login Starts-----------------*/    

                 //Select Language,click on login redirect to Login page
                 @Test
                 public void T1a_Landingpage() {
                     driver.findElement(By.xpath("//android.widget.EditText[contains(@resource-id,'ext-element-21')]")).click(); //Open drop down menu
                     driver.findElement(By.name("English")).click(); //Select from drop down
                     driver.findElement(By.xpath("//android.view.View[contains(@resource-id,'ext-element-26')]")).click();

                 }  

/*--------------------------Select the language and click on Login Ends--------------------*/

/*--------------------------------Login details page Starts---------------------------------*/  

                 //Click on Help content in Login page
                 @Test
                 public void T1b_HelpContent() {
                     driver.findElement(By.xpath("//android.view.View[contains(@resource-id,'fedhelpbtncontainer')]")).click();
                     driver.findElement(By.xpath("//android.view.View[@content-desc='OK']")).click();    
                 }


}

POM.xml

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd https://mvnrepository.com/artifact/io.appium/java-client">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.aws.appium</groupId>
  <artifactId>appium-android-test</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>ReferenceAppAppiumTests</name>
    <url>http://maven.apache.org</url>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>3.1.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.5.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <finalName>zip-with-dependencies</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Zip.xml

<assembly
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>zip</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}</directory>
      <outputDirectory>./</outputDirectory>
      <includes>
        <include>*.jar</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>${project.build.directory}</directory>
      <outputDirectory>./</outputDirectory>
      <includes>
        <include>/dependency-jars/</include>
      </includes>
    </fileSet>
  </fileSets>
</assembly>

please help !!!

Did you observe the recorded video if app is getting launched and there is an issue in locating or something else is the problem ?

in recorded video the App is getting launched but nothing will happening, after 15 min the teardown action happening.The application is still working fine in my physical device

I am also facing issues with test failures on AWS device farm. The test are unable to find the elements after waiting for elements to get displayed . Thought it works locally on emulator and actual physical device

Did you know that AWS Device Farm also has a forum. You may get an answer here, but I would encourage you to post there also as there may be more people familiar with this problem:

https://forums.aws.amazon.com/forum.jspa?forumID=193&start=0

Here is a search I did on that forum for the problem as you state it:
unable to find elements