You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter test breakpoint uris from observatory are prefixed with triple-slashes (but no file:) #16352
I'm writing some tests against the debug adapters in Dart Code and found that the uris that come back from observatory for flutter test aren't as expected - they seem to be prefixed with three slashes but do not have a file: prefix (on Travis at least, the same tests don't seem to fail locally on my MacBook!). In the Dart VM, they come back like file:///home/travis/build/Dart-Code/Dart-Code/test/test_projects/hello_world/bin/main.dart.
I can't say for sure this is a bug, as I don't think these uri formats are well documented (though I think they should be - slightly related are #15513 and dart-lang/sdk#32500). Having different formats across VM, Flutter Run and Flutter Test makes things complicated for editor integrations though - we currently have to explode paths from the editor into a bunch of different formats to ensure we get the right one for a breakpoint to be hit, and then we have to try and convert them back to ensure we can navigate to code in the editor. If we can agree/document a format and ensure all the tools stick to them, it would simplify things a lot in the editor and reduce the chances of end users getting bugs (like missed breakpoints).
Note the uri is prefixed with triple-slashes. I think /Users/dantup or file:///Users/dantup would be normal (it should match whatever we get from the VM or Flutter Run).
Hm, looks like I'm having issues reproducing this myself on my Linux machine. Is there anything special about the project you're using? I'd just like to get my environment as close to yours as possible.
Also, when you're observing the missing file: in the URI is it happening consistently for all URIs reported by the vm-service?
I can't remember if this happened only on specific platforms.. I'll make a branch of Dart Code with a failing test because of this (I have a test, but it's marked skip) and post back..
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.
Activity
DanTup commentedon Apr 17, 2018
I can no longer repro this - I think maybe it was fixed in a recent beta of Flutter. I'll re-open if I think I can repro/see it again.
DanTup commentedon May 7, 2018
Actually, I can repro this locally now. When I'm stopped at an exception in my tests, I'm getting stacks like this:
Note the
uriis prefixed with triple-slashes. I think/Users/dantuporfile:///Users/dantupwould be normal (it should match whatever we get from the VM or Flutter Run).bkonyi commentedon Jul 30, 2018
Hm, looks like I'm having issues reproducing this myself on my Linux machine. Is there anything special about the project you're using? I'd just like to get my environment as close to yours as possible.
Also, when you're observing the missing
file:in the URI is it happening consistently for all URIs reported by the vm-service?DanTup commentedon Jul 31, 2018
I can't remember if this happened only on specific platforms.. I'll make a branch of Dart Code with a failing test because of this (I have a test, but it's marked skip) and post back..
DanTup commentedon Jul 31, 2018
Well, I can't repro locally, and the CIs passed the test against both Dev(Master) and Stable(Beta) on all three platforms when I ran it on a branch:
So, my guess is that it must've been fixed (and rolled into Flutter after 7th May but before the current beta was taken at the end of May).
I'll close this and unskip this test for real on my builds and if I see any failures, I'll post back.
Unskip a test that should now pass on all platforms on both channels
github-actions commentedon Sep 2, 2021
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 -vand a minimal reproduction of the issue.