Repository: flutter
Issue: running integration tests with option --flavor development returns timeout
Labels: a: tests,c: crash,platform-ios,tool,t: flutter driver,P2,team-ios,triaged-ios

I am able to run `flutter run --flavor` development without any error, however when I intend to run integration tests with `flutter driver --target=test_driver/app.dart --flavor development`, i run into this error. App is installed but tests fail.

Any help or pointers to solve this is highly appreciated.

content of `app.dart` file:
```dart
import 'package:flutter_driver/driver_extension.dart';
import 'package:test/main.dart' as app;

void main() {
  enableFlutterDriverExtension();
  app.main();
}
```

*Error Log*
```
 DriverError: Timed out waiting for Flutter Driver extension 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().
  Original error: null
  Original stack trace:
  null

  package:flutter_driver/src/driver/driver.dart 355:9  FlutterDriver.connect
  ===== asynchronous gap ===========================
  dart:async/future_impl.dart 22:43                    _Completer.completeError
  dart:async/runtime/libasync_patch.dart 40:18         _AsyncAwaitCompleter.completeError
  package:flutter_driver/src/driver/driver.dart        FlutterDriver.connect
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1062:19                         _CustomZone.registerBinaryCallback
  dart:async/runtime/libasync_patch.dart 86:23         _asyncErrorWrapperHelper
  package:flutter_driver/src/driver/driver.dart        FlutterDriver.connect
  test_driver/security_test.dart 15:36                 main.<fn>.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1053:19                         _CustomZone.registerUnaryCallback
  dart:async/zone.dart 967:22                          _CustomZone.bindUnaryCallbackGuarded
  dart:async/future.dart 529:34                        Future.doWhile
  dart:async/future.dart 489:12                        Future.forEach
  package:test_api/src/backend/declarer.dart 291:36    Declarer._setUpAll.<fn>.<fn>
  dart:async/zone.dart 1124:13                         _rootRun
  dart:async/zone.dart 1021:19                         _CustomZone.run
  dart:async/zone.dart 1516:10                         _runZoned
  dart:async/zone.dart 1463:12                         runZoned
  package:test_api/src/backend/declarer.dart 291:14    Declarer._setUpAll.<fn>
  package:test_api/src/backend/invoker.dart 399:25     Invoker._onRun.<fn>.<fn>.<fn>.<fn>
  ===== asynchronous gap ===========================
  dart:async/zone.dart 1045:19                         _CustomZone.registerCallback
  dart:async/zone.dart 962:22                          _CustomZone.bindCallbackGuarded
  dart:async/timer.dart 52:45                          new Timer
  dart:async/timer.dart 87:9                           Timer.run
  dart:async/future.dart 174:11                        new Future
  package:test_api/src/backend/invoker.dart 398:11     Invoker._onRun.<fn>.<fn>.<fn>

01:00 +0 -1: Security App (tearDownAll)
01:00 +0 -1: Some tests failed.

Unhandled exception:
Dummy exception to set exit code.
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3      _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:391:30)
#4      _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
```