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

Unable to add breakpoints in "part" files ("Unknown library" errors), "Aww, snap!" in Chrome if changed to imports #1271

Closed
DanTup opened this issue Mar 12, 2021 · 6 comments · Fixed by #1296
Assignees

Comments

@DanTup
Copy link
Contributor

DanTup commented Mar 12, 2021

Raised by @skateboarder with a repro at Dart-Code/Dart-Code#3194 (comment).

Everything works fine for non-web, but with web if the project uses part the breakpoints are not set (error below), and if I change from part to imports, then I get an "Awww, snap!" page in Chrome when starting the app.

The app is being run with --no-sound-null-safety, but since it works fine on iOS I don't think that's related.

[12:17:15] [VmService] [Info] [_brokenBreakpoints] ==> {"id":"11","jsonrpc":"2.0","method":"addBreakpointWithScriptUri","params":{"isolateId":"1","scriptUri":"file:///private/tmp/_brokenBreakpoints/lib/main.dart","line":38}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] ==> {"id":"12","jsonrpc":"2.0","method":"addBreakpointWithScriptUri","params":{"isolateId":"1","scriptUri":"file:///private/tmp/_brokenBreakpoints/lib/trying.dart","line":30}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] ==> {"id":"13","jsonrpc":"2.0","method":"addBreakpointWithScriptUri","params":{"isolateId":"1","scriptUri":"file:///private/tmp/_brokenBreakpoints/lib/trying.dart","line":38}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] ==> {"id":"14","jsonrpc":"2.0","method":"addBreakpointWithScriptUri","params":{"isolateId":"1","scriptUri":"file:///private/tmp/_brokenBreakpoints/lib/trying.dart","line":67}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] ==> {"id":"15","jsonrpc":"2.0","method":"addBreakpointWithScriptUri","params":{"isolateId":"1","scriptUri":"file:///private/tmp/_brokenBreakpoints/lib/trying.dart","line":76}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] <== {"jsonrpc":"2.0","id":"12","error":{"code":-32603,"message":"addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: \"file:///private/tmp/_brokenBreakpoints/lib/trying.dart\"","data":{"details":"#0      new DartUri._fromFileUri (package:dwds/src/utilities/dart_uri.dart:144:5)\n#1      new DartUri (package:dwds/src/utilities/dart_uri.dart:114:49)\n#2      ChromeProxyService.addBreakpointWithScriptUri (package:dwds/src/services/chrome_proxy_service.dart:304:19)\n#3      VmServerConnection._delegateRequest (package:vm_service/src/vm_service.dart:1260:51)\n#4      _rootRunUnary (dart:async/zone.dart:1362:47)\n#5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#9      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#10     _MapStream._handleData (dart:async/stream_pipe.dart:218:10)\n#11     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#12     _rootRunUnary (dart:async/zone.dart:1362:47)\n#13     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#14     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#16     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#17     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#18     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#19     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#20     new WebSocketImpl.fromSocket.<anonymous closure> (package:web_socket_channel/src/copy/web_socket_impl.dart:728:21)\n#21     _rootRunUnary (dart:async/zone.dart:1362:47)\n#22     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#23     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#24     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#25     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#26     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#27     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#28     _WebSocketProtocolTransformer._messageFrameEnd (package:web_socket_channel/src/copy/web_socket_impl.dart:320:22)\n#29     _WebSocketProtocolTransformer.add (package:web_socket_channel/src/copy/web_socket_impl.dart:219:46)\n#30     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#31     _rootRunUnary (dart:async/zone.dart:1362:47)\n#32     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#33     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#34     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#35     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#36     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#37     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#38     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#39     _Socket._onData (dart:io-patch/socket_patch.dart:2144:41)\n#40     _rootRunUnary (dart:async/zone.dart:1370:13)\n#41     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#42     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#43     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#44     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#45     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#46     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#47     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#48     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1680:33)\n#49     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1192:14)\n#50     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)\n#51     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)\n#52     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)\n#53     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)\n"}}}
[12:17:15] [VmService] [Error] [_brokenBreakpoints] addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: "file:///private/tmp/_brokenBreakpoints/lib/trying.dart"
[12:17:15] [VmService] [Info] [_brokenBreakpoints] <== {"jsonrpc":"2.0","id":"13","error":{"code":-32603,"message":"addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: \"file:///private/tmp/_brokenBreakpoints/lib/trying.dart\"","data":{"details":"#0      new DartUri._fromFileUri (package:dwds/src/utilities/dart_uri.dart:144:5)\n#1      new DartUri (package:dwds/src/utilities/dart_uri.dart:114:49)\n#2      ChromeProxyService.addBreakpointWithScriptUri (package:dwds/src/services/chrome_proxy_service.dart:304:19)\n#3      VmServerConnection._delegateRequest (package:vm_service/src/vm_service.dart:1260:51)\n#4      _rootRunUnary (dart:async/zone.dart:1362:47)\n#5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#9      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#10     _MapStream._handleData (dart:async/stream_pipe.dart:218:10)\n#11     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#12     _rootRunUnary (dart:async/zone.dart:1362:47)\n#13     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#14     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#16     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#17     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#18     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#19     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#20     new WebSocketImpl.fromSocket.<anonymous closure> (package:web_socket_channel/src/copy/web_socket_impl.dart:728:21)\n#21     _rootRunUnary (dart:async/zone.dart:1362:47)\n#22     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#23     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#24     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#25     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#26     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#27     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#28     _WebSocketProtocolTransformer._messageFrameEnd (package:web_socket_channel/src/copy/web_socket_impl.dart:320:22)\n#29     _WebSocketProtocolTransformer.add (package:web_socket_channel/src/copy/web_socket_impl.dart:219:46)\n#30     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#31     _rootRunUnary (dart:async/zone.dart:1362:47)\n#32     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#33     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#34     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#35     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#36     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#37     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#38     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#39     _Socket._onData (dart:io-patch/socket_patch.dart:2144:41)\n#40     _rootRunUnary (dart:async/zone.dart:1370:13)\n#41     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#42     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#43     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#44     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#45     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#46     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#47     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#48     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1680:33)\n#49     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1192:14)\n#50     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)\n#51     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)\n#52     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)\n#53     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)\n"}}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] <== {"jsonrpc":"2.0","id":"14","error":{"code":-32603,"message":"addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: \"file:///private/tmp/_brokenBreakpoints/lib/trying.dart\"","data":{"details":"#0      new DartUri._fromFileUri (package:dwds/src/utilities/dart_uri.dart:144:5)\n#1      new DartUri (package:dwds/src/utilities/dart_uri.dart:114:49)\n#2      ChromeProxyService.addBreakpointWithScriptUri (package:dwds/src/services/chrome_proxy_service.dart:304:19)\n#3      VmServerConnection._delegateRequest (package:vm_service/src/vm_service.dart:1260:51)\n#4      _rootRunUnary (dart:async/zone.dart:1362:47)\n#5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#9      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#10     _MapStream._handleData (dart:async/stream_pipe.dart:218:10)\n#11     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#12     _rootRunUnary (dart:async/zone.dart:1362:47)\n#13     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#14     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#16     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#17     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#18     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#19     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#20     new WebSocketImpl.fromSocket.<anonymous closure> (package:web_socket_channel/src/copy/web_socket_impl.dart:728:21)\n#21     _rootRunUnary (dart:async/zone.dart:1362:47)\n#22     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#23     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#24     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#25     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#26     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#27     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#28     _WebSocketProtocolTransformer._messageFrameEnd (package:web_socket_channel/src/copy/web_socket_impl.dart:320:22)\n#29     _WebSocketProtocolTransformer.add (package:web_socket_channel/src/copy/web_socket_impl.dart:219:46)\n#30     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#31     _rootRunUnary (dart:async/zone.dart:1362:47)\n#32     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#33     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#34     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#35     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#36     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#37     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#38     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#39     _Socket._onData (dart:io-patch/socket_patch.dart:2144:41)\n#40     _rootRunUnary (dart:async/zone.dart:1370:13)\n#41     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#42     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#43     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#44     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#45     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#46     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#47     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#48     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1680:33)\n#49     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1192:14)\n#50     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)\n#51     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)\n#52     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)\n#53     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)\n"}}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] <== {"jsonrpc":"2.0","id":"15","error":{"code":-32603,"message":"addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: \"file:///private/tmp/_brokenBreakpoints/lib/trying.dart\"","data":{"details":"#0      new DartUri._fromFileUri (package:dwds/src/utilities/dart_uri.dart:144:5)\n#1      new DartUri (package:dwds/src/utilities/dart_uri.dart:114:49)\n#2      ChromeProxyService.addBreakpointWithScriptUri (package:dwds/src/services/chrome_proxy_service.dart:304:19)\n#3      VmServerConnection._delegateRequest (package:vm_service/src/vm_service.dart:1260:51)\n#4      _rootRunUnary (dart:async/zone.dart:1362:47)\n#5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#9      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#10     _MapStream._handleData (dart:async/stream_pipe.dart:218:10)\n#11     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#12     _rootRunUnary (dart:async/zone.dart:1362:47)\n#13     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#14     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#16     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#17     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#18     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#19     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#20     new WebSocketImpl.fromSocket.<anonymous closure> (package:web_socket_channel/src/copy/web_socket_impl.dart:728:21)\n#21     _rootRunUnary (dart:async/zone.dart:1362:47)\n#22     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#23     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#24     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#25     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#26     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#27     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#28     _WebSocketProtocolTransformer._messageFrameEnd (package:web_socket_channel/src/copy/web_socket_impl.dart:320:22)\n#29     _WebSocketProtocolTransformer.add (package:web_socket_channel/src/copy/web_socket_impl.dart:219:46)\n#30     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#31     _rootRunUnary (dart:async/zone.dart:1362:47)\n#32     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#33     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#34     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#35     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#36     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#37     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#38     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#39     _Socket._onData (dart:io-patch/socket_patch.dart:2144:41)\n#40     _rootRunUnary (dart:async/zone.dart:1370:13)\n#41     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#42     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#43     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#44     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#45     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#46     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#47     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#48     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1680:33)\n#49     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1192:14)\n#50     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)\n#51     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)\n#52     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)\n#53     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)\n"}}}
[12:17:15] [VmService] [Error] [_brokenBreakpoints] addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: "file:///private/tmp/_brokenBreakpoints/lib/trying.dart"
[12:17:15] [VmService] [Error] [_brokenBreakpoints] addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: "file:///private/tmp/_brokenBreakpoints/lib/trying.dart"
[12:17:15] [VmService] [Error] [_brokenBreakpoints] addBreakpointWithScriptUri: Invalid argument (uri): Unknown library: "file:///private/tmp/_brokenBreakpoints/lib/trying.dart"
[12:17:15] [VmService] [Info] [_brokenBreakpoints] <== {"jsonrpc":"2.0","id":"11","result":{"type":"Breakpoint","id":"bp/3#38","breakpointNumber":852,"resolved":true,"location":{"type":"SourceLocation","script":{"type":"@Script","id":"3","uri":"package:foo/main.dart"},"tokenPos":1355}}}
[12:17:15] [VmService] [Info] [_brokenBreakpoints] <== {"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Debug","event":{"type":"Event","kind":"BreakpointAdded","timestamp":1615551435192,"isolate":{"type":"@Isolate","id":"1","number":"1","name":"main()","isSystemIsolate":fa

I reproduced on current Flutter master.

@grouma
Copy link
Member

grouma commented Mar 12, 2021

@sigmundch this vaguely reminds me of an issue you resolved a few months ago. Do you remember the details?

@annagrin annagrin self-assigned this Mar 29, 2021
@annagrin
Copy link
Contributor

I'll take a look at this

@sigmundch
Copy link
Member

Sorry for the slow reply on my end - I honestly can't remember. It have this vague recollection that we used to include the library URIs without the part URIs before we had metadata files. However, if I recall correctly, @annagrin's metadata tracked part URIs pretty early on.

@grouma
Copy link
Member

grouma commented Mar 29, 2021

The issue I was referring to was b/171406503. The root cause was this issue. It may not be related since the problem was caused by custom formatters but it's the only other issue I've seen where the Chrome DevTools would fully display an "Aw Snap" error.

@annagrin
Copy link
Contributor

annagrin commented Apr 5, 2021

I found the issue - we are not registering module names for part uris, so looking up locations fails. Will fix and add tests.

annagrin pushed a commit to annagrin/webdev that referenced this issue Apr 6, 2021
- Record library part paths in debugger tables properly.
  Make sure that we have module and library recorded for
  part scripts, in `MetadataProvider` and `Modules`,
- Calculate locations for module atomically in `Locations`.
  This fixes intermittent 'Oh, snap!' in chrome due to a
  data race in location computation if several breakpoints
  are set in the same dart library.

- Update test fixtures to include part files.
- Add tests for frontend server and build runner scenarios.

Closes: dart-lang#1271
annagrin pushed a commit to annagrin/webdev that referenced this issue Apr 7, 2021
- Record library part paths in debugger tables properly.
  Make sure that we have module and library recorded for
  part scripts, in `MetadataProvider` and `Modules`,
- Calculate locations for module atomically in `Locations`.
  This fixes intermittent 'Oh, snap!' in chrome due to a
  data race in location computation if several breakpoints
  are set in the same dart library.

- Update test fixtures to include part files.
- Add tests for frontend server and build runner scenarios.

Closes: dart-lang#1271
annagrin pushed a commit that referenced this issue Apr 7, 2021
…ating locations (#1296)

* Fix failing breakpoints in library part files and data race

- Record library part paths in debugger tables properly.
  Make sure that we have module and library recorded for
  part scripts, in `MetadataProvider` and `Modules`,
- Calculate locations for module atomically in `Locations`.
  This fixes intermittent 'Oh, snap!' in chrome due to a
  data race in location computation if several breakpoints
  are set in the same dart library.

- Update test fixtures to include part files.
- Add tests for frontend server and build runner scenarios.

Closes: #1271

* Addressed CR comments

* Format and build after rebase
@admiral142
Copy link

Hi, I am experiencing this problem now for the first time. It's very odd, as earlier today, breakpoints were working, and now they all become unverified as soon as I start the debugger. I'm using VS Code, Dart Extension v3.74.0, Flutter Extension v3.74.0. I have Android Studio Giraffe 2022.3.1 Patch 2 installed. I typically use a Pixel 2 API 30 for my emulated phone. I have tried rebooting, doing a flutter clean, flutter pub get. I tried a new emulator, Pixel 7 Pro API 34. I checked for updates for Android Studio. I tried other Flutter projects. All Flutter projects exhibit the same behavior. I am starting using the debugger, not run without debugging. Any assistance with this would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants