{"record":{"id":"2e63124ff9f79fdc","repo":"SonarSource/sonarqube","slug":"this-ws-is-unsupported-in-commercial-edition-plea","errorCode":null,"errorMessage":"This WS is unsupported in commercial edition. Please install plugin manually.","messagePattern":"This WS is unsupported in commercial edition\\. Please install plugin manually\\.","errorType":"http","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstallAction.java","lineNumber":101,"sourceCode":"  @Override\n  public void handle(Request request, Response response) throws Exception {\n    userSession.checkIsSystemAdministrator();\n    checkEdition();\n\n    if (!hasPluginInstallConsent()) {\n      throw new IllegalArgumentException(\"Can't install plugin without accepting firstly plugins risk consent\");\n    }\n\n    String key = request.mandatoryParam(PARAM_KEY);\n    PluginUpdate pluginUpdate = findAvailablePluginByKey(key);\n    pluginDownloader.download(key, pluginUpdate.getRelease().getVersion());\n    response.noContent();\n  }\n\n  private void checkEdition() {\n    Edition edition = editionProvider.get().orElse(Edition.COMMUNITY);\n    if (!Edition.COMMUNITY.equals(edition)) {\n      throw new IllegalArgumentException(\"This WS is unsupported in commercial edition. Please install plugin manually.\");\n    }\n  }\n\n  private boolean hasPluginInstallConsent() {\n    Optional<String> pluginRiskConsent = configuration.get(PLUGINS_RISK_CONSENT);\n    return pluginRiskConsent.filter(s -> PluginRiskConsent.valueOf(s) == PluginRiskConsent.ACCEPTED).isPresent();\n  }\n\n  private PluginUpdate findAvailablePluginByKey(String key) {\n    PluginUpdate pluginUpdate = null;\n\n    Optional<UpdateCenter> updateCenter = updateCenterFactory.getUpdateCenter(false);\n    if (updateCenter.isPresent()) {\n      pluginUpdate = updateCenter.get().findAvailablePlugins()\n        .stream()\n        .filter(Objects::nonNull)\n        .filter(u -> key.equals(u.getPlugin().getKey()))\n        .findFirst()","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstallAction.java#L83-L119","documentation":"InstallAction only supports plugin installation on Community Edition. On any commercial edition (Developer, Enterprise, Data Center) plugins are shipped bundled with the edition, so calling api/plugins/install is rejected with this IllegalArgumentException in checkEdition, invoked at the start of handle.","triggerScenarios":"POST api/plugins/install?key=<key> on a commercial edition instance (editionProvider returns any edition other than COMMUNITY); typically automation scripts reused after an organization upgraded from Community Edition.","commonSituations":"CI pipelines or provisioning scripts that installed plugins on Community Edition breaking after migration to Developer/Enterprise Edition; operators expecting marketplace API parity across editions.","solutions":["Do not install plugins via this WS on commercial editions; install the matching SonarSource edition artifacts that bundle the plugin, per SonarSource upgrade docs.","Gate the automation on edition: call api/system/status or server id/edition info first and skip plugin install for non-community editions.","If a specific plugin is missing on the commercial edition, contact SonarSource support or use the edition-provided plugin set instead of manual installs."],"exampleFix":"// before\nawait api.plugins.install({ key: 'sonar-java' });\n// after\nconst edition = await getServerEdition();\nif (edition === 'community') {\n  await api.plugins.install({ key: 'sonar-java' });\n} // else plugin is bundled with the commercial edition\n","handlingStrategy":"validation","validationCode":"const edition = await getServerEdition(); // from api/system/status or info\nif (edition && edition !== 'community') {\n  throw new Error(`plugin install WS unsupported on ${edition}; use bundled edition plugins`);\n}","typeGuard":"function isCommunityEdition(edition) {\n  return typeof edition === 'string' && edition.toLowerCase() === 'community';\n}","tryCatchPattern":"try {\n  await api.plugins.install({ key });\n} catch (e) {\n  if (String(e.message).includes('unsupported in commercial edition')) {\n    log('skip manual install; plugin ships with the edition');\n    return;\n  }\n  throw e;\n}","preventionTips":["Detect edition before running marketplace automation and branch accordingly.","After migrating off Community Edition, remove plugin-install steps from pipelines.","Rely on edition-bundled plugins instead of manual installs on paid editions."],"tags":["sonarqube","webapi","plugin","edition"],"backgroundTag":"unsupported-operation","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}