{"record":{"id":"7b07b3906f9d64fd","repo":"getgrav/grav","slug":"the-cache-gpm-folder-is-not-writable-please-check","errorCode":null,"errorMessage":"The cache/gpm folder is not writable. Please check the folder permissions.","messagePattern":"The cache/gpm folder is not writable\\. Please check the folder permissions\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Common/GPM/GPM.php","lineNumber":684,"sourceCode":"     * @param  string $search Can be either the slug or the name\n     * @param  bool $ignore_exception True if should not fire an exception (for use in Twig)\n     * @return Remote\\Package|false Package if found, FALSE if not\n     */\n    public function findPackage($search, $ignore_exception = false)\n    {\n        $search = strtolower($search);\n\n        $found = $this->getRepositoryPlugin($search) ?? $this->getRepositoryTheme($search);\n        if ($found) {\n            return $found;\n        }\n\n        $themes = $this->getRepositoryThemes();\n        $plugins = $this->getRepositoryPlugins();\n\n        if (null === $themes || null === $plugins) {\n            if (!is_writable(GRAV_ROOT . '/cache/gpm')) {\n                throw new RuntimeException('The cache/gpm folder is not writable. Please check the folder permissions.');\n            }\n\n            if ($ignore_exception) {\n                return false;\n            }\n\n            throw new RuntimeException('GPM not reachable. Please check your internet connection or check the Grav site is reachable');\n        }\n\n        foreach ($themes as $slug => $theme) {\n            if ($search === $slug || $search === $theme->name) {\n                return $theme;\n            }\n        }\n\n        foreach ($plugins as $slug => $plugin) {\n            if ($search === $slug || $search === $plugin->name) {\n                return $plugin;","sourceCodeStart":666,"sourceCodeEnd":702,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Common/GPM/GPM.php#L666-L702","documentation":"Error \"The cache/gpm folder is not writable. Please check the folder permissions.\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Common/GPM/GPM.php:684 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}