Skip to content

Flutter native driver Android test has at least 1 flake related to VM service (?) #152769

@matanlurey

Description

@matanlurey

See test log, but tl;dr:

00:00 �[32m+0�[0m: (setUpAll)�[0m
VMServiceFlutterDriver: Connecting to Flutter application at http://127.0.0.1:46399/ymJxvA92rfE=/
VMServiceFlutterDriver: Isolate found with number: 7208191671426927
00:00 �[32m+0�[0m�[31m -1�[0m: (setUpAll) �[1m�[31m[E]�[0m�[0m
  getIsolate: (-32000) Service connection disposed

00:00 �[32m+0�[0m�[31m -1�[0m: (tearDownAll)�[0m
00:00 �[32m+0�[0m�[31m -2�[0m: (tearDownAll) �[1m�[31m[E]�[0m�[0m
  LateInitializationError: Local 'nativeDriver' has not been initialized.
  dart:_internal              LateError._throwLocalNotInitialized
  test_driver/main_test.dart  _main.<fn>

00:00 �[32m+0�[0m�[31m -2�[0m: �[31mSome tests failed.�[0m

Consider enabling the flag chain-stack-traces to receive more detailed exceptions.
For example, 'dart test --chain-stack-traces'.

This test is super simple:

Future<void> _main() async {
  // To generate golden files locally, uncomment the following line.
  // autoUpdateGoldenFiles = true;

  late FlutterDriver flutterDriver;
  late NativeDriver nativeDriver;

  setUpAll(() async {
    flutterDriver = await FlutterDriver.connect();
    nativeDriver = await AndroidNativeDriver.connect();
  });

  tearDownAll(() async {
    await nativeDriver.close();
    await flutterDriver.close();
  });

  test('should screenshot and match a full-screen blue rectangle', () async {
    await flutterDriver.waitFor(find.byType('DecoratedBox'));
    await expectLater(
      nativeDriver.screenshot(),
      matchesGoldenFile('android_driver_test.BlueRectangle.png'),
    );
  }, timeout: Timeout.none);
}

I am investigating if exceptions are being swallowed.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listblockedIssue is blocked by another issuec: flakeTests that sometimes, but not always, incorrectly passt: flutter driver"flutter driver", flutter_drive, or a driver test

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions