{"record":{"id":"10e88b5071d01883","repo":"quarkusio/quarkus","slug":"unable-to-list-platforms","errorCode":null,"errorMessage":"Unable to list platforms","messagePattern":"Unable to list platforms","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusListPlatforms.java","lineNumber":49,"sourceCode":"    @TaskAction\n    public void listExtensions() {\n        getLogger().info(\"\");\n        if (installed) {\n            getLogger().info(\"Imported Quarkus platforms:\");\n            importedPlatforms().forEach(coords -> {\n                final StringBuilder buf = new StringBuilder();\n                buf.append(coords.getGroupId()).append(\":\")\n                        .append(coords.getArtifactId().substring(0,\n                                coords.getArtifactId().length() - Constants.PLATFORM_DESCRIPTOR_ARTIFACT_ID_SUFFIX.length()))\n                        .append(\"::pom:\").append(coords.getVersion());\n                messageWriter().info(buf.toString());\n            });\n        } else {\n            getLogger().info(\"Available Quarkus platforms:\");\n            try {\n                new ListPlatforms(getQuarkusProject(installed)).execute();\n            } catch (Exception e) {\n                throw new GradleException(\"Unable to list platforms\", e);\n            }\n        }\n        getLogger().info(\"\");\n    }\n}\n","sourceCodeStart":31,"sourceCodeEnd":55,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusListPlatforms.java#L31-L55","documentation":"The QuarkusListPlatforms Gradle task (./gradlew listPlatforms) uses the ListPlatforms tool to print the Quarkus platforms imported into the project or available in the registry. Any Exception thrown by ListPlatforms.execute() is wrapped in this GradleException, indicating platform metadata could not be collected.","triggerScenarios":"Running ./gradlew listPlatforms when ListPlatforms.execute() throws: failure resolving imported platforms from the application model or contacting the extension registry; raised in QuarkusListPlatforms.listExtensions.","commonSituations":"No platforms declared in the project (unexpected state) combined with registry unavailability; broken platform versions in the BOM; network/proxy restrictions; corrupted caches holding stale platform metadata.","solutions":["Run ./gradlew listPlatforms --stacktrace to see the wrapped cause.","Verify the enforcedPlatform/quarkus-bom declaration and its version.","Check connectivity to registry.quarkus.io and set proxy system properties if needed.","Clear Gradle caches of io.quarkus.platform entries and re-resolve with --refresh-dependencies.","If platforms are intentional, list extensions instead to confirm what is imported."],"exampleFix":"// before\n./gradlew listPlatforms\n// after: diagnose root cause\n./gradlew listPlatforms --stacktrace --info","handlingStrategy":"retry","validationCode":"// Ensure at least one platform is imported and registry is reachable\n./gradlew dependencies --configuration runtimeClasspath | grep quarkus-bom\ncurl -fsSL https://registry.quarkus.io/ > /dev/null && echo reachable","typeGuard":null,"tryCatchPattern":"try {\n  ./gradlew listPlatforms\n} catch (GradleException e) {\n  if (e.getMessage().equals(\"Unable to list platforms\")) {\n    // view wrapped cause with --stacktrace; verify BOM/network, clear stale platform cache entries, retry\n  }\n}","preventionTips":["Declare enforcedPlatform(io.quarkus.platform:quarkus-bom) explicitly.","Purge io.quarkus.platform cache entries after force-upgrading platforms.","Verify TLS trust for corporate proxies intercepting registry traffic.","Use ./gradlew --stacktrace routinely on Quarkus CLI tasks to surface wrapped causes."],"tags":["gradle","network","platforms","quarkus-cli"],"backgroundTag":"extension-catalog-resolution-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}