Skip to content

Flutter driver error logger assumes stderr which breaks web #186751

Closed

Description

@jakemac53

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]

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-webWeb applications specifically
    team-webOwned by Web platform team
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed
    in triagePresently being triaged by the triage team
    on May 20, 2026
  2. puneetkukreja98 commented on May 20, 2026

    @puneetkukreja98
    Contributor

    @jakemac53 Thanks for reporting it. Routing this to team-web for further investigation.
    Similar issue - #69314

  3. self-assigned this
    on May 27, 2026
  4. added
    triaged-webTriaged by Web platform team
    P2Important issues not at the top of the work list
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on May 27, 2026
  5. added a commit that references this issue on Jun 2, 2026
    4917332
  6. added a commit that references this issue on Jun 26, 2026
    8113231
  7. github-actions commented on Jul 14, 2026

    @github-actions

    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 -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions