Skip to content

flutter test type 'Null' is not a subtype of type 'bool' in type cast package:test_api RemoteListener.start.<fn>.<fn> #91059

@felangel

Description

@felangel

Steps to Reproduce

package:test v1.18.0 throws when running flutter test:

import 'package:test/test.dart';

void main() {
  test('...', () {
    expect(true, isTrue);
  });
}
  • Using dart test works
  • Using package:test 1.17.12 with flutter test also works

Expected results: I would expect the test to pass

Actual results:

$ flutter test   
00:00 +0 -1: loading my_test.dart [E]   
  Failed to load "my_test.dart": type 'Null' is not a subtype of type 'bool' in type cast
  package:test_api  RemoteListener.start.<fn>.<fn>
  
00:00 +0 -1: Some tests failed.
Logs
[✓] Flutter (Channel beta, 2.6.0-5.2.pre, on macOS 11.4 20F71 darwin-x64, locale
    en-US)
    • Flutter version 2.6.0-5.2.pre at /Users/felix/fvm/versions/beta
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 400608f101 (2 weeks ago), 2021-09-15 15:50:26 -0700
    • Engine revision 1d521d89d8
    • Dart version 2.15.0 (build 2.15.0-82.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/felix/Library/Android/sdk
    • Platform android-30, build-tools 29.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2021.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.60.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.25.0

[✓] VS Code (version 1.61.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.26.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.4 20F71 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 94.0.4606.61
    ! Error: Felix’s iPhone is not connected. Xcode will continue when Felix’s
      iPhone is connected. (code -13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: timeoutIssue is closed due to author not providing the requested details in time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions