{"record":{"id":"350f8dfbeb770b10","repo":"jenkinsci/jenkins","slug":"ambiguous-plugin-0","errorCode":null,"errorMessage":"Ambiguous plugin: {0}","messagePattern":"Ambiguous plugin: (.+?)","errorType":"validation","errorClass":"Failure","httpStatus":null,"severity":"warning","filePath":"core/src/main/java/hudson/PluginManager.java","lineNumber":1747,"sourceCode":"            int index = n.indexOf('.');\n            UpdateSite.Plugin p = null;\n\n            if (index == -1) {\n                p = getPlugin(n, UpdateCenter.ID_DEFAULT);\n            } else {\n                while (index != -1) {\n                    if (index + 1 >= n.length()) {\n                        break;\n                    }\n                    String pluginName = n.substring(0, index);\n                    String siteName = n.substring(index + 1);\n                    UpdateSite.Plugin plugin = getPlugin(pluginName, siteName);\n                    // There could be cases like:\n                    // 'plugin.ambiguous.updatesite' where both\n                    // 'plugin' @ 'ambiguous.updatesite' and 'plugin.ambiguous' @ 'updatesite' resolve to valid plugins\n                    if (plugin != null) {\n                        if (p != null) {\n                            throw new Failure(\"Ambiguous plugin: \" + n);\n                        }\n                        p = plugin;\n                    }\n                    index = n.indexOf('.', index + 1);\n                }\n            }\n\n            if (p == null) {\n                throw new Failure(\"No such plugin: \" + n);\n            }\n            Future<UpdateCenter.UpdateCenterJob> jobFuture = p.deploy(dynamicLoad, correlationId, batch, false);\n            installJobs.add(jobFuture);\n        }\n\n        final Jenkins jenkins = Jenkins.get();\n        final UpdateCenter updateCenter = jenkins.getUpdateCenter();\n\n        if (dynamicLoad) {","sourceCodeStart":1729,"sourceCodeEnd":1765,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/PluginManager.java#L1729-L1765","documentation":"Failure (a stapler form validation/UI exception) thrown when parsing a plugin identifier string that contains dots, and the split produces more than one valid plugin@updatesite combination. For example, 'plugin.ambiguous.updatesite' could resolve as ('plugin', 'ambiguous.updatesite') and ('plugin.ambiguous', 'updatesite'), both of which match real update sites/plugins.","triggerScenarios":"A user or API call specifies a plugin name with dots (e.g., 'foo.bar') where the dot-split is ambiguous: more than one (pluginName, siteName) pair resolves to a real plugin in the configured update centers.","commonSituations":"Using the plugin install API with a compound name like 'github.api' where both 'github' on update site 'api' and 'github.api' on the default site exist. This is a user-input ambiguity surfaced through the Jenkins UI or REST API.","solutions":["Specify the plugin name and update site explicitly using a non-ambiguous identifier.","Rename or alias the plugin or update site so the dot-split is unambiguous.","Use the update site ID in the API call format that avoids dot-based splitting."],"exampleFix":"// before — ambiguous\n// request: install 'plugin.ambiguous.updatesite'\n\n// after — disambiguate by specifying exact site\nUpdateSite site = jenkins.getUpdateCenter().getById(\"updatesite\");\nUpdateSite.Plugin plugin = site.getPlugin(\"plugin.ambiguous\");\nplugin.deploy(true, correlationId);","handlingStrategy":"validation","validationCode":"// Disambiguate before calling the install API\nUpdateSite site = jenkins.getUpdateCenter().getById(\"default\");\nUpdateSite.Plugin p = site.getPlugin(\"exact-plugin-name\");\nif (p == null) {\n    throw new IllegalArgumentException(\"Plugin not found on default site.\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    // call the install API with explicit site\n} catch (Failure f) {\n    if (f.getMessage().startsWith(\"Ambiguous plugin\")) {\n        // resolve by specifying exact update site\n        listener.error(\"Plugin name is ambiguous; specify the update site explicitly.\");\n    } else {\n        throw f;\n    }\n}","preventionTips":["Use unambiguous plugin identifiers that don't create multiple valid dot-split interpretations.","Specify the update site explicitly when plugin names contain dots."],"tags":["plugin-manager","update-center","validation","ambiguity"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}