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

Pick the right observatory when multiple are available #2722

Open
xster opened this issue Aug 14, 2020 · 6 comments
Open

Pick the right observatory when multiple are available #2722

xster opened this issue Aug 14, 2020 · 6 comments
Labels
upstream in dart / flutter Needs changing in Dart or Flutter
Milestone

Comments

@xster
Copy link

xster commented Aug 14, 2020

Sometimes when I attach to the selected device, I get

Screen Shot 2020-08-14 at 4 50 46 PM

But theoretically, VSCode should know what the currently open project's app id should be and should just send it along.

@DanTup
Copy link
Member

DanTup commented Aug 26, 2020

How do you get into the state where this happens?

Where do these IDs come from? Are they the same for each version of the app, or different for each platform?

VS Code doesn't currently know anything about the file structure of the native apps, so if they're in there I don't think we should go fishing for them. Maybe it would be better if there was a JSON version of this error (in --machine mode) that lets the editor present the options to the user and have them click them.

@jonahwilliams what do you think?

We already have some daemon-to-client requests (for expose-url) so we could potentially do something like that too (rather than terminating, just ask the client to make a choice and then continue when it responds).

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Aug 26, 2020
@xster
Copy link
Author

xster commented Aug 27, 2020

I think it was just from running one Flutter app, not closing the app (such as launching from CLI then detach). Repeat for a second app. Then go to VSCode for one of the projects and attach to Flutter on device.

@github-actions
Copy link

This issue has been marked stale because it is tagged awaiting-info for 30 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days.

@github-actions github-actions bot added the stale Will be closed soon if no response. label Sep 27, 2020
@DanTup
Copy link
Member

DanTup commented Sep 28, 2020

Perhaps another simpler option here would be for flutter attach to automatically use the "current app" if it's been executed from within a project folder (or have a flag to do so)? That way the editor still doesn't need to know any of the platform-specific stuff, and Flutter presumably has easy access and knowledge to get the ID for the project?

@DanTup DanTup removed the stale Will be closed soon if no response. label Sep 28, 2020
@jonahwilliams
Copy link

The tool could try and determine whether their is a usable identifier in the current project.

If a terminal attached, we could prompt with the default being the detected project if found. If there is no terminal we can select the detected project, or exit if no project was detected.

WDUT?

@DanTup
Copy link
Member

DanTup commented Sep 29, 2020

Yeah, that sounds good to me. I'm not sure how to do it though - I'm guessing this is iOS-only (from searching for the error) and probably starts with passing flutterProject in to here? I couldn't see an obvious way to find the ID for the project though (if it'd by easier for you to do it than explain, feel free 😄).

@DanTup DanTup added upstream in dart / flutter Needs changing in Dart or Flutter and removed awaiting info Requires more information from the customer to progress labels Sep 29, 2020
@DanTup DanTup added this to the v3.16.0 milestone Sep 29, 2020
@DanTup DanTup modified the milestones: v3.16.0, v3.17.0 Oct 21, 2020
@DanTup DanTup modified the milestones: v3.17.0, v3.18.0 Nov 30, 2020
@DanTup DanTup modified the milestones: v3.18.0, v3.19.0 Dec 17, 2020
@DanTup DanTup modified the milestones: v3.19.0, Backlog Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream in dart / flutter Needs changing in Dart or Flutter
Projects
None yet
Development

No branches or pull requests

3 participants