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

Null-exception in _getAdvisories.readAdvisoriesFromCache #4335

Open
OkotReagan opened this issue Jul 30, 2024 · 2 comments
Open

Null-exception in _getAdvisories.readAdvisoriesFromCache #4335

OkotReagan opened this issue Jul 30, 2024 · 2 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@OkotReagan
Copy link

pub_log.txt

@sigurdm
Copy link
Contributor

sigurdm commented Jul 30, 2024

First I thought this was the same as #4329. But no - this seems to be an unrelated issue with fetching advisories.

cc @szakarias

@sigurdm sigurdm added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jul 30, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Jul 30, 2024

@OkotReagan do you have more details about what triggered this? Is this persistent?

Relevant from the logs:

Command: dart pub --suppress-analytics get --example --directory '.'

Stacktrace:

package:pub/src/source/hosted.dart 773:33              HostedSource._getAdvisories.readAdvisoriesFromCache
    | ===== asynchronous gap ===========================
    | package:pub/src/source/hosted.dart 791:12              HostedSource._getAdvisories
    | ===== asynchronous gap ===========================
    | package:pub/src/source/hosted.dart 1079:24             HostedSource.getAdvisoriesForPackageVersion
    | ===== asynchronous gap ===========================
    | package:pub/src/solver/report.dart 414:26              SolveReport._reportPackage
    | ===== asynchronous gap ===========================
    | package:pub/src/solver/report.dart 218:18              SolveReport._reportChanges
    | ===== asynchronous gap ===========================
    | package:pub/src/solver/report.dart 73:21               SolveReport.show
    | ===== asynchronous gap ===========================
    | package:pub/src/entrypoint.dart 568:5                  Entrypoint.acquireDependencies
    | ===== asynchronous gap ===========================
    | package:pub/src/command/get.dart 77:5                  GetCommand.runProtected
    | ===== asynchronous gap ===========================
    | package:pub/src/command.dart 196:7                     PubCommand.run
    | ===== asynchronous gap ===========================
    | package:args/command_runner.dart 212:13                CommandRunner.runCommand
    | ===== asynchronous gap ===========================
    | package:dartdev/dartdev.dart 232:18                    DartdevRunner.runCommand
    | ===== asynchronous gap ===========================
    | package:dartdev/dartdev.dart 46:16                     runDartdev
    | ===== asynchronous gap ===========================
    | C:\b\s\w\ir\x\w\sdk\pkg\dartdev\bin\dartdev.dart 13:5  main

Seems package archive failed to download after 7 retries...

IO  : Get versions from https://pub.dev/api/packages/archive.
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4
IO  : Attempt #2 for fetching versions for "archive" from "https://pub.dev/api/packages/archive"
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4
IO  : Attempt #3 for fetching versions for "archive" from "https://pub.dev/api/packages/archive"
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4
IO  : Attempt #4 for fetching versions for "archive" from "https://pub.dev/api/packages/archive"
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4
IO  : Attempt #5 for fetching versions for "archive" from "https://pub.dev/api/packages/archive"
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4
IO  : Attempt #6 for fetching versions for "archive" from "https://pub.dev/api/packages/archive"
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4
IO  : Attempt #7 for fetching versions for "archive" from "https://pub.dev/api/packages/archive"
IO  : HTTP GET https://pub.dev/api/packages/archive
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: get
    | X-Pub-Session-ID: 21635E07-49CD-46FE-8914-B931DCD248EE
    | X-Pub-Environment: flutter_cli:get
    | user-agent: Dart pub 3.4.4

@sigurdm sigurdm changed the title Pub get errors in vs code Null-exception in _getAdvisories.readAdvisoriesFromCache Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants