Skip to content

Exception in DDC customer formatter logic #43987

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

Closed
vsmenon opened this issue Oct 29, 2020 · 5 comments
Closed

Exception in DDC customer formatter logic #43987

vsmenon opened this issue Oct 29, 2020 · 5 comments
Assignees
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. customer-google3 P2 A bug or feature request we're likely to work on web-dev-compiler

Comments

@vsmenon
Copy link
Member

vsmenon commented Oct 29, 2020

If I enable customer formatters, stop at a breakpoint, and eval / drill down on an object, I get an exception:

debugger.dart:524 Caught exception NoSuchMethodError: tried to call a non-function, such as null: 'dart.getImplements(...)'
 trace:
dart-sdk/lib/_internal/js_dev_runtime/private/debugger.dart 910:45       preview
dart-sdk/lib/_internal/js_dev_runtime/private/debugger.dart 483:63       preview
dart-sdk/lib/_internal/js_dev_runtime/private/debugger.dart 372:30       header
%3Canonymous%3E 1:5                                                      <fn>
packages/g200/player.dart 66:5    

This is on:

Google Chrome	86.0.4240.111 (Official Build) (x86_64)
Revision	b8c36128a06ebad76af51591bfec980224db5522-refs/branch-heads/4240@{#1290}
OS	macOS Version 10.15.7 (Build 19H2)
JavaScript	V8 8.6.395.17

and

Flutter 1.24.0-4.0.pre.144 • channel master • https://github.com/flutter/flutter.git
Framework • revision 470346f775 (3 hours ago) • 2020-10-29 09:56:28 -0700
Engine • revision 073263e39d
Tools • Dart 2.11.0 (build 2.11.0-260.0.dev)

This may be related to internal bug: b/171406503

@sigmundch @nshahan

@vsmenon vsmenon added web-dev-compiler area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. customer-google3 P2 A bug or feature request we're likely to work on labels Oct 29, 2020
@nshahan
Copy link
Contributor

nshahan commented Oct 29, 2020

Can you walk me through how to enable them? I'm not sure how to repro. Are you using any chrome extensions?

@vsmenon vsmenon self-assigned this Nov 2, 2020
@vsmenon
Copy link
Member Author

vsmenon commented Nov 2, 2020

We used to recommend enabling custom formatters. See here for general instructions: https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview

The Chrome team would like to disable them, however: https://bugs.chromium.org/p/chromium/issues/detail?id=1016755

Dart DevTools (or any IDE using the Dart protocol) should support the same functionality more robustly now.

That said, I took a look at the exception and a few things are going wrong. CL coming.

@vsmenon
Copy link
Member Author

vsmenon commented Nov 2, 2020

@nshahan
Copy link
Contributor

nshahan commented Nov 17, 2020

@vsmenon I'm trying to understand more about the failures you helpfully fixed. Were you able to reproduce them outside of a flutter build? I've reverted your change locally and I can't figure out how to make the formatter crash.

@vsmenon
Copy link
Member Author

vsmenon commented Nov 17, 2020

Yeah, I think could replicate in ddb as well. Turn on custom formatter, stop at a breakpoint, eval and drill down on objects. I was seeing exceptions in the console that matched internal bugs. I didn't ever get devtools itself to crash though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. customer-google3 P2 A bug or feature request we're likely to work on web-dev-compiler
Projects
None yet
Development

No branches or pull requests

2 participants