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

For web apps, Web-Server is picked over Chrome by default #2453

Closed
DanTup opened this issue May 13, 2020 · 3 comments
Closed

For web apps, Web-Server is picked over Chrome by default #2453

DanTup opened this issue May 13, 2020 · 3 comments
Labels
in flutter Relates to running Flutter apps is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented May 13, 2020

Not sure if this changed recently, but for web apps when there's only Chrome + Web Server, it seems to default to Web Server which is not what most people want.

We can handle this with an exclusion in Dart-Code, though I wonder if it's worth addressing in Flutter. We currently have an ephemeral boolean that lets us prefer devices that are explicitly connected, but maybe there should also (or instead) be a priority, and we only switch if the newly connected device is >= the priority of the current device? (@jonahwilliams)

@DanTup DanTup added is bug in flutter Relates to running Flutter apps labels May 13, 2020
@DanTup DanTup added this to the v3.11.0 milestone May 13, 2020
@jonahwilliams
Copy link

Is the order of returned devices used? It's not great, but I can document and test this

@DanTup
Copy link
Member Author

DanTup commented May 13, 2020

Yeah, right now they come through in this order:

[12:17:39 PM] [FlutterDaemon] [Info] <== [{"event":"device.added","params":{"id":"web-server","name":"Web Server","platform":"web-javascript","emulator":false,"category":"web","platformType":"web","ephemeral":false,"emulatorId":null}}]
[12:17:39 PM] [FlutterDaemon] [Info] <== [{"event":"device.added","params":{"id":"chrome","name":"Chrome","platform":"web-javascript","emulator":false,"category":"web","platformType":"web","ephemeral":false,"emulatorId":null}}]

When the first device comes through (web-server), we select it because we don't have any other device. When the second device (Chrome) comes through, we do not select it because we already have a selected device and the new device is not marked ephemeral.

@DanTup
Copy link
Member Author

DanTup commented May 13, 2020

I've put specific handling in here for allowing Chrome to override Web-Server when it's added. If we get something better in Flutter, I can remove it in future - but since a Flutter stable release with any change is likely some way off, having it in the next release here seems worthwhile.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in flutter Relates to running Flutter apps is bug
Projects
None yet
Development

No branches or pull requests

2 participants