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:
- Console clutter: The excessive logging buries relevant application messages and debug output
- Reduced productivity: Important application logs become difficult to identify
- 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
Solution 1: Update Flutter to 3.29.0+ (Recommended)
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:
- Upgrade your Flutter SDK:
flutter upgrade
- Verify your Flutter version:
flutter --version
Ensure you're running at least 3.29.0
- Clean your build artifacts:
flutter clean
- Run your application normally:
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:
flutter run --no-enable-impeller
Android Studio configuration
- Navigate to Run → Edit Configurations
- Under Additional run args, add:
--no-enable-impeller
- Click Apply then OK
VS Code configuration
Add the following to your launch.json
file:
{
"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
- In the Run/Debug console, click the filter icon
- Enter
!MESA
to exclude messages containing "MESA"
VS Code filtering
- While your app is running, locate the filter input in the Debug Console
- Enter
!MESA
to hide these messages
Advanced configurations
You can combine exclusion terms for more precise filtering:
!MESA !exportSyncFdForQSRILocked !sendCancelIfRunning
To show only Flutter-related messages in VS Code:
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 synchronizationsendCancelIfRunning
involves back button press handling- Both log at
INFO
andWARNING
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
- First choice: Update to Flutter 3.29.0+ for permanent resolution
- Temporary workaround: Disable Impeller if immediate update isn't possible
- Last resort: Apply log filters in your IDE while waiting to update
- Always
flutter clean
after SDK updates to prevent artifact conflicts - Regularly update dependencies with
flutter pub outdated
thenflutter 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.