Log stdout in adb.dart#187531
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several ADB helper methods in adb.dart to include both stdout and stderr in error messages upon command failure, and updates the corresponding test expectations in adb_fake_io_test.dart. Feedback suggests decoding the binary stdout using utf8.decode in the screencap() method to ensure the error message remains human-readable instead of printing a raw byte list.
| throw StateError( | ||
| 'Failed to take screenshot: stderr: ${result.stderr}, stdout: ${result.stdout}', | ||
| ); |
There was a problem hiding this comment.
In screencap(), result is an AdbBinaryResult where result.stdout is a Uint8List (binary data). Interpolating a Uint8List directly into a string will print its default string representation (e.g., a list of byte integers like [101, 114, 114, 111, 114] or Instance of 'Uint8List'), which is not human-readable.
To log the actual text output, decode the Uint8List using utf8.decode (from dart:convert).
| throw StateError( | |
| 'Failed to take screenshot: stderr: ${result.stderr}, stdout: ${result.stdout}', | |
| ); | |
| throw StateError( | |
| 'Failed to take screenshot: stderr: ${result.stderr}, stdout: ${utf8.decode(result.stdout, allowMalformed: true)}', | |
| ); |
…b.dart Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Roll Flutter from 2ba5420a7049 to 1bdf4af29076 (43 revisions) flutter/flutter@2ba5420...1bdf4af 2026-06-05 [email protected] Roll Packages from 03352b5 to 61bdbb4 (5 revisions) (flutter/flutter#187612) 2026-06-05 [email protected] Roll Skia from 6e003d7f69c8 to a47a9a2c8ae5 (1 revision) (flutter/flutter#187610) 2026-06-05 [email protected] Roll Dart SDK from aad8be4ce307 to 6a9a0efe66eb (10 revisions) (flutter/flutter#187609) 2026-06-05 [email protected] Roll Skia from 494f1bf55f51 to 6e003d7f69c8 (2 revisions) (flutter/flutter#187607) 2026-06-05 [email protected] Roll Fuchsia Linux SDK from ZE1Jy9CtVVi-tjBAE... to N_LiSaBSUsE2LDZgG... (flutter/flutter#187597) 2026-06-05 [email protected] Roll Skia from 59556fdb8c33 to 494f1bf55f51 (2 revisions) (flutter/flutter#187596) 2026-06-04 [email protected] Roll Skia from 8eb107046fd5 to 59556fdb8c33 (1 revision) (flutter/flutter#187590) 2026-06-04 [email protected] Remove `embedded_android_views_integration_test.dart` (flutter/flutter#187465) 2026-06-04 [email protected] Remove Material imports from rendering editable tests (flutter/flutter#186951) 2026-06-04 [email protected] [Impeller] Wait for the Vulkan device to become idle before destroying Vulkan objects in the AHBSwapchainImplVK destructor (flutter/flutter#187477) 2026-06-04 [email protected] [iOS] Eliminate unnecessary redeclaration of FlutterDisplayLink (flutter/flutter#187557) 2026-06-04 [email protected] Roll Skia from 928ded2a31af to 8eb107046fd5 (1 revision) (flutter/flutter#187583) 2026-06-04 [email protected] Log stdout in adb.dart (flutter/flutter#187531) 2026-06-04 [email protected] Clarify RouterDelegate popRoute bubbling (flutter/flutter#186875) 2026-06-04 [email protected] Roll Skia from 928ded2a31af to 8eb107046fd5 (1 revision) (flutter/flutter#187584) 2026-06-04 [email protected] Add updating-android-sdk agent skill for rolling Android SDK in CIPD (flutter/flutter#187576) 2026-06-04 [email protected] Fixing alignment issue (flutter/flutter#187518) 2026-06-04 [email protected] [Material Cross Imports] Clean up Material Divider usages (flutter/flutter#187300) 2026-06-04 [email protected] Roll Skia from cecc0e0da9ae to 928ded2a31af (6 revisions) (flutter/flutter#187574) 2026-06-04 [email protected] Use swift demangle to verify internal Swift symbols (flutter/flutter#186835) 2026-06-04 [email protected] Add android 37 platform and build tools to script for android cipd bundle creation (flutter/flutter#187571) 2026-06-04 [email protected] [Impeller] Increase the precision of the IPSampleWithTileModeOES coords parameter to match the input coordinates in the tiled_texture_fill_external shader (flutter/flutter#187545) 2026-06-04 [email protected] Roll Packages from b11504f to 03352b5 (4 revisions) (flutter/flutter#187569) 2026-06-04 [email protected] Roll Dart SDK to Dart 3.13 beta2 (flutter/flutter#187555) 2026-06-04 [email protected] Roll Skia from 611e3f8ceb93 to cecc0e0da9ae (1 revision) (flutter/flutter#187562) 2026-06-04 [email protected] Add step to bootstrap Flutter tool in coverage workflow (flutter/flutter#187199) 2026-06-04 [email protected] Roll Skia from 4fdb859c8da7 to 611e3f8ceb93 (4 revisions) (flutter/flutter#187554) 2026-06-04 [email protected] Roll Skia from 0020aae33f63 to 4fdb859c8da7 (2 revisions) (flutter/flutter#187552) 2026-06-04 [email protected] Roll Fuchsia Linux SDK from ap7MhLX4TdpWRrLS_... to ZE1Jy9CtVVi-tjBAE... (flutter/flutter#187550) 2026-06-04 [email protected] Add vector_math to package issue template (flutter/flutter#187536) 2026-06-04 [email protected] Manual roll Dart SDK from d39850bf4a01 to 3b70b98fa7c0 (flutter/flutter#187519) 2026-06-04 [email protected] Roll Skia from d625048c853a to 0020aae33f63 (20 revisions) (flutter/flutter#187539) 2026-06-04 [email protected] [Impeller][Windows] fix black screen on OpenGL fallback (flutter/flutter#187288) 2026-06-04 [email protected] Fix unintentionally joined path contours (flutter/flutter#187522) 2026-06-03 [email protected] fix: resolve issue #177379 by using lazy buildDirectory.dir() API in build.gradle template (flutter/flutter#187127) 2026-06-03 [email protected] Add a skill for flake analysis (flutter/flutter#187530) 2026-06-03 [email protected] adds linux impeller project flag (flutter/flutter#186982) 2026-06-03 [email protected] Add support for stylus buttons (flutter/flutter#183369) 2026-06-03 [email protected] Prevent Cubic transform from looping on out-of-range input (flutter/flutter#185875) 2026-06-03 [email protected] [Impeller] Reland: Allow attaching specific texture mip levels and slices (flutter/flutter#187470) 2026-06-03 [email protected] [skia] Update image deserial proc (flutter/flutter#185041) 2026-06-03 [email protected] docs: update Impeller advanced blend docs for framebuffer fetch (flutter/flutter#185457) 2026-06-03 [email protected] Handle#6537 fifth grouped tests (flutter/flutter#183720) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: ...
…r#11849) Roll Flutter from 2ba5420a7049 to 1bdf4af29076 (43 revisions) flutter/flutter@2ba5420...1bdf4af 2026-06-05 [email protected] Roll Packages from 03352b5 to 61bdbb4 (5 revisions) (flutter/flutter#187612) 2026-06-05 [email protected] Roll Skia from 6e003d7f69c8 to a47a9a2c8ae5 (1 revision) (flutter/flutter#187610) 2026-06-05 [email protected] Roll Dart SDK from aad8be4ce307 to 6a9a0efe66eb (10 revisions) (flutter/flutter#187609) 2026-06-05 [email protected] Roll Skia from 494f1bf55f51 to 6e003d7f69c8 (2 revisions) (flutter/flutter#187607) 2026-06-05 [email protected] Roll Fuchsia Linux SDK from ZE1Jy9CtVVi-tjBAE... to N_LiSaBSUsE2LDZgG... (flutter/flutter#187597) 2026-06-05 [email protected] Roll Skia from 59556fdb8c33 to 494f1bf55f51 (2 revisions) (flutter/flutter#187596) 2026-06-04 [email protected] Roll Skia from 8eb107046fd5 to 59556fdb8c33 (1 revision) (flutter/flutter#187590) 2026-06-04 [email protected] Remove `embedded_android_views_integration_test.dart` (flutter/flutter#187465) 2026-06-04 [email protected] Remove Material imports from rendering editable tests (flutter/flutter#186951) 2026-06-04 [email protected] [Impeller] Wait for the Vulkan device to become idle before destroying Vulkan objects in the AHBSwapchainImplVK destructor (flutter/flutter#187477) 2026-06-04 [email protected] [iOS] Eliminate unnecessary redeclaration of FlutterDisplayLink (flutter/flutter#187557) 2026-06-04 [email protected] Roll Skia from 928ded2a31af to 8eb107046fd5 (1 revision) (flutter/flutter#187583) 2026-06-04 [email protected] Log stdout in adb.dart (flutter/flutter#187531) 2026-06-04 [email protected] Clarify RouterDelegate popRoute bubbling (flutter/flutter#186875) 2026-06-04 [email protected] Roll Skia from 928ded2a31af to 8eb107046fd5 (1 revision) (flutter/flutter#187584) 2026-06-04 [email protected] Add updating-android-sdk agent skill for rolling Android SDK in CIPD (flutter/flutter#187576) 2026-06-04 [email protected] Fixing alignment issue (flutter/flutter#187518) 2026-06-04 [email protected] [Material Cross Imports] Clean up Material Divider usages (flutter/flutter#187300) 2026-06-04 [email protected] Roll Skia from cecc0e0da9ae to 928ded2a31af (6 revisions) (flutter/flutter#187574) 2026-06-04 [email protected] Use swift demangle to verify internal Swift symbols (flutter/flutter#186835) 2026-06-04 [email protected] Add android 37 platform and build tools to script for android cipd bundle creation (flutter/flutter#187571) 2026-06-04 [email protected] [Impeller] Increase the precision of the IPSampleWithTileModeOES coords parameter to match the input coordinates in the tiled_texture_fill_external shader (flutter/flutter#187545) 2026-06-04 [email protected] Roll Packages from b11504f to 03352b5 (4 revisions) (flutter/flutter#187569) 2026-06-04 [email protected] Roll Dart SDK to Dart 3.13 beta2 (flutter/flutter#187555) 2026-06-04 [email protected] Roll Skia from 611e3f8ceb93 to cecc0e0da9ae (1 revision) (flutter/flutter#187562) 2026-06-04 [email protected] Add step to bootstrap Flutter tool in coverage workflow (flutter/flutter#187199) 2026-06-04 [email protected] Roll Skia from 4fdb859c8da7 to 611e3f8ceb93 (4 revisions) (flutter/flutter#187554) 2026-06-04 [email protected] Roll Skia from 0020aae33f63 to 4fdb859c8da7 (2 revisions) (flutter/flutter#187552) 2026-06-04 [email protected] Roll Fuchsia Linux SDK from ap7MhLX4TdpWRrLS_... to ZE1Jy9CtVVi-tjBAE... (flutter/flutter#187550) 2026-06-04 [email protected] Add vector_math to package issue template (flutter/flutter#187536) 2026-06-04 [email protected] Manual roll Dart SDK from d39850bf4a01 to 3b70b98fa7c0 (flutter/flutter#187519) 2026-06-04 [email protected] Roll Skia from d625048c853a to 0020aae33f63 (20 revisions) (flutter/flutter#187539) 2026-06-04 [email protected] [Impeller][Windows] fix black screen on OpenGL fallback (flutter/flutter#187288) 2026-06-04 [email protected] Fix unintentionally joined path contours (flutter/flutter#187522) 2026-06-03 [email protected] fix: resolve issue #177379 by using lazy buildDirectory.dir() API in build.gradle template (flutter/flutter#187127) 2026-06-03 [email protected] Add a skill for flake analysis (flutter/flutter#187530) 2026-06-03 [email protected] adds linux impeller project flag (flutter/flutter#186982) 2026-06-03 [email protected] Add support for stylus buttons (flutter/flutter#183369) 2026-06-03 [email protected] Prevent Cubic transform from looping on out-of-range input (flutter/flutter#185875) 2026-06-03 [email protected] [Impeller] Reland: Allow attaching specific texture mip levels and slices (flutter/flutter#187470) 2026-06-03 [email protected] [skia] Update image deserial proc (flutter/flutter#185041) 2026-06-03 [email protected] docs: update Impeller advanced blend docs for framebuffer fetch (flutter/flutter#185457) 2026-06-03 [email protected] Handle#6537 fifth grouped tests (flutter/flutter#183720) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: ...
there are cases where the logs seem to show nothing. Presumably the error was actually on stdout? Log the stdout as well in each case. ex: ``` VMServiceFlutterDriver: Connecting to Flutter application at http://127.0.0.1:35881/RbdYvy0mjAY=/ VMServiceFlutterDriver: Isolate found with number: 996155999383631 VMServiceFlutterDriver: Isolate 996155999383631 is runnable. VMServiceFlutterDriver: Isolate is paused at start. VMServiceFlutterDriver: Attempting to resume isolate VMServiceFlutterDriver: Connected to Flutter application. D/FlutterJNI( 7695): Sending viewport metrics to the engine. I/PlatformViewsChannel( 7695): Using legacy platform view rendering strategy. I/PlatformViewsController( 7695): Using hybrid composition for platform view: 0 I/MESA ( 7695): exportSyncFdForQSRILocked: call for image 0x7f3d16359350 hos timage handle 0x70004000012d9 I/MESA ( 7695): exportSyncFdForQSRILocked: got fd: 150 D/FlutterJNI( 7695): Sending viewport metrics to the engine. I/MESA ( 7695): exportSyncFdForQSRILocked: call for image 0x7f3d16358fd0 hos timage handle 0x70004000012da I/MESA ( 7695): exportSyncFdForQSRILocked: got fd: 157 00:35 +0 -1: (setUpAll) [E] Bad state: Failed to disable animations: package:android_driver_extensions/src/backend/android/adb.dart 172:9 Adb.disableAnimations ===== asynchronous gap =========================== package:android_driver_extensions/src/backend/android/driver.dart 66:5 AndroidNativeDriver.configureForScreenshotTesting ===== asynchronous gap =========================== test_driver/platform_view/hide_show_hide_main_test.dart 22:5 main.<fn> ``` https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8681252155845819249/+/u/run_test.dart_for_android_engine_vulkan_tests_shard_and_subshard_None/stdout --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
there are cases where the logs seem to show nothing. Presumably the error was actually on stdout?
Log the stdout as well in each case.
ex:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8681252155845819249/+/u/run_test.dart_for_android_engine_vulkan_tests_shard_and_subshard_None/stdout