Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60405

Owner 'xyz' is neither a user/group/subgroup

    XMLWordPrintable

Details

    Description

      Hi,

      I am getting this error since a while. This is the trace of the error;

      Using Jenkins 2.190.3
      Plugin version 1.4.1

      I have setupped an access token on gitlab.com and using it as username/password credentials. And I also tried ssh key credentials, but that didn't work either.
      It worked before.

      java.lang.IllegalStateException: Owner 'xyz' is neither a user/group/subgroup
      	at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabOwner.fetchOwner(GitLabOwner.java:39)
      	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator$DescriptorImpl.doCheckProjectOwner(GitLabSCMNavigator.java:429)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
      	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:246)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:105)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:505)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          bertoost Bert Oost created issue -
          bertoost Bert Oost added a comment -

          It works when using my Gitlab username as owner, but not when using one of my groups (which worked before)

          bertoost Bert Oost added a comment - It works when using my Gitlab username as owner, but not when using one of my groups (which worked before)
          bertoost Bert Oost added a comment -

          I have tried downgrading the plugin to 1.2 and even downgraded Jenkins itself, but nothing was working. Probably something has changed in the Gitlab API why this isn't working anymore. Please help. This is causing all my Gitlab projects not building anymore (even not showing up in Jenkins)

          bertoost Bert Oost added a comment - I have tried downgrading the plugin to 1.2 and even downgraded Jenkins itself, but nothing was working. Probably something has changed in the Gitlab API why this isn't working anymore. Please help. This is causing all my Gitlab projects not building anymore (even not showing up in Jenkins)
          bertoost Bert Oost added a comment -

          Any news on this? Still no reply or update .. please, this is preventing me to deploy (automatically) for a week already...

          bertoost Bert Oost added a comment - Any news on this? Still no reply or update .. please, this is preventing me to deploy (automatically) for a week already...
          andrey1vanov Andrey Ivanov added a comment -

          Same issue with the following versions:

          • Jenkins 2.204.2
          • Gitlab API Plugin 1.0.5
          • GitLab Branch Source Plugin 1.4.4

          Also, it is not possible to scan private group if you are member:

          java.lang.IllegalStateException: Owner 'private_group_name' is neither a user/group/subgroup
          

          Private personal projects cannot be scanned too, the plugin cannot find it (without an error, just a message - "0 found").

          Tried with the following kind of credentials:

          • "Username with password"
          • "SSH Username with private key"

          baymac could you please take a look?

          andrey1vanov Andrey Ivanov added a comment - Same issue with the following versions: Jenkins 2.204.2 Gitlab API Plugin 1.0.5 GitLab Branch Source Plugin 1.4.4 Also, it is not possible to scan private group if you are member: java.lang.IllegalStateException: Owner 'private_group_name' is neither a user/group/subgroup Private personal projects cannot be scanned too, the plugin cannot find it (without an error, just a message - "0 found"). Tried with the following kind of credentials: "Username with password" "SSH Username with private key" baymac could you please take a look?

          Are you still facing this issue, I haven't been able to replicate it.

          baymac Parichay Barpanda added a comment - Are you still facing this issue, I haven't been able to replicate it.
          bertoost Bert Oost added a comment -

          I stopped using Gitlab because of this. It was annoying. Don't know if it still exists.

          bertoost Bert Oost added a comment - I stopped using Gitlab because of this. It was annoying. Don't know if it still exists.
          swails Jason Swails added a comment -

          This may be related to JENKINS-62836 that I just opened.  The Jenkins logs have been no help.  I suspect something has changed in the GitLab API with some of the more recent GitLab releases.

          swails Jason Swails added a comment - This may be related to JENKINS-62836 that I just opened.  The Jenkins logs have been no help.  I suspect something has changed in the GitLab API with some of the more recent GitLab releases.

          Hello,

          I just had the same issue.

          It seems that the problem was the visibility of the group (the group is private)

          I created a token for an other user (who is an admin) and I was able to set the owner

          bigon Laurent Bigonviille added a comment - Hello, I just had the same issue. It seems that the problem was the visibility of the group (the group is private) I created a token for an other user (who is an admin) and I was able to set the owner
          dmouha Mouhamed made changes -
          Field Original Value New Value
          Attachment Screenshot from 2021-01-19 15-07-14.png [ 53850 ]
          dmouha Mouhamed made changes -
          Comment [ Hello,

          I had the same issue , I just changed the API version user by gitlab in the settings. *API level  v3*

          It is working now

          !Screenshot from 2021-01-19 15-07-14.png! ]
          dmouha Mouhamed made changes -
          dmouha Mouhamed added a comment -

           

          Try to change this from v4 to v3 it is in the system configuration on gitlab server configuration

          dmouha Mouhamed added a comment -   Try to change this from v4 to v3 it is in the system configuration on gitlab server configuration
          b_deeming Bobs Ur Uncle added a comment -

          I hit this error after installing the plugin then going straight to setting up an org job. I probably should have read the setup instructions! I found (eventually) that I needed to add a Personal Access Token to the 'default' server that the plugin sets up for you, to allow it to use the GitLab API. This is done in the system configuration.

          The error was simply "Owner 'xyz' is neither a user/group/subgroup" and didn't give any indication or hint that in fact it didn't have any credentials to use to access the API, and of course because the immediately preceding field to the group to scan field, in the job setup, is to select some credentials (these are for cloning), one naturally expects that it will use those credentials!

          b_deeming Bobs Ur Uncle added a comment - I hit this error after installing the plugin then going straight to setting up an org job. I probably should have read the setup instructions! I found (eventually) that I needed to add a Personal Access Token to the 'default' server that the plugin sets up for you, to allow it to use the GitLab API. This is done in the system configuration. The error was simply "Owner 'xyz' is neither a user/group/subgroup" and didn't give any indication or hint that in fact it didn't have any credentials to use to access the API, and of course because the immediately preceding field to the group to scan field, in the job setup, is to select some credentials (these are for cloning ), one naturally expects that it will use those credentials!
          robross0606 rross added a comment -

          What seems odd is that I changed the name of the "default" GitLab server configuration to "Cloud" yet the plugin still appears to be trying to use "default" as the name of the configuration.  There is no such configuration named "default" in my setup.

          robross0606 rross added a comment - What seems odd is that I changed the name of the "default" GitLab server configuration to "Cloud" yet the plugin still appears to be trying to use "default" as the name of the configuration.  There is no such configuration named "default" in my setup.
          jprojas Juan Pablo Rojas added a comment - - edited

          Hi all,

          Just wanted to share with you that, after a major gitlab update I've bumped against this issue and, after some ours fighting with my group configuration in jenkins, i ended up revisiting gitlabs v4 api (as the last version already 'closed' v3), and playing a bit with curl, just found out that, besides of the obvious (former group/subgroup syntax doesnt work anymore), if you configure subgroups id then it works again.

          Hope this helps anybody around

          BR,

          jprojas Juan Pablo Rojas added a comment - - edited Hi all, Just wanted to share with you that, after a major gitlab update I've bumped against this issue and, after some ours fighting with my group configuration in jenkins, i ended up revisiting gitlabs v4 api (as the last version already 'closed' v3), and playing a bit with curl, just found out that, besides of the obvious (former group/subgroup syntax doesnt work anymore), if you configure subgroups id then it works again. Hope this helps anybody around BR,
          jprojas Juan Pablo Rojas made changes -
          Attachment image-2022-04-05-22-06-37-632.png [ 57629 ]

          People

            baymac Parichay Barpanda
            bertoost Bert Oost
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: