{"id":"3c16f8e728eb415b","repo":"docker/cli","slug":"error-reading-plugin-data-w","errorCode":null,"errorMessage":"error reading plugin data: %w","messagePattern":"error reading plugin data: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/plugin/upgrade.go","lineNumber":47,"sourceCode":"\t\t},\n\t\tAnnotations:           map[string]string{\"version\": \"1.26\"},\n\t\tValidArgsFunction:     completeNames(dockerCLI, stateAny), // TODO(thaJeztah): should only complete for the first arg\n\t\tDisableFlagsInUseLine: true,\n\t}\n\n\tflags := cmd.Flags()\n\tflags.BoolVar(&options.grantPerms, \"grant-all-permissions\", false, \"Grant all permissions necessary to run the plugin\")\n\t// TODO(thaJeztah): DEPRECATED: remove in v29.1 or v30\n\tflags.Bool(\"disable-content-trust\", true, \"Skip image verification (deprecated)\")\n\t_ = flags.MarkDeprecated(\"disable-content-trust\", \"support for docker content trust was removed\")\n\tflags.BoolVar(&options.skipRemoteCheck, \"skip-remote-check\", false, \"Do not check if specified remote plugin matches existing plugin image\")\n\treturn cmd\n}\n\nfunc runUpgrade(ctx context.Context, dockerCLI command.Cli, opts pluginOptions) error {\n\tres, err := dockerCLI.Client().PluginInspect(ctx, opts.localName, client.PluginInspectOptions{})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error reading plugin data: %w\", err)\n\t}\n\n\tif res.Plugin.Enabled {\n\t\treturn errors.New(\"the plugin must be disabled before upgrading\")\n\t}\n\n\topts.localName = res.Plugin.Name\n\tif opts.remote == \"\" {\n\t\topts.remote = res.Plugin.PluginReference\n\t}\n\tremote, err := reference.ParseNormalizedNamed(opts.remote)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error parsing remote upgrade image reference: %w\", err)\n\t}\n\tremote = reference.TagNameOnly(remote)\n\n\told, err := reference.ParseNormalizedNamed(res.Plugin.PluginReference)\n\tif err != nil {","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/plugin/upgrade.go#L29-L65","documentation":"Error \"error reading plugin data: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/plugin/upgrade.go:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}