-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: bitbucket-oauth-plugin
-
None
After updating to Bitbucket OAuth 0.15, we're getting the following error in Jenkins:
{{_FATAL: hudson.security.UserMayOrMayNotExistException: Unexpected authentication type: UsernamePasswordAuthenticationToken [Principal=SYSTEM, Credentials=[PROTECTED], Authenticated=false, Details=null, Granted Authorities=[]]
hudson.security.UserMayOrMayNotExistException: Unexpected authentication type: UsernamePasswordAuthenticationToken [Principal=SYSTEM, Credentials=[PROTECTED], Authenticated=false, Details=null, Granted Authorities=[]]
at PluginClassLoader for bitbucket-oauth//org.jenkinsci.plugins.BitbucketSecurityRealm.loadUserByUsername2(BitbucketSecurityRealm.java:222)
at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:170)
at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:159)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4859)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3556)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2307)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2180)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2071)
Caused: com.google.common.util.concurrent.UncheckedExecutionException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2077)
at com.google.common.cache.LocalCache.get(LocalCache.java:3985)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4854)
at jenkins.security.UserDetailsCache.loadUserByUsername(UserDetailsCache.java:127)
at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1330)
at hudson.model.User$CanonicalIdResolver.resolve(User.java:1271)
at hudson.model.User.get(User.java:573)
at PluginClassLoader for git//hudson.plugins.git.GitChangeSet.getUser(GitChangeSet.java:416)
at PluginClassLoader for git//hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:488)
at PluginClassLoader for git//hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:587)
at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:138)
at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:353)
at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:342)
at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:133)
at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:353)
at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:342)
at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:133)
at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:353)
at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:342)
at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:133)
at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:353)
at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:342)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:714)
at hudson.model.Run.execute(Run.java:1866)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:456)
Finished: FAILURE_}}
Downgrading back to 0.14 solved the issue.Â
What happened: this morning, we updated the plugin from 0.14 to 0.15. We then used Jenkins to run a build. The application we wanted to build was built successfully, but right after thad build, the above-mentioned error was thrown. Apparently, the issue is that the user who committed the change in Bitbucket isn't getting recognised by Jenkins.Â
I've taken a look at the CHANGELOG file and the read the README.md file, but I don't think we missed anything. We're running Jenkins 2.558 and support Java 17.Â