Skip to content

hard to parse error if flutter.yaml points to a file that doesn't exist. #296

Closed

Description

@sethladd

Here's the flutter.yaml:

assets:
  - assets/sprites.json
  - assets/sprites.png
  - assets/test.json

Here's the error:

[/Users/sethladd/Downloads/px_template 2] flutter start
The null object does not have a getter 'compress'.

NoSuchMethodError: method not found: 'compress'
Receiver: null
Arguments: []
severe: 
Exception:
dart:core                                                       Object.noSuchMethod
package:archive/src/zip_encoder.dart 36                         ZipEncoder.encode
package:sky_tools/src/commands/build.dart 210                   BuildCommand.build.<async>
dart:async                                                      _Completer.completeError
package:sky_tools/src/commands/build.dart 220                   BuildCommand.build.<async>
dart:async                                                      _asyncThenWrapperHelper
package:sky_tools/src/commands/build.dart                       BuildCommand.build
package:sky_tools/src/commands/build.dart 160                   BuildCommand.buildInTempDir.<async>
dart:async                                                      _asyncThenWrapperHelper
package:sky_tools/src/commands/build.dart                       BuildCommand.buildInTempDir
package:sky_tools/src/commands/start.dart 80                    StartCommand.runInProject.<async>
dart:async                                                      _asyncThenWrapperHelper
package:sky_tools/src/commands/start.dart                       StartCommand.runInProject

The error is: I don't have a assets/test.json in my project.

Maybe we can update the error message to indicate which file didn't exist?

Thanks for taking a look!

Activity

  1. self-assigned this
    on Nov 18, 2015
  2. added a commit that references this issue on Nov 18, 2015
    7b75d15
  3. 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.

  4. 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