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

[BUG]: Null check operator used on a null value #373

Closed
2 tasks done
Carapacik opened this issue Mar 28, 2023 · 2 comments
Closed
2 tasks done

[BUG]: Null check operator used on a null value #373

Carapacik opened this issue Mar 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Carapacik
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Version

5.2.0

Command type

build_runner (Default)

What happened?

After flutter pub run build_runner build --delete-conflicting-outputs I run this command again and throws error:
Null check operator used on a null value
package:pub/src/package_graph.dart 64:53 PackageGraph.transitiveDependencies..
dart:core Iterable.toSet
package:pub/src/package_graph.dart 64:56 PackageGraph.transitiveDependencies.
package:pub/src/utils.dart 664:41 mapMap
package:pub/src/package_graph.dart 62:11 PackageGraph.transitiveDependencies
package:pub/src/package_graph.dart 89:12 PackageGraph.isPackageMutable
package:pub/src/executable.dart 100:33 runExecutable
package:pub/src/command/run.dart 88:26 RunCommand.runProtected
package:pub/src/command.dart 190:45 PubCommand.run.
dart:async new Future.sync
package:pub/src/utils.dart 111:12 captureErrors.wrappedCallback
dart:async runZonedGuarded
package:pub/src/utils.dart 128:5 captureErrors
package:pub/src/command.dart 190:13 PubCommand.run
package:args/command_runner.dart 212:27 CommandRunner.runCommand
package:pub/src/command_runner.dart 176:24 PubCommandRunner.runCommand
package:pub/src/command_runner.dart 161:20 PubCommandRunner.run
package:dartdev/dartdev.dart 49:47 runDartdev
/opt/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 11:9 main
This is an unexpected error. The full log and other details are collected in:

/Users/carapacik/.pub-cache/log/pub_log.txt

Consider creating an issue on https://github.com/dart-lang/pub/issues/new
and attaching the relevant parts of that log file.
pub finished with exit code 1

Attached logs below

Relevant a pubspec.yaml.

name: untitled
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
  sdk: '>=2.19.0 <3.0.0'
dependencies:
  flutter:
    sdk: flutter
  flutter_gen: ^5.2.0
  cupertino_icons: ^1.0.5

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_gen_runner: ^5.2.0
  build_runner: ^2.3.3

flutter:
  uses-material-design: true
  assets:
    - assets/images/

Relevant log output

Information about the latest pub run.

If you believe something is not working right, you can go to
https://github.com/dart-lang/pub/issues/new to post a new issue and attach this file.

Before making this file public, make sure to remove any sensitive information!

Pub version: 2.19.5
Created: 2023-03-28T19:31:32.534757
FLUTTER_ROOT: /Users/carapacik/development/flutter
PUB_HOSTED_URL: <not set>
PUB_CACHE: "/Users/carapacik/.pub-cache"
Command: dart pub build_runner build --delete-conflicting-outputs
Platform: macos

---- /Users/carapacik/StudioProjects/untitled1/pubspec.yaml ----
name: untitled
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
  sdk: '>=2.19.0 <3.0.0'
dependencies:
  flutter:
    sdk: flutter
  flutter_gen: ^5.2.0
  cupertino_icons: ^1.0.5

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_gen_runner: ^5.2.0
  build_runner: ^2.3.3

flutter:
  uses-material-design: true
  assets:
    - assets/images/

---- End pubspec.yaml ----
---- /Users/carapacik/StudioProjects/untitled1/pubspec.lock ----
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  _fe_analyzer_shared:
    dependency: transitive
    description:
      name: _fe_analyzer_shared
      sha256: a36ec4843dc30ea6bf652bf25e3448db6c5e8bcf4aa55f063a5d1dad216d8214
      url: "https://pub.dev"
    source: hosted
    version: "58.0.0"
  analyzer:
    dependency: transitive
    description:
      name: analyzer
      sha256: cc4242565347e98424ce9945c819c192ec0838cb9d1f6aa4a97cc96becbc5b27
      url: "https://pub.dev"
    source: hosted
    version: "5.10.0"
  args:
    dependency: transitive
    description:
      name: args
      sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
      url: "https://pub.dev"
    source: hosted
    version: "2.4.0"
  async:
    dependency: transitive
    description:
      name: async
      sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
      url: "https://pub.dev"
    source: hosted
    version: "2.10.0"
  boolean_selector:
    dependency: transitive
    description:
      name: boolean_selector
      sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.1"
  build:
    dependency: transitive
    description:
      name: build
      sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777"
      url: "https://pub.dev"
    source: hosted
    version: "2.3.1"
  build_config:
    dependency: transitive
    description:
      name: build_config
      sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
      url: "https://pub.dev"
    source: hosted
    version: "1.1.1"
  build_daemon:
    dependency: transitive
    description:
      name: build_daemon
      sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.1"
  build_resolvers:
    dependency: transitive
    description:
      name: build_resolvers
      sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95
      url: "https://pub.dev"
    source: hosted
    version: "2.2.0"
  build_runner:
    dependency: "direct dev"
    description:
      name: build_runner
      sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727
      url: "https://pub.dev"
    source: hosted
    version: "2.3.3"
  build_runner_core:
    dependency: transitive
    description:
      name: build_runner_core
    [...]ive
    description:
      name: string_scanner
      sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.0"
  term_glyph:
    dependency: transitive
    description:
      name: term_glyph
      sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
      url: "https://pub.dev"
    source: hosted
    version: "1.2.1"
  test_api:
    dependency: transitive
    description:
      name: test_api
      sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
      url: "https://pub.dev"
    source: hosted
    version: "0.4.16"
  time:
    dependency: transitive
    description:
      name: time
      sha256: "83427e11d9072e038364a5e4da559e85869b227cf699a541be0da74f14140124"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.3"
  timing:
    dependency: transitive
    description:
      name: timing
      sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.1"
  typed_data:
    dependency: transitive
    description:
      name: typed_data
      sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
      url: "https://pub.dev"
    source: hosted
    version: "1.3.1"
  vector_math:
    dependency: transitive
    description:
      name: vector_math
      sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.4"
  watcher:
    dependency: transitive
    description:
      name: watcher
      sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.2"
  web_socket_channel:
    dependency: transitive
    description:
      name: web_socket_channel
      sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b
      url: "https://pub.dev"
    source: hosted
    version: "2.3.0"
  xml:
    dependency: transitive
    description:
      name: xml
      sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
      url: "https://pub.dev"
    source: hosted
    version: "6.2.2"
  yaml:
    dependency: transitive
    description:
      name: yaml
      sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.1"
sdks:
  dart: ">=2.19.0 <3.0.0"

---- End pubspec.lock ----
---- Log transcript ----
FINE: Pub 2.19.5
ERR : Null check operator used on a null value
FINE: Exception type: _CastError
ERR : package:pub/src/package_graph.dart 64:53               PackageGraph.transitiveDependencies.<fn>.<fn>
    | dart:core                                              Iterable.toSet
    | package:pub/src/package_graph.dart 64:56               PackageGraph.transitiveDependencies.<fn>
    | package:pub/src/utils.dart 664:41                      mapMap
    | package:pub/src/package_graph.dart 62:11               PackageGraph.transitiveDependencies
    | package:pub/src/package_graph.dart 89:12               PackageGraph.isPackageMutable
    | package:pub/src/executable.dart 100:33                 runExecutable
    | package:pub/src/command/run.dart 88:26                 RunCommand.runProtected
    | package:pub/src/command.dart 190:45                    PubCommand.run.<fn>
    | dart:async                                             new Future.sync
    | package:pub/src/utils.dart 111:12                      captureErrors.wrappedCallback
    | dart:async                                             runZonedGuarded
    | package:pub/src/utils.dart 128:5                       captureErrors
    | package:pub/src/command.dart 190:13                    PubCommand.run
    | package:args/command_runner.dart 212:27                CommandRunner.runCommand
    | package:pub/src/command_runner.dart 176:24             PubCommandRunner.runCommand
    | package:pub/src/command_runner.dart 161:20             PubCommandRunner.run
    | package:dartdev/dartdev.dart 49:47                     runDartdev
    | /opt/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 11:9  main
ERR : This is an unexpected error. The full log and other details are collected in:
    | 
    |     /Users/carapacik/.pub-cache/log/pub_log.txt
    | 
    | Consider creating an issue on https://github.com/dart-lang/pub/issues/new
    | and attaching the relevant parts of that log file.
---- End log transcript ----

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Carapacik Carapacik added the bug Something isn't working label Mar 28, 2023
@MuhammedKpln
Copy link

dart-lang/pub#3314 (comment)

Here is why it conflicts.

@wasabeef
Copy link
Member

@Carapacik @MuhammedKpln

dependencies:
  flutter:
    sdk: flutter
  # flutter_gen: ^5.2.0  ←←←←←←←←←←←←←←←←←←←←←←←←←←←←← NOT needed
  cupertino_icons: ^1.0.5

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_gen_runner: ^5.2.0 #   ←←←←←←←←←←←←←←←←←←←←←←←←← Needed
  build_runner: ^2.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants