Repository navigation
Flutter driver error logger assumes stderr which breaks web #186751
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Steps to reproduce
On the web, if you make a flutter_driver call which wants to log an error, that will end up raising an exception due to the hard coded reliance on stderr.writeln here. Note that in DDC, this throws an UnsupportedError - so we could potentially just also catch those exceptions.
DDC does not implement this API (although possibly it could via console.error or something?) cc @nshahan .
Expected results
I expect it to not cause an unhandled exception, and ideally actually log the error somewhere like console.stderr.
Actual results
It raises an exception and the request times out instead of getting a nice error.
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
The following UnsupportedError was
thrown during a service extension callback for
\"ext.flutter.driver\":
Unsupported operation:
StdIOUtils._getStdioOutputStream
When the exception was thrown, this was the stack:
dart-sdk/
lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3 throw_
dart-sdk/lib/
_internal/js_dev_runtime/patch/io_patch.dart 684:5 _getStdioOutputStream
dart-
sdk/lib/io/stdio.dart 508:36 get _stderr
dart-sdk/
lib/io/stdio.dart 543:41 get
stderr
ddc_module_loader.js 1517:25
get
package:flutter_driver/src/common/error.dart 58:5
_defaultDriverLogger
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
118:77 tear
package:flutter_driver/src/extension/extension.dart 394:5
[_log]
package:flutter_driver/src/extension/extension.dart 432:9
<fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 618:19 <fn>
dart-
sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 643:23 <fn>
dart-sdk/lib/
_internal/js_dev_runtime/patch/async_patch.dart 593:5 <fn>
dart-sdk/lib/async/
zone.dart 967:54 runBinary
dart-sdk/lib/async/
future_impl.dart 237:22 handleError
dart-sdk/lib/async/
future_impl.dart 960:46 handleError
dart-sdk/lib/async/
future_impl.dart 981:13 _propagateToListeners
dart-sdk/lib/
async/future_impl.dart 738:5 [_completeErrorObject]
dart-
sdk/lib/async/future_impl.dart 742:5
[_completeError]
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 506:7
completeError
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 577:12
_asyncRethrow
package:flutter_driver/src/common/handler_factory.dart 239:18
<fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 618:19 <fn>
dart-
sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 643:23 <fn>
dart-sdk/lib/
_internal/js_dev_runtime/patch/async_patch.dart 589:19 <fn>
dart-sdk/lib/async/
zone.dart 962:54 runUnary
dart-sdk/lib/async/
future_impl.dart 222:18 handleValue
dart-sdk/lib/async/
future_impl.dart 948:44 handleValueCallback
dart-sdk/lib/
async/future_impl.dart 977:13 _propagateToListeners
dart-
sdk/lib/async/future_impl.dart 720:5
[_completeWithValue]
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 499:7
complete
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 566:12
_asyncReturn
package:flutter_driver/src/common/handler_factory.dart 517:3
<fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 618:19 <fn>
dart-
sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 643:23 <fn>
dart-sdk/lib/
_internal/js_dev_runtime/patch/async_patch.dart 589:19 <fn>
dart-sdk/lib/async/
zone.dart 962:54 runUnary
dart-sdk/lib/async/
future_impl.dart 222:18 handleValue
dart-sdk/lib/async/
future_impl.dart 948:44 handleValueCallback
dart-sdk/lib/
async/future_impl.dart 977:13 _propagateToListeners
dart-
sdk/lib/async/future_impl.dart 720:5
[_completeWithValue]
dart-sdk/lib/async/future_impl.dart 804:7
<fn>
dart-sdk/lib/async/schedule_microtask.dart 40:34
_microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5
_startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
118:77 tear
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 183:69
<fn>
═════════════════════════════════════════════════════════════════════════════════════════════
═══════Flutter Doctor output
Doctor output
[Paste your output here]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Activity
puneetkukreja98 commentedon May 20, 2026
@jakemac53 Thanks for reporting it. Routing this to team-web for further investigation.
Similar issue - #69314
[flutter_driver] Don't throw when stderr is unavailable on web (flutt…
[flutter_driver] Don't throw when stderr is unavailable on web (flutt…
github-actions commentedon Jul 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.