VMServiceFlutterDriver problem

The workflow I’ve created for flutter integration tests does not seem to run 95% of the time.
It hangs while showing this message.

I’ve tried changing the tests themselves and also changing the flutter drive command to include --debug but nothing seems to work.

I am using the android emulator.

Test call:

flutter drive --driver=test_driver/integration_test_driver.dart --target=integration_test/test.dart --flavor=development --debug 

Error Messasge:

VMServiceFlutterDriver: Flutter Driver extension is taking a long time to become available. Ensure your test app (often "lib/main.dart") imports "package:flutter_driver/driver_extension.dart" and calls enableFlutterDriverExtension() as the first call in main().```

Hello there @esther.kim.dd :wave:

Can you please send us the log file or the URL of the related build and also enable Support Access on the Settings tab of the app ( Enabling the Bitrise Support user for your app | Bitrise DevCenter ) so that we can take a more in-depth look? :slight_smile:

What was the solution to this? As we are facing the exact same problem.

Hello @seanconnolly :wave:

Could you also please share your build’s URL link and enable Support Access? We’ll check it out and try to see what could be the reason behind this issue :slightly_smiling_face:

Here is an example build URL: https://app.bitrise.io/build/da1ddbc3-7b44-4946-80f8-c0e8117f7dd5#?tab=log

I also enabled support access.

Hey there @seanconnolly :wave:

I checked your build and wanted to ask if you could switch the custom script step to the Flutter Test step, but according to your workflow editor you’ve already made this change. Nevertheless, I haven’t seen any new builds with the updated workflow as of yet, can you let me know if there are any changes once there is? :slight_smile:

So I didn’t quite understand your instructions. Our tests are failing in the “Flutter Driver” step, not the Flutter Test step.

In any case, we thought we moved past this by upgrading to Bitrise Elite plan but we started seeing issues again. Sometimes its the original VMServiceFlutterDriver problem but sometimes its just sporadic test failures that we can never reproduce locally.

Another example build: Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation

We also are seeing this error on some builds as well:

waiting for emulator boot timed out after 300000000000 seconds

Example build: Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation

Hello there @seanconnolly :wave:

Can you please enable Support Access on the Settings tab of the app ( Enabling the Bitrise Support user for your app | Bitrise DevCenter ) so that we can take a more in-depth look? :slight_smile:

Hello,

Support Access is enabled (again). Thanks!

~Sean

Hello @seanconnolly, thanks for the access! :slight_smile:

It seems the issue is due to the emulator being created very slowly on this stack, but we could try multiple things to work around this.
The first is to use a script step, described in this article: Failed to boot emulator device (AVD) – Bitrise
Please note that the script there is written for an android API 29, but you merely need to switch it up with whichever you need (currently it is set to API 30 in your AVD Manager step).

For a number of other users what helped is to switch to an Ubuntu stack from an Xcode stack :slight_smile:

Hope this helps! :rocket:

Ok, we will give that a try, thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.