Skip to content

Excessive MESA Logging in Flutter on Android

Problem Statement

After updating Flutter to version 3.27.0 or later, you may encounter excessive logging in your development console when running applications on Android devices. The problematic logs typically appear as repetitive messages:

W/WindowOnBackDispatcher( 5712): sendCancelIfRunning: isInProgress=false callback=io.flutter.embedding.android.FlutterActivity$1@775be57
I/MESA    ( 5712): exportSyncFdForQSRILocked: call for image 0xb400007aaf063850 hos timage handle 0x70002000000d3
I/MESA    ( 5712): exportSyncFdForQSRILocked: got fd: 168

These messages originate from either the Flutter framework or Android system components and are unrelated to your application code. The primary issues are:

  1. Console clutter: The excessive logging buries relevant application messages and debug output
  2. Reduced productivity: Important application logs become difficult to identify
  3. Misleading content: The logs appear concerning but don't indicate actual problems with your app

The issue primarily affects Flutter projects running on Android devices with versions 3.27.0 to 3.28.x of the SDK.

Solutions

OFFICIAL FIX AVAILABLE

Flutter 3.29.0 (released to the stable channel) includes an official fix for this logging issue. This is the recommended approach.

To resolve this permanently:

  1. Upgrade your Flutter SDK:
bash
flutter upgrade
  1. Verify your Flutter version:
bash
flutter --version

Ensure you're running at least 3.29.0

  1. Clean your build artifacts:
bash
flutter clean
  1. Run your application normally:
bash
flutter run

This GitHub issue documents the fix: https://github.com/flutter/flutter/issues/160442

Solution 2: Disable Impeller (Temporary Workaround)

Impeller (Flutter's new rendering engine) introduced this logging behavior. Disabling it removes the system-level messages until you can upgrade to 3.29.0+.

Command-line approach

Add the --no-enable-impeller flag when running your app:

bash
flutter run --no-enable-impeller

Android Studio configuration

  1. Navigate to Run → Edit Configurations
  2. Under Additional run args, add:
    --no-enable-impeller
  3. Click Apply then OKAndroid Studio Configuration

VS Code configuration

Add the following to your launch.json file:

json
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Flutter",
      "request": "launch",
      "type": "dart",
      "args": ["--no-enable-impeller"]
    }
  ]
}

TEMPORARY SOLUTION ONLY

Disabling Impeller might impact graphical performance and features. Use this only until you can upgrade to Flutter 3.29.0+.

Solution 3: Log Filtering in Your IDE

For cases where you can't immediately update or disable Impeller, configure log filters to hide the noise while retaining useful application logs.

Android Studio filtering

  1. In the Run/Debug console, click the filter icon
  2. Enter !MESA to exclude messages containing "MESA" Android Studio Filtering

VS Code filtering

  1. While your app is running, locate the filter input in the Debug Console
  2. Enter !MESA to hide these messages VS Code Filtering

Advanced configurations

You can combine exclusion terms for more precise filtering:

bash
!MESA !exportSyncFdForQSRILocked !sendCancelIfRunning

To show only Flutter-related messages in VS Code:

bash
flutter:

Explanation

These log messages are generated by the interaction between Flutter's Impeller graphics engine and the Android system graphics stack. Specifically:

  • exportSyncFdForQSRILocked relates to graphics buffer synchronization
  • sendCancelIfRunning involves back button press handling
  • Both log at INFO and WARNING verbosity levels in Flutter 3.27.0-3.28.x

The messages are safe to ignore as they don't indicate problems with application execution. They're internal system messages accidentally logged at verbosity levels too high for regular development.

Best Practices Summary

  1. First choice: Update to Flutter 3.29.0+ for permanent resolution
  2. Temporary workaround: Disable Impeller if immediate update isn't possible
  3. Last resort: Apply log filters in your IDE while waiting to update
  4. Always flutter clean after SDK updates to prevent artifact conflicts
  5. Regularly update dependencies with flutter pub outdated then flutter pub upgrade

AVOIDING FUTURE ISSUES

Always verify the compatibility of plugins and dependencies when updating the Flutter SDK. Check GitHub issues for the Flutter repository when encountering new problems after updates.

The ideal solution involves updating to fix the root cause through the official patch. Alternative solutions provide temporary relief while maintaining productivity during development.