How to fix timeouts from MainActivity while triggering my react-native app via RobotFramework and Appium

Viewed 317

I've set up some basic automated testing environment, using tools like RobotFramework (RF), Appium, Android Emulator (via Android Studio).

In my case, I have a demo.robot script, where in that, i call my app to start and test if things exists or happens.

My application, is build via expo.io. The problem is that when I start the app in my emulator using RF, it hangs and I get the following error message:

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.<domain_name>.<app_name>' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\developer1\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.<domain_name>.<app_name>/host.exp.exponent.MainActivity -S' timed out after 60000ms'. Try to increase the 60000ms adb execution timeout represented by 'adbExecTimeout' capability

For my app, I tried to increase adbExecTimeout up to 5 minutes (that I find quite needless but still I did) and I had no luck.

I also tried to trigger with the same way other apps, build in apps like Dialer, apps that I installed like calculator, apps build via Android Studio like the example MyFirstApp that Android Studio guide has, and those are all worked just fine.

The robot script looks like:

*** Settings ***

Library  AppiumLibrary

Documentation  Demo for appium library

*** Test Cases ***  
Test My App
    Open Application  http://localhost:4723/wd/hub
    ...  platformName=Android
    ...  platformVersion=8.0.0
    ...  deviceName=emulator-5554
    ...  automationName=appium
    ...  app=com.<domaim_name>.<app_name>
    ...  appPackage=com.<domaim_name>.<app_name>
    ...  appActivity=host.exp.exponent.MainActivity
    ...  adbExecTimeout=60000

    Wait Until Page Contains  Password  10

where appActivity: host.exp.exponent.MainActivity is found via:

adb shell dumpsys window windows | grep mFocusedApp

and having my app running and open in my emulator

If its any help, I can see that my app has 2 android.intent.action.MAIN

adb shell pm dump com.<domaim_name>.<app_name> | grep -A 1 MAIN
        android.intent.action.MAIN:
          9535b09 com.<domaim_name>.<app_name>/host.exp.exponent.MainActivity filter 38ddb4e
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.LAUNCHER"
--
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.LEANBACK_LAUNCHER"

while e.g. android dialer (and all the others I tried) has just one like:

adb shell pm dump  com.google.android.dialer | grep -A1 MAIN
        android.intent.action.MAIN:
          a5f0def com.google.android.dialer/.extensions.GoogleDialtactsActivity filter 7f80bcc
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.DEFAULT"

Any help would be really appreciated

0 Answers
Related