{"record":{"id":"967dbb980b496437","repo":"hasura/graphql-engine","slug":"install-failed-w","errorCode":null,"errorMessage":"install failed: %w","messagePattern":"install failed: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/plugins/plugins.go","lineNumber":222,"sourceCode":"\tvar op errors.Op = \"plugins.Config.Install\"\n\t// Find available installation platform\n\tplatform, ok, err := MatchPlatform(plugin.Platforms)\n\tif err != nil {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"failed trying to find a matching platform in plugin spec: %w\", err),\n\t\t)\n\t}\n\n\tif !ok {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"plugin %q does not offer installation for this platform\", plugin.Name),\n\t\t)\n\t}\n\n\tif err := c.installPlugin(plugin, platform); err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"install failed: %w\", err))\n\t}\n\n\terr = c.StoreManifest(plugin, c.Paths.PluginInstallReceiptPath(plugin.Name))\n\tif err != nil {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"installation receipt could not be stored, uninstall may fail: %w\", err),\n\t\t)\n\t}\n\n\treturn nil\n}\n\n// Uninstall will uninstall a plugin.\nfunc (c *Config) Uninstall(name string) error {\n\tvar op errors.Op = \"plugins.Config.Uninstall\"\n\n\tif _, err := c.LoadManifest(c.Paths.PluginInstallReceiptPath(name)); err != nil {","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/plugins/plugins.go#L204-L240","documentation":"This is a wrapper error: Install() delegates the actual download/extract/link work to the private installPlugin() and any failure there (staging dir creation, download/extract, moving files, absolute-path resolution, or symlink creation) is re-wrapped as \"install failed: %w\". The real cause is in the chained error text; this message only tells you the failure happened during the installation phase.","triggerScenarios":"Any failure inside installPlugin: network error or checksum mismatch during downloadAndExtract, permission denied creating the staging dir under the download path, failure moving files into the versioned install directory, or failure symlinking the binary into the bin path.","commonSituations":"Corporate proxy blocking the artifact download; sha256 mismatch because the manifest points at a stale artifact URL; read-only or root-owned plugin directories from a previous sudo install; disk full during extraction.","solutions":["Read the wrapped error after the colon to identify the actual failing step (download, staging dir, move, or symlink)","If it is a download/checksum failure, verify platform.URI is reachable and platform.Sha256 matches the artifact currently at that URL","If it is a permissions failure, fix ownership of the plugin download/install/bin directories (e.g. rm -rf the stale dir or chown it) and avoid mixing sudo and non-sudo installs","Retry after clearing the staging directory (the plugins download cache dir) in case of a corrupted partial download"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := cfg.Install(plugin); err != nil {\n\tvar inner error\n\tif errors.As(err, &inner) { /* inspect wrapped cause */ }\n\tswitch {\n\tcase strings.Contains(err.Error(), \"unpack into staging\"):\n\t\t// network/checksum: retry after clearing cache\n\tdefault:\n\t\t// permissions/fs: repair directories then retry\n\t}\n}","preventionTips":["Pre-check writability of download, install, and bin directories before installing","Verify artifact URLs and checksums are current before invoking Install","Run installs consistently as the same user to avoid mixed-ownership directories"],"tags":["plugins","install","wrapped-error","download"],"backgroundTag":"plugin-install-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}