Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example app's tests fail on latest Flutter master #2505

Open
bartekpacia opened this issue Jan 23, 2025 · 2 comments
Open

Example app's tests fail on latest Flutter master #2505

bartekpacia opened this issue Jan 23, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Jan 23, 2025

Steps to reproduce

AVD created with:

avdmanager create avd --sdcard 4096M --package system-images;android-34;google_apis_playstore;arm64-v8a --name Pixel_9_API_34 --device pixel_9

I'm using latest Flutter from master channel. It's not a stable version. Might be worth trying it with beta.

  1. dart pub global activate patrol_cli
  2. cd packages/patrol/example (in Patrol repo
  3. patrol test

Actual results

Tests fail with a weird error (similar to #1265):

❌ counter state is the same after going to home and switching apps (integration_test/example_test.dart) (2s)
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following assertion was thrown running a test:
A SemanticsHandle was active at the end of the test.
All SemanticsHandle instances must be disposed by calling
dispose() on the SemanticsHandle.

When the exception was thrown, this was the stack:
#0      WidgetTester._verifySemanticsHandlesWereDisposed (package:flutter_test/src/widget_tester.dart:1076:7)
#1      WidgetTester._endOfTestVerifications (package:flutter_test/src/widget_tester.dart:1065:5)
#2      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1078:22)
<asynchronous suspension>
#3      TestWidgetsFlutterBinding._createTestCompletionHandler.<anonymous closure> (package:flutter_test/src/binding.dart:814:12)
<asynchronous suspension>

The test description was:
  counter state is the same after going to home and switching
  apps
═════════════════════════════════════════════════════════════════

I'd expect example app tests to pass.

Logs

logs.txt (too long to paste in-place)

Patrol version

Patrol directly from Patrol repo at commit a2bc620

Patrol Doctor output

Patrol Doctor output
$ patrol doctor
Patrol doctor:
Patrol CLI version: 3.5.0
Flutter command: flutter
  Flutter 3.28.0-2.0.pre.38827 • channel master
Android:
• Program adb found in /Users/bartek/androidsdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/bartek/androidsdk
iOS / macOS:
• Program xcodebuild found in /usr/bin/xcodebuild
• Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Latest Flutter @ master channel.

Flutter Doctor output
$ flutter doctor --verbose
[✓] Flutter (Channel master, 3.28.0-2.0.pre.38827, on macOS 15.2 24C101 darwin-arm64, locale en-US) [2.3s]
    • Flutter version 3.28.0-2.0.pre.38827 on channel master at /Users/bartek/.cache/fvm/versions/master
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision b2f515f45e (3 hours ago), 2025-01-22 14:30:18 -0800
    • Engine revision b2f515f45e
    • Dart version 3.8.0 (build 3.8.0-24.0.dev)
    • DevTools version 2.42.0

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,724ms]
    • Android SDK at /Users/bartek/androidsdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/bartek/androidsdk
    • Java binary at: /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 23.0.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0) [1,326ms]
    • Xcode at /Applications/Xcode-16.0.0.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2024.2) [103ms]
    • Android Studio at /Users/bartek/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 21.0.4+-12422083-b607.1)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.2) [102ms]
    • IntelliJ at /Users/bartek/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 83.0.4
    • Dart plugin version 243.23654.44

[✓] VS Code (version 1.96.4) [14ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (5 available) [6.8s]
    • sdk gphone64 arm64 (mobile)        • emulator-5554             • android-arm64  • Android 14 (API 34) (emulator)
    • Barteks-iPhone (wireless) (mobile) • 00008120-001E352E22B8201E • ios            • iOS 18.2.1 22C161
    • macOS (desktop)                    • macos                     • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Mac Designed for iPad (desktop)    • mac-designed-for-ipad     • darwin         • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                       • chrome                    • web-javascript • Google Chrome 131.0.6778.265

[✓] Network resources [303ms]
    • All expected network resources are available.

• No issues found!
@Kendru98 Kendru98 added the bug Something isn't working label Jan 28, 2025
@Kendru98
Copy link
Contributor

Hi Bartek, thanks for reporting, we will look into it.

@t-unit
Copy link

t-unit commented Feb 11, 2025

We observed the same issue with the current beta version of Flutter 3.29.0-0.3.pre

edit: also true for the Flutter 3.29.0 non-beta release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants