Skip to content

flutter start doesn't give good error messages when it can't find main.dart #53

Description

@DavidMihola

When I try to flutter start any of the example programs widgets, fitness or rendering I get an error like the following:

Downloading Sky Snapshot from the cloud, one moment please...
Downloading Sky Shell from the cloud, one moment please...
[1108/213053:FATAL:loader.cc(21)] Check failed: base::ReadFileToString(path, &source). /home/dmta/flutter/flutter/examples/rendering/./lib/main.dart

The other examples I have tried worked fine.

Activity

  1. abarth commented on Nov 9, 2015

    @abarth
    Contributor

    There isn't a "lib/main.dart" in the rendering examples. Instead, you need to use the -t option to specify which one you want to run:

    $ flutter start -t render_grid.dart
    

    Assuming that works for you, we should improve the error message you get so that it's obvious what's happening.

  2. changed the title [-]Check failed: base::ReadFileToString(path, &source). [/-] [+]flutter start doesn't give good error messages when it can't find main.dart[/+] on Nov 9, 2015
  3. changed the title [-]flutter start doesn't give good error messages when it can't find main.dart[/-] [+]`flutter start` doesn't give good error messages when it can't find main.dart[/+] on Nov 9, 2015
  4. DavidMihola commented on Nov 9, 2015

    @DavidMihola
    Author

    Yes, now that you say it, it makes sense. But reading the error message I originally thought that something must be wrong with the ReadFileToString function... I wouldn't have thought of a missing file...

  5. abarth commented on Nov 9, 2015

    @abarth
    Contributor

    Yeah, we should improve the messages in two ways:

    • The flutter command should check whether the target exists and print a useful message if it doesn't.
    • When the snapshotter gets into trouble, it should print sensible messages instead of acting like it crashed unexpectedly.
  6. self-assigned this
    on Nov 9, 2015
  7. added a commit that references this issue on Nov 9, 2015
  8. added a commit that references this issue on Dec 8, 2015
    9bc6454
  9. github-actions commented on Sep 7, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

toolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions