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
Dev tools unable to connect to VM service via HTTPS #1469
When dev-tools are launched from within VSCode they try connecting to the Flutter app via an HTTPS connection but fails to do so. Only when I manually change the URL to one with HTTP does it work.
That's a very good question I don't have a very good answer for. I'm not sure what's happening here.
@bh0mbalziyad can you run the Dart: Capture Logs command in VS Code (untick Analyzer but leave everything else ticked) then reproduce the issue, click Cancel on the logging dialog, and paste the log into a Gist (or similar) and the link here.
Can you also confirm your OS (Linux?) and whether there's anything that might be uncommon about your setup (for ex. are you running in a container, using VS Code Remoting, etc.)?
Hey! @DanTup Here's the gist.
Also my OS is Linux Mint 19. I'm running a vanilla distribution with little to no modifications. I don't know what VS Code Remoting is so I can't be using it I guess haha.
Thanks for the log! I've found the issue - we have a workaround for a VS Code issue in the Dart extension, but it does the wrong thing when the VM service URI is http and not ws.
It only occurs when you're running locally (not remote) and DevTools is unable to locate Chrome (so we have to launch the default browser from VS Code).
This has been fixed and released in the Dart extension v3.7.1. Let me know if you're still seeing issues after installing the update and reloading VS Code.
@hoekbrwr I don't think this is the same issue as above, but there's an issue open where DevTools will spawn in Chrome incorrectly when VS Code starts it (#2405). This will result in two DevTools - one that is connected to your app (which by default will be embedded in VS Code) and another that is just loaded at the Connect screen.
If that's what you're seeing, there's an open PR to fix it. If you're seeing something different, please file an issue at https://github.com/Dart-Code/Dart-Code and include detailed steps of how to reproduce the issue (I tried, but it works as described above for me - the embedded DevTools in VS Code does connect correctly). Thanks!
Sorry to say, but I have run into this when clicking “some” button. As I am an very unexperienced user I cannot follow up on this. If I press the lower Dart Devtools regions of the status bar it works. There is also the icon on top which splits the editor window. I think not all bases have been covered for opening DartDevtools.
Eventually I found my way by using the status bar on the bottom.
From: Danny Tuppeny <[email protected]>
Sent: Monday, 5 October 2020 10:46
To: flutter/devtools <[email protected]>
Cc: hoekbrwr <[email protected]>; Mention <[email protected]>
Subject: Re: [flutter/devtools] Dev tools unable to connect to VM service via HTTPS (#1469)
@hoekbrwr <https://github.com/hoekbrwr> I don't think this is the same issue as above, but there's an issue open where DevTools will spawn in Chrome incorrectly when VS Code starts it (#2405 <#2405> ). This will result in two DevTools - one that is connected to your app (which by default will be embedded in VS Code) and another that is just loaded at the Connect screen.
If that's what you're seeing, there's an open PR to fix it. If you're seeing something different, please file an issue at https://github.com/Dart-Code/Dart-Code and include detailed steps of how to reproduce the issue (I tried, but it works as described above for me - the embedded DevTools in VS Code does connect correctly). Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1469 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADZUAXZID62474EUVSYIFS3SJGBVRANCNFSM4JYCGZBA> . <https://github.com/notifications/beacon/ADZUAX3Y3UKFHOQIVRYFN4TSJGBVRA5CNFSM4JYCGZBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFHXHH6Y.gif>
@hoekbrwr if you're able to reproduce this and/or figure out what you clicked to launch DevTools in a way that doesn't work, I'd definitely like to fix the issue. I tried the status bar and the debug toolbar but both seemed to work. I did get an unexpected Chrome window open on the DevTools connect screen, though that's the other issue I described above.
If you can reproduce this, please do file an issue at https://github.com/Dart-Code/Dart-Code with instructions and/or a screenshot so I can take a look. Thanks!
Hello,
I was trying to reproduce that connection problem.
I found a few unlogical behaviours.
When first started VSCode and directly after starting a debug session with F5 the Dev Tool can be started only with the top icon on an extra page in the editor. As a side effect you get a browser tab ,in Chrome in my case, with the following:
As another side effect I see the bottom command in the status window only after applying the command in the top command bar in VSCode.
From there the connection can be made and the right Tab Dart DevTools appears.
If I close the Tab I cannot reopen it anymore by clicking the status command, but who will do that!? It just does not appear anymore although it tries to open it because I see a window right above the status bar.
All a bit strange, but usable!
Have a look at it!
Kind regards
Leo van der Hoek
From: Danny Tuppeny <[email protected]>
Sent: Monday, 5 October 2020 10:57
To: flutter/devtools <[email protected]>
Cc: hoekbrwr <[email protected]>; Mention <[email protected]>
Subject: Re: [flutter/devtools] Dev tools unable to connect to VM service via HTTPS (#1469)
@hoekbrwr <https://github.com/hoekbrwr> if you're able to reproduce this and/or figure out what you clicked to launch DevTools in a way that doesn't work, I'd definitely like to fix the issue. I tried the status bar and the debug toolbar but both seemed to work. I did get an unexpected Chrome window open on the DevTools connect screen, though that's the other issue I described above.
If you can reproduce this, please do file an issue at https://github.com/Dart-Code/Dart-Code with instructions and/or a screenshot so I can take a look. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1469 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADZUAXYWORV2GRCHUJULT53SJGC5HANCNFSM4JYCGZBA> . <https://github.com/notifications/beacon/ADZUAX6KEKDBPZBQOLXWRYDSJGC5HA5CNFSM4JYCGZBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFHXIR7Y.gif>
When first started VSCode and directly after starting a debug session with F5 the Dev Tool can be started only with the top icon on an extra page in the editor. As a side effect you get a browser tab ,in Chrome in my case, with the following:
That's the issue noted above (#2405). There's a fix in progress - it should not spawn the extra Chrome window.
As another side effect I see the bottom command in the status window only after applying the command in the top command bar in VSCode.
This is currently expected behaviour. DevTools only shows on the status bar once it is running. Using the button on the debug toolbar (or the commands from the command palette) are the normal ways to start (+ launch) DevTools initially. The status bar provides an additional way to quickly launch a section (or open it in an external browser) once it's already running.
If I close the Tab I cannot reopen it anymore by clicking the status command, but who will do that!? It just does not appear anymore although it tries to open it because I see a window right above the status bar.
If you can't reopen it after closing it, that definitely sounds like a bug - would you mind filing an issue at https://github.com/Dart-Code/Dart-Code about this and I'll take a look? Thanks!
I am sorry, but I will not rise a new issue on GitHub. I don’t like to study all the obligations for this minor issue. Most probably it will disappear when you solve the spawning window.
It only happens at the very first using of debug and Dart DevTools after closing this unconnected window which has been spawn by the debug command for DevTools.
If a bug really hits me by not able to use VSCode and Dart then it is time get more active.
Good luck solving issue #2405.
Kind regards
Leo
From: Danny Tuppeny <[email protected]>
Sent: Monday, 5 October 2020 16:05
To: flutter/devtools <[email protected]>
Cc: hoekbrwr <[email protected]>; Mention <[email protected]>
Subject: Re: [flutter/devtools] Dev tools unable to connect to VM service via HTTPS (#1469)
When first started VSCode and directly after starting a debug session with F5 the Dev Tool can be started only with the top icon on an extra page in the editor. As a side effect you get a browser tab ,in Chrome in my case, with the following:
That's the issue noted above (#2405 <#2405> ). There's a fix in progress - it should not spawn the extra Chrome window.
As another side effect I see the bottom command in the status window only after applying the command in the top command bar in VSCode.
This is currently expected behaviour. DevTools only shows on the status bar once it is running. Using the button on the debug toolbar (or the commands from the command palette) are the normal ways to start (+ launch) DevTools initially. The status bar provides an additional way to quickly launch a section (or open it in an external browser) once it's already running.
If I close the Tab I cannot reopen it anymore by clicking the status command, but who will do that!? It just does not appear anymore although it tries to open it because I see a window right above the status bar.
If you can't reopen it after closing it, that definitely sounds like a bug - would you mind filing an issue at https://github.com/Dart-Code/Dart-Code about this and I'll take a look? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1469 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADZUAX6PSHZCR4YVFRWBUBTSJHHCFANCNFSM4JYCGZBA> . <https://github.com/notifications/beacon/ADZUAX37KHQ2SJWWU6GEA23SJHHCFA5CNFSM4JYCGZBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFHYOVNA.gif>
I've just updated to the newest version of Dart Code 3.19.0 and can't connect to VM anymore.
Here is the message that I get https://i.imgur.com/6RDSaNh.png
Am I doing something wrong?
I've just updated to the newest version of Dart Code 3.19.0 and can't connect to VM anymore.
Here is the message that I get https://i.imgur.com/6RDSaNh.png
Am I doing something wrong?
Yes, the same issue. Can't seem to connect to VM by using ws or http.
Also, I think chrome or edge tab did not open by itself, when I clicked Open DevTools.
(Edit: When I tried just now, chrome tab did open but can not connect still)
I've just updated to the newest version of Dart Code 3.19.0 and can't connect to VM anymore.
Here is the message that I get https://i.imgur.com/6RDSaNh.png
Am I doing something wrong?
I've just updated to the newest version of Dart Code 3.19.0 and can't connect to VM anymore.
Here is the message that I get https://i.imgur.com/6RDSaNh.png
Am I doing something wrong?
I've just updated to the newest version of Dart Code 3.19.0 and can't connect to VM anymore.
Here is the message that I get https://i.imgur.com/6RDSaNh.png
Am I doing something wrong?
I also just updated. Big mistake. I created a blank plain Flutter Application in VSCode.
Flutter/Dart Extension v3.34.0
Flutter is already up to date on channel master
Flutter 2.10.0-1.0.pre.355 • channel master • https://github.com/flutter/flutter.git
Framework • revision e5cf7d1833 (4 hours ago) • 2022-02-01 06:55:22 -0500
Engine • revision 9cd90e399e
Tools • Dart 2.17.0 (build 2.17.0-69.0.dev) • DevTools 2.10.0-dev.1
Package devtools is currently active at version 2.9.3.
@jeremystephan this issue was about VS Code incorrectly trying to connect using HTTPS. I don't think it's the same issue you're seeing. Please file a new issue, and include:
Activity
[-]When [/-][+]Dev tools unable to connect to VM service via HTTPS[/+]jacob314 commentedon Dec 11, 2019
@DanTup Why is VSCode requesting an http url?
DanTup commentedon Dec 11, 2019
That's a very good question I don't have a very good answer for. I'm not sure what's happening here.
@bh0mbalziyad can you run the Dart: Capture Logs command in VS Code (untick Analyzer but leave everything else ticked) then reproduce the issue, click Cancel on the logging dialog, and paste the log into a Gist (or similar) and the link here.
Can you also confirm your OS (Linux?) and whether there's anything that might be uncommon about your setup (for ex. are you running in a container, using VS Code Remoting, etc.)?
Thanks!
bh0mbalziyad commentedon Dec 11, 2019
Hey! @DanTup Here's the gist.
Also my OS is Linux Mint 19. I'm running a vanilla distribution with little to no modifications. I don't know what VS Code Remoting is so I can't be using it I guess haha.
DanTup commentedon Dec 11, 2019
Thanks for the log! I've found the issue - we have a workaround for a VS Code issue in the Dart extension, but it does the wrong thing when the VM service URI is
httpand notws.It only occurs when you're running locally (not remote) and DevTools is unable to locate Chrome (so we have to launch the default browser from VS Code).
I've opened Dart-Code/Dart-Code#2166 and will push a fix today.
Fix handling of URL mapping + add tests
DanTup commentedon Dec 11, 2019
This has been fixed and released in the Dart extension v3.7.1. Let me know if you're still seeing issues after installing the update and reloading VS Code.
bh0mbalziyad commentedon Dec 11, 2019
DevTools work as expected now. That was some really swift work, I appreciate your quick responses. Thank you! @DanTup
DanTup commentedon Dec 11, 2019
Glad to hear - sorry for the inconvenience, and thanks for alerting us! :-)
houssain1 commentedon Jun 26, 2020
hoekbrwr commentedon Oct 5, 2020
Now it happens again. Started DevTools from VSCode. There is no auth code entered. It says http://127.0.0.1:12345/auth_code=
DanTup commentedon Oct 5, 2020
@hoekbrwr I don't think this is the same issue as above, but there's an issue open where DevTools will spawn in Chrome incorrectly when VS Code starts it (#2405). This will result in two DevTools - one that is connected to your app (which by default will be embedded in VS Code) and another that is just loaded at the Connect screen.
If that's what you're seeing, there's an open PR to fix it. If you're seeing something different, please file an issue at https://github.com/Dart-Code/Dart-Code and include detailed steps of how to reproduce the issue (I tried, but it works as described above for me - the embedded DevTools in VS Code does connect correctly). Thanks!
hoekbrwr commentedon Oct 5, 2020
DanTup commentedon Oct 5, 2020
@hoekbrwr if you're able to reproduce this and/or figure out what you clicked to launch DevTools in a way that doesn't work, I'd definitely like to fix the issue. I tried the status bar and the debug toolbar but both seemed to work. I did get an unexpected Chrome window open on the DevTools connect screen, though that's the other issue I described above.
If you can reproduce this, please do file an issue at https://github.com/Dart-Code/Dart-Code with instructions and/or a screenshot so I can take a look. Thanks!
hoekbrwr commentedon Oct 5, 2020
DanTup commentedon Oct 5, 2020
That's the issue noted above (#2405). There's a fix in progress - it should not spawn the extra Chrome window.
This is currently expected behaviour. DevTools only shows on the status bar once it is running. Using the button on the debug toolbar (or the commands from the command palette) are the normal ways to start (+ launch) DevTools initially. The status bar provides an additional way to quickly launch a section (or open it in an external browser) once it's already running.
If you can't reopen it after closing it, that definitely sounds like a bug - would you mind filing an issue at https://github.com/Dart-Code/Dart-Code about this and I'll take a look? Thanks!
hoekbrwr commentedon Oct 5, 2020
DanTup commentedon Oct 5, 2020
@hoekbrwr no worries, I was able to reproduce the issue you described. I've opened Dart-Code/Dart-Code#2852. Thanks!
hoekbrwr commentedon Oct 5, 2020
islamaliev commentedon Jan 30, 2021
I've just updated to the newest version of Dart Code 3.19.0 and can't connect to VM anymore.
Here is the message that I get https://i.imgur.com/6RDSaNh.png
Am I doing something wrong?
windman007 commentedon Jan 31, 2021
have the same issue on Dart SDK 2.10.5 (macOS)
windman007 commentedon Jan 31, 2021
here is newest post about this issue
agent515 commentedon Jan 31, 2021
Yes, the same issue. Can't seem to connect to VM by using ws or http.
Also, I think chrome or edge tab did not open by itself, when I clicked Open DevTools.
(Edit: When I tried just now, chrome tab did open but can not connect still)
OS: WIndows 10
anaberani commentedon Jan 31, 2021
I've got the same stack on Windows 10
novaisc commentedon Jan 31, 2021
Same problem here
sarahMaria7 commentedon Jan 31, 2021
same problem here
jeremystephan commentedon Feb 1, 2022
I also just updated. Big mistake. I created a blank plain Flutter Application in VSCode.
Flutter/Dart Extension v3.34.0
Flutter is already up to date on channel master
Flutter 2.10.0-1.0.pre.355 • channel master • https://github.com/flutter/flutter.git
Framework • revision e5cf7d1833 (4 hours ago) • 2022-02-01 06:55:22 -0500
Engine • revision 9cd90e399e
Tools • Dart 2.17.0 (build 2.17.0-69.0.dev) • DevTools 2.10.0-dev.1
Package devtools is currently active at version 2.9.3.
I also get the same message: https://i.imgur.com/6RDSaNh.png
DanTup commentedon Feb 1, 2022
@jeremystephan this issue was about VS Code incorrectly trying to connect using HTTPS. I don't think it's the same issue you're seeing. Please file a new issue, and include:
pub global listThanks!