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 connect to VM service at https... WebSocket connection failed #5948

Open
intfract opened this issue Jun 25, 2023 · 13 comments · Fixed by flutter/website#8977
Open
Labels
P1 high priority issues at the top of the work list, actively being worked on.

Comments

@intfract
Copy link

Flutter DevTools won't work after flutter run and 2 for chrome. I can't connect to my flutter app.

Manually connecting doesn't work either.
image

@CoderDake
Copy link
Contributor

Hey @intfract I've tried to reproduce but it seems to work fine for me.
Can you please give more detail about how you are running your app, and how you are trying to connect to it?
Could you also please post the results of running flutter doctor?

@intfract
Copy link
Author

Issue

Sure, thanks for the reply. I am currently relying on Gitpod's slow linux noVNC because I can't use flutter devtools. It would be nice to get this working.

Flutter Doctor

The flutter doctor command only found 1 issue because I don't have android studio installed (not possible on Gitpod).
image

Source Code

If it helps, the source code can be found at this repo. I've checked my dart extension and it looks fine. However, my gitpod.yml and analysis_options.yaml both have 1 warning.

Gitpod Config

dart-code.dart-code extension is not synced, but not added in .gitpod.yml

Analysis Options

The include file 'package:lints/recommended.yaml' in '/home/gitpod/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_lints-2.0.1/lib/flutter.yaml' can't be found when analyzing '/workspace/flutter'.

@polina-c
Copy link
Contributor

polina-c commented Jul 3, 2023

Thanks. For app started with flutter run the options to starte DevTools are:

  1. Click DevTools URL in the output of flutter run:
Screenshot 2023-07-03 at 10 05 52 AM If you use this way, DevTools should be already connected to the app. If it is not, do you see error details in console?



  1. Run dart devtools, copy VM Service URL to the textbox, and click 'Connect'
Screenshot 2023-07-03 at 10 08 55 AM

Can you try both ways and check if there is error details in console?

May I also ask you to experiment with latest DevTools, and, if it fails, provide the error details in console: https://github.com/flutter/devtools/blob/master/BETA_TESTING.md

@intfract
Copy link
Author

intfract commented Jul 3, 2023

DevTools

I just get a blank page after running flutter run and selecting 2 for chrome. I clicked the link and waited for some time. The brave browser console (not linux terminal) showed some errors along with a Disconnected message.

main.dart.js:15698 WebSocket connection to 'ws://127.0.0.1:37565/nwxpJ58sXt8=/ws' failed:
WebSocketChannelException: WebSocket connection failed.
GET https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.12.2-src.md

I get a blank page again if I type dart devtools in the terminal.

image

It just says that I can't connect to the flutter VM service.

Other Info

Gitpod is a linux VM. This might be a problem because apparently kubernetes doesn't support VM nesting.

@polina-c
Copy link
Contributor

polina-c commented Jul 4, 2023

It seems release notes for 2.12.2 are missing: https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.12.2-src.md

It was cherrypick: #3961

@polina-c polina-c added the P2 label Jul 4, 2023
@polina-c
Copy link
Contributor

polina-c commented Jul 4, 2023

Preparing fix.

@polina-c polina-c self-assigned this Jul 4, 2023
@polina-c
Copy link
Contributor

polina-c commented Jul 4, 2023

Fix: flutter/website#8977

@intfract
Copy link
Author

intfract commented Jul 4, 2023

Do I have to update flutter devtools or has nothing changed?

@CoderDake
Copy link
Contributor

https://docs.flutter.dev/tools/devtools/release-notes/release-notes-2.12.2-src.md now has the release notes posted to it, thanks for Polina's fix.
@intfract I think that you should be able to give it a whirl without any extra effort on your part.

@polina-c
Copy link
Contributor

polina-c commented Jul 4, 2023

@intfract , things should start working now
please, reopen the issue, if not

@kenzieschmoll
Copy link
Member

The failure to load release notes should not block connection. The failure to connect to the vm service is a separate and independent issue.

@kenzieschmoll kenzieschmoll reopened this Jul 5, 2023
@kenzieschmoll kenzieschmoll added P0 critical issue (e.g. build break, regression, blocker for top-tier customer, critical tech debt) and removed P2 labels Jul 5, 2023
@kenzieschmoll
Copy link
Member

Please leave this issue open - the release notes fix did not solve the issue. The failure to connect is a separate error that we need to investigate and solve.

@kenzieschmoll kenzieschmoll reopened this Jul 10, 2023
@bernaferrari
Copy link

Sorry, I have no idea what happened. Apparently I forked flutter website and it affected this somehow. Crazy!

@polina-c polina-c removed their assignment Jul 12, 2023
@polina-c polina-c added the P1 high priority issues at the top of the work list, actively being worked on. label Jul 12, 2023
@polina-c polina-c removed the P0 critical issue (e.g. build break, regression, blocker for top-tier customer, critical tech debt) label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 high priority issues at the top of the work list, actively being worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants