Timed Out on Virtual Device Testing for Android

Starting to use this configuration:

- virtual-device-testing-for-android:
        inputs:
        - test_type: instrumentation
        - test_apk_path: "$STARK_ANDROID_TEST_APK"
        - test_devices: Nexus6,23,en,portrait

But it timed out after running a couple tests, here’s the bitrise step log:

+------------------------------------------------------------------------------+

| (6) virtual-device-testing-for-android                                       |
+------------------------------------------------------------------------------+
| id: virtual-device-testing-for-android                                       |
| version: 0.9.7                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-10-18T19:44:23Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[19:44:23] Start installing (golang) with apt-get       
INFO[19:44:23]  * [OK] Step dependency (go) installed, available. 
Configs:
- ApkPath: /bitrise/deploy/app-staging-debug.apk
- TestTimeout: 900
- DirectoriesToPull: 
- EnvironmentVariables: 
- TestDevices:
---
Model    API Level   Locale     Orientation   
Nexus6   23          portrait   en            
---
- AppPackageID: 
- TestType: instrumentation
- TestApkPath: /bitrise/deploy/app-staging-debug-androidTest.apk
- InstTestPackageID: 
- InstTestRunnerClass: 
- InstTestTargets: 
Upload APKs
=> APKs uploaded
Start test
=> Test started
Waiting for test results
- Validating
- (1/1) running
- (0/1) running
=> Test finished
Test results:
Model    API Level   Locale   Orientation   Outcome                        
Nexus6   23          en       portrait      failure(TimedOut)   
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | virtual-device-testing-for-android (exit code: 1)             | 20.9 min |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...se-steplib/steps-virtual-device-testing-for-android/issues |
| Source: ...thub.com/bitrise-steplib/steps-virtual-device-testing-for-android |
+---+---------------------------------------------------------------+----------+

And extract of the device console log:

10-18 15:46:56.776: I/TestRunner(5683): finished: testMapVenues(com.jomo.android.service.EventServiceTest)
10-18 15:46:56.777: I/MonitoringInstrumentation(5683): Activities that are still in CREATED to STOPPED: 0
10-18 15:46:56.778: I/TestRunner(5683): started: testLoadTags(com.jomo.android.service.TagServiceTest)
10-18 15:46:56.778: I/MonitoringInstrumentation(5683): Activities that are still in CREATED to STOPPED: 0
10-18 15:46:56.816: I/TestRunner(5683): finished: testLoadTags(com.jomo.android.service.TagServiceTest)
10-18 15:46:56.816: I/MonitoringInstrumentation(5683): Activities that are still in CREATED to STOPPED: 0
10-18 15:46:56.816: I/TestRunner(5683): started: useAppContext(com.jomo.android.utils.ExampleInstrumentedTest)
10-18 15:46:56.817: I/MonitoringInstrumentation(5683): Activities that are still in CREATED to STOPPED: 0
10-18 15:46:56.817: I/TestRunner(5683): finished: useAppContext(com.jomo.android.utils.ExampleInstrumentedTest)
10-18 15:46:56.817: I/MonitoringInstrumentation(5683): Activities that are still in CREATED to STOPPED: 0
10-18 15:46:56.817: I/TestRunner(5683): started: testReverseGeoCode(com.jomo.android.utils.LocationUtilTest)
10-18 15:46:56.818: I/MonitoringInstrumentation(5683): Activities that are still in CREATED to STOPPED: 0
10-18 15:46:56.840: W/GLSUser(2305): [DeviceKeyStore] Cannot load key: Device key file not found.
10-18 15:46:56.841: W/GLSUser(2305): [DeviceKeyStore] Cannot load key: Device key file not found.
10-18 15:46:56.860: W/Conscrypt(2305): Could not set socket write timeout:
10-18 15:46:56.860: W/Conscrypt(2305):    java.lang.reflect.Method.invoke(Native Method)
10-18 15:46:56.860: W/Conscrypt(2305):    com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11519470:13)
10-18 15:46:56.867: W/Conscrypt(2305): Could not set socket write timeout:
10-18 15:46:56.867: W/Conscrypt(2305):    java.lang.reflect.Method.invoke(Native Method)
10-18 15:46:56.867: W/Conscrypt(2305):    com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11519470:13)
1

Does the emulator support google apis? Since the affecting test is using Google Play Services to reverse-geocode a location.

1 Like

Hi @jomoapp,

Thanks for creating this report! :slight_smile:

Does a rebuild help or does it happen every time?
Does using another device or android version helps?

Thanks Viktor,

Appreciate your suggestions but none of those help. I think it’s the Conscrypt error that’s causing the hang/timeout. I commented out that only test and the other tests would continue to run.

We’ll try to debug this ASAP!

Just one more thing, just to be sure can you please copy paste the build’s bitrise.io URL? We’d like to check the full logs & the build’s config if possible.

In the meantime you might want to test something like Firebase Test Lab with Real Devices - you can find a #how-to tutorial at How-to run Android tests on Firebase TestLab

Thanks Viktor,

The link is https://www.bitrise.io/build/60384a396d35de9a

Appreciate it

Thanks, we’ll try to look into it ASAP! :slight_smile:

1 Like

Hey @jomoapp!

I couldn’t find any info about the emulators if they have google apis or not. What I am sure is that in Android SDK Nexus5X has marketplace and so, maybe it is worth to try it on firebase also. Furthermore I suggest you to contact Firebase straight in their open slack channel, from there you must get the fastest response.

1 Like