{"record":{"id":"5885599b3a73c77a","repo":"hasura/graphql-engine","slug":"installation-receipt-could-not-be-stored-uninstal","errorCode":null,"errorMessage":"installation receipt could not be stored, uninstall may fail: %w","messagePattern":"installation receipt could not be stored, uninstall may fail: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/plugins/plugins.go","lineNumber":229,"sourceCode":"\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 {\n\t\tif stderrors.Is(err, fs.ErrNotExist) {\n\t\t\treturn errors.E(op, ErrIsNotInstalled)\n\t\t}\n\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"failed to look up install receipt for plugin %q: %w\", name, err),","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/plugins/plugins.go#L211-L247","documentation":"After the plugin files are installed, Install() writes a receipt (the plugin manifest JSON) to PluginInstallReceiptPath so future Uninstall/Upgrade calls know what is on disk. If StoreManifest fails (usually a filesystem write error), this error is returned. The plugin binaries are already in place, but the installation is only partially recorded, so Uninstall may not find the receipt and leave artifacts behind.","triggerScenarios":"StoreManifest failing: unwritable or missing plugins data directory, disk full, path too long, or the receipt file being a directory/read-only from a previous manual install.","commonSituations":"Plugins data dir owned by root after running the CLI with sudo once; disk exhaustion; antivirus or sync tools locking the receipt file on desktop machines; a corrupted directory structure left by an interrupted earlier install.","solutions":["Check that the plugins data directory and receipt path are writable by the current user (ls -la on the plugin data dir; chown/chmod if a previous sudo install changed ownership)","Free disk space or shorten the path if the receipt path is too long","If the receipt location is a stale directory or unreadable file, remove it manually and re-run install","After fixing, uninstall any leftover artifacts manually (rm -rf the plugin install dir) and reinstall to get a clean receipt"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"receiptPath := cfg.Paths.PluginInstallReceiptPath(plugin.Name)\nif dir := filepath.Dir(receiptPath); dirWritable(dir) {\n\t_ = cfg.Install(plugin)\n}","typeGuard":null,"tryCatchPattern":"err := cfg.Install(plugin)\nif err != nil && strings.Contains(err.Error(), \"receipt could not be stored\") {\n\t// binaries installed; record the plugin manually or clean up and retry\n\t// e.g. cfg.StoreManifest(plugin, receiptPath) after fixing perms\n}","preventionTips":["Ensure the plugins data directory is user-writable before installing","Avoid running the CLI with sudo for installs unless you always do","Treat this error as non-fatal: the plugin binary works, only uninstall tracking is at risk"],"tags":["plugins","receipt","filesystem","install"],"backgroundTag":"plugin-receipt-write-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}