Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exceptions are sometimes not surfaced #2240

Closed
natebosch opened this issue Apr 12, 2022 · 1 comment
Closed

Unhandled exceptions are sometimes not surfaced #2240

natebosch opened this issue Apr 12, 2022 · 1 comment
Labels
area-error-messaging closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@natebosch
Copy link
Member

What happened?

Sometimes unhandled async exceptions don't show up in the Console output area.

Steps to reproduce problem

The problem does not reproduce reliably. Refreshing the page seems to result in either having exceptions work, or not work. When they don't work they will be consistently suppressed on every run until the page is reloaded.

Additional info

Browser

Browser: Chrome

Version: 100.0.4896.75

Machine

Operating system: macOS Monterey

Version: 12.3.1

Your code

What code was in the editor, if any, when the failure occurred? You
can paste it in below:

void main() {
  throw 'sad';
}

DartPad's output

There is sometimes no output at all, or there is the expected output:

Uncaught Error: sad

In either case, the browser JS debugger console does show the error

Uncaught sad
    at Object.wrapException (<anonymous>:356:17)
    at <anonymous>:3101:23
    at _wrapJsFunctionForAsync_closure.$protected (<anonymous>:2549:15)
    at _wrapJsFunctionForAsync_closure.call$2 (<anonymous>:3484:12)
    at Object._asyncStartSync (<anonymous>:2493:20)
    at main (<anonymous>:3106:16)
    at <anonymous>:4255:7
    at <anonymous>:4238:7
    at dartProgram (<anonymous>:4249:5)
    at <anonymous>:4257:3
@johnpryan johnpryan added area-error-messaging P1 A high priority bug; for example, a single project is unusable or has many test failures labels Nov 15, 2022
@parlough
Copy link
Member

I'm going to consolidate this issue in to #3008 alongside other exception surfacing improvements. Thanks for the details!

@parlough parlough closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
@parlough parlough added the closed-duplicate Closed in favor of an existing report label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-error-messaging closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants