dart-lang / pub

The pub command line tool
https://dart.dev/tools/pub/cmd
BSD 3-Clause "New" or "Revised" License
1.04k stars 227 forks source link

This is an unexpected error. #3851

Closed abinvs-2019 closed 11 months ago

abinvs-2019 commented 1 year ago
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.2
Created: 2023-03-28T10:19:54.621883
FLUTTER_ROOT: C:\Users\S2\flutter_windows_3.7.3-stable\flutter
PUB_HOSTED_URL: <not set>
PUB_CACHE: "C:\Users\S2\AppData\Local\Pub\Cache"
Command: dart pub build_runner watch --delete-conflicting-outputs
Platform: windows

---- C:\Users\S2\Desktop\alpha_q_flutter\pubspec.yaml ----
name: alpha_q
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
  sdk: '>=2.19.2 <3.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2

  #StateManagement
  flutter_bloc: ^8.1.1
  freezed_annotation: ^2.1.0

  #Router
  go_router: ^6.2.0

  #Ui
  flutter_screenutil: ^5.7.0
  awesome_bottom_bar: ^1.2.2
  carousel_slider: ^4.2.1
  pin_code_fields: ^7.4.0
  percent_indicator: ^4.2.3
  fluttertoast: ^8.2.1
  parallax_rain: ^1.1.0
  flutter_advanced_switch: ^3.0.1
  flutter_svg: ^2.0.4
  dropdown_textfield: ^1.0.8

  #Di
  get_it: ^7.2.0
  injectable: ^2.1.0
  json_serializable: ^6.4.1

  #Remote
  firebase_core: ^2.8.0
  firebase_dy[...]lugin: ^2.0.1
  socket_io_client: ^2.0.0

  #Dev
  dartz: ^0.10.1
  dio: ^5.0.2
  http: ^0.13.5
  connectivity_plus: ^3.0.3
  pretty_dio_logger: ^1.3.1

  #Local Storage
  shared_preferences: ^2.0.15
  hive: ^2.2.3
  hive_flutter: ^1.1.0

dev_dependencies:
  flutter_test:
    sdk: flutter

  build_runner: ^2.2.1
  freezed: ^2.1.0+1
  injectable_generator: ^2.1.3

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: DMSans
      fonts:
        - asset: fonts/DMSans-Bold.ttf
        - asset: fonts/DMSans-BoldItalic.ttf
        - asset: fonts/DMSans-Italic.ttf
        - asset: fonts/DMSans-Medium.ttf
        - asset: fonts/DMSans-MediumItalic.ttf
        - asset: fonts/DMSans-Regular.ttf
          # style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

---- End pubspec.yaml ----
---- C:\Users\S2\Desktop\alpha_q_flutter\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: "503361166f4a100e0d7eb7fb5a62c6f0322512f2bcb48d6922caf98f24b0ab90"
      url: "https://pub.dev"
    source: hosted
    version: "56.0.0"
  _flutterfire_internals:
    dependency: transitive
    description:
      name: _flutterfire_internals
      sha256: "330d7fcbb72624f5b6d374af8b059b0ef4ba96ba5b8987f874964a1287eb617d"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.18"
  analyzer:
    dependency: transitive
    description:
      name: analyzer
      sha256: "93fcd81a6716e69864516750590cf1e699420615046bda19100238aa7b429785"
      url: "https://pub.dev"
    source: hosted
    version: "5.8.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"
  awesome_bottom_bar:
    dependency: "direct main"
    description:
      name: awesome_bottom_bar
      sha256: c616431b1ba4ef31c07ab77887ec24390b4bcaf74dd341444ca66e7f5d504b56
      url: "https://pub.dev"
    source: hosted
    version: "1.2.2"
  bloc:
    dependency: transitive
    description:
      name: bloc
      sha256: "658a5ae59edcf1e58aac98b000a71c762ad8f46f1394c34a52050cafb3e11a80"
      url: "https://pub.dev"
    source: hosted
    version: "8.1.1"
  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"
[...]706206
      url: "https://pub.dev"
    source: hosted
    version: "0.4.16"
  timezone:
    dependency: transitive
    description:
      name: timezone
      sha256: "24c8fcdd49a805d95777a39064862133ff816ebfffe0ceff110fb5960e557964"
      url: "https://pub.dev"
    source: hosted
    version: "0.9.1"
  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"
  win32:
    dependency: transitive
    description:
      name: win32
      sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
      url: "https://pub.dev"
    source: hosted
    version: "3.1.3"
  xdg_directories:
    dependency: transitive
    description:
      name: xdg_directories
      sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86
      url: "https://pub.dev"
    source: hosted
    version: "0.2.0+3"
  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.2 <3.0.0"
  flutter: ">=3.3.0"

---- End pubspec.lock ----
---- Log transcript ----
FINE: Pub 2.19.2
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
    | C:\b\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:
    | 
    |     C:\Users\S2\AppData\Local\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 ----
abinvs-2019 commented 1 year ago

I got this issue fixed by: flutter clean flutter pub get flutter pub run build_runner ....

sigurdm commented 1 year ago

We should still try to understand what caused pub to crash here.

abinvs-2019 commented 1 year ago

We should still try to understand what caused pub to crash here.

Yes, i can provide more info if need from my side.

sigurdm commented 1 year ago

Yes, i can provide more info if need from my side.

If you can somehow show how to reproduce this reliably it would be a great help!

abinvs-2019 commented 1 year ago

I have no idea why this occured, i was a sudden effect.

sigurdm commented 11 months ago

Closing this for now as we need more information to go on. Please reopen if you can reproduce.