Skip to content

Update 'flutter screenshot' to fail better if a device doesn't support screenshots #35490

@liyuqian

Description

@liyuqian

I'm using Flutter master branch version 1a374d8, and the following error happened although the flutter device does show a connected Moto G4 device:

liyuqian@liyuqian:~/Downloads$ flutter devices
3 connected devices:

Moto G 4 • ZY2245H6KS • android-arm    • Android 7.0 (API 24)
Linux    • Linux      • linux-x64      • Linux
Chrome   • chrome     • web-javascript • Google Chrome 75.0.3770.100 

liyuqian@liyuqian:~/Downloads$ flutter screenshot
No supported devices connected.
Must have a connected device
liyuqian@liyuqian:~/Downloads$ flutter screenshot --type=skia --observatory-uri=http://127.0.0.1:35603/atA841bQWXA=/
No supported devices connected.
Must have a connected device

The app that I ran is

liyuqian@liyuqian:~/flutter/flutter/dev/benchmarks/macrobenchmarks$ flutter run --profile
Initializing gradle...                                              0.7s
Resolving dependencies...                                           1.3s
Launching lib/main.dart on Moto G 4 in profile mode...
Running Gradle task 'assembleProfile'...                                
Running Gradle task 'assembleProfile'... Done                       1.2s
Built build/app/outputs/apk/profile/app-profile.apk (8.0MB).

An Observatory debugger and profiler on Moto G 4 is available at http://127.0.0.1:35603/atA841bQWXA=/
For a more detailed help message, press "h". To quit, press "q".

This blocks fixing a P0 bug for a Google's internal client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: qualityA truly polished experiencec: new featureNothing broken; request for a new capabilitycustomer: dream (g3)team-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions