{"record":{"id":"36862423af7cc212","repo":"quarkusio/quarkus","slug":"error-while-searching-for-recipe-directories-in","errorCode":null,"errorMessage":"Error while searching for recipe directories in ${startDir}","messagePattern":"Error while searching for recipe directories in (.+?)","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/update/rewrite/QuarkusUpdatesRepository.java","lineNumber":245,"sourceCode":"            Map<String, VersionUpdate> recipeDirectoryNames) {\n        return findDirsWithRecipes(rootDir).stream()\n                .map(d -> {\n                    String relativeDir = rootDir.relativize(d).toString();\n                    return resolveVersionsForRecipesDir(relativeDir, toKey(relativeDir), recipeDirectoryNames);\n                })\n                .filter(Optional::isPresent)\n                .map(Optional::get);\n    }\n\n    public static Set<Path> findDirsWithRecipes(Path startDir) {\n        try (var stream = Files.walk(startDir)) {\n            return stream\n                    .filter(Files::isRegularFile)\n                    .filter(QuarkusUpdatesRepository::isRecipeFile)\n                    .map(Path::getParent)\n                    .collect(Collectors.toSet()); // Ensures no duplicates\n        } catch (IOException e) {\n            throw new UncheckedIOException(\"Error while searching for recipe directories in \" + startDir, e);\n        }\n    }\n\n    private static String toKey(ExtensionUpdateInfo dep) {\n        return String.format(\"%s:%s\", dep.getCurrentDep().getArtifact().getGroupId(),\n                dep.getCurrentDep().getArtifact().getArtifactId());\n    }\n\n    static String toKey(String relativeDir) {\n        return relativeDir\n                .replaceAll(\"(^[/\\\\\\\\])|([/\\\\\\\\]$)\", \"\")\n                .replaceAll(\"[/\\\\\\\\]\", \":\");\n    }\n\n    static Optional<RecipeDirectory> resolveVersionsForRecipesDir(String dir, String key,\n            Map<String, VersionUpdate> recipeDirectoryNames) {\n        final Set<VersionUpdate> matches = recipeDirectoryNames.entrySet().stream()\n                .filter(e -> e.getKey().startsWith(key))","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/update/rewrite/QuarkusUpdatesRepository.java#L227-L263","documentation":"findDirsWithRecipes() walks a start directory with a stream of paths and collects parent directories of matching recipe files; if the walk itself throws IOException it throws UncheckedIOException(\"Error while searching for recipe directories in <startDir>\"). This is the outermost guard for directory-tree traversal failures, called by findRecipeDirectories.","triggerScenarios":"findDirsWithRecipes (called by findRecipeDirectories during `quarkus update`) invokes Files.walk (or similar) on startDir and the traversal throws IOException — startDir does not exist, is not readable, or traversal hits an unreadable subtree.","commonSituations":"Running `quarkus update` where the local recipes cache directory was never created or was deleted; permissions on the cache root; a broken symlink cycle or unreadable directory inside the tree; read-only/failed mount.","solutions":["Verify the start directory exists and is readable (ls the path shown in the message).","Re-create the recipes cache by re-running the update or reinstalling the update artifact.","Fix permissions on the directory tree (chmod -R u+rX).","Remove broken symlinks or unreadable subdirectories inside the tree and retry."],"exampleFix":"// shell: inspect and restore the recipes root\nls ~/.quarkus/update-recipes || mkdir -p ~/.quarkus/update-recipes\nchmod -R u+rwX ~/.quarkus/update-recipes","handlingStrategy":"try-catch","validationCode":"if (!Files.isDirectory(startDir) || !Files.isReadable(startDir)) {\n    throw new IOException(\"Recipes start directory missing or unreadable: \" + startDir);\n}","typeGuard":null,"tryCatchPattern":"try {\n    Set<Path> dirs = QuarkusUpdatesRepository.findDirsWithRecipes(startDir);\n} catch (UncheckedIOException e) {\n    log.error(\"Cannot search recipes in \" + startDir + \": \" + e.getCause(), e);\n}","preventionTips":["Verify the recipes root directory exists before running the update.","Reinstall/re-extract the update recipes if the cache directory was removed.","Fix permissions recursively (chmod -R u+rX) on the recipes tree.","Remove broken symlinks that can break the directory walk."],"tags":["io","filesystem","directory-walk"],"backgroundTag":"directory-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}