Skip to content

Flutter web error messages use console.log instead of console.error. #178340

Description

@jakemac53

Steps to reproduce

Run the counter app, but add a runtime error inside the _increment function. Launch this app on chrome and click the button, then open up the console window.

You will see these are not printed as errors, but just normal text.

Expected results

I would expect all errors to be printed as errors.

Note that on other platforms, these errors are emitted on stderr and not stdout like print messages are.

This is ultimately the root cause of dart-lang/ai#283 - we listen to the stderr VM service stream for flutter app runtime errors, but we never get any.

The dwds tool which converts the chrome debug protocol to the VM service protocol treats console.log messages as "stdout" messages, and console.error messages as "stderr", which is I think the best we can do.

Actual results

I do see the errors but on the stdout stream, which means we can't tell the difference between errors and regular debugging output.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: error messageError messages from the Flutter frameworkfound in release: 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions