Repository navigation
flutter start doesn't give good error messages when it can't find main.dart #53
Description
Activity
There isn't a "lib/main.dart" in the rendering examples. Instead, you need to use the
-toption to specify which one you want to run:$ flutter start -t render_grid.dartAssuming that works for you, we should improve the error message you get so that it's obvious what's happening.
- 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 - addedtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
on Nov 9, 2015 - 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 Yes, now that you say it, it makes sense. But reading the error message I originally thought that something must be wrong with the
ReadFileToStringfunction... I wouldn't have thought of a missing file...Yeah, we should improve the messages in two ways:
- The
fluttercommand 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.
- The
- added a commit that references this issue
on Nov 9, 2015 - added a commit that references this issue
on Dec 8, 2015 - added a commit that references this issue
on Mar 21, 2019 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 -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Sep 7, 2021 - added a commit that references this issue
on Oct 9, 2026
When I try to
flutter startany of the example programswidgets,fitnessorrenderingI 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.