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

Scanning fails with "java.lang.IllegalArgumentException: No enum constant org.gitlab4j.api.models.Visibility.private"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • gitlab-api-plugin
    • None
    • Jenkins 2.414.3, Debian 12

      After creating a GitLab Branch Source project, the GL group scan fails with the following error:

      FATAL: Failed to recompute children of SomeGroup
      java.lang.IllegalArgumentException: No enum constant org.gitlab4j.api.models.Visibility.private
      	at java.base/java.lang.Enum.valueOf(Enum.java:273)
      	at org.eclipse.yasson.internal.serializer.EnumTypeDeserializer.deserialize(EnumTypeDeserializer.java:37)
      	at org.eclipse.yasson.internal.serializer.EnumTypeDeserializer.deserialize(EnumTypeDeserializer.java:23)
      	at org.eclipse.yasson.internal.serializer.AbstractValueTypeDeserializer.deserialize(AbstractValueTypeDeserializer.java:64)
      	at org.eclipse.yasson.internal.serializer.ObjectDeserializer.deserializeNext(ObjectDeserializer.java:183)
      	at org.eclipse.yasson.internal.serializer.AbstractContainerDeserializer.deserializeInternal(AbstractContainerDeserializer.java:94)
      	at org.eclipse.yasson.internal.serializer.AbstractContainerDeserializer.deserialize(AbstractContainerDeserializer.java:64)
      	at org.eclipse.yasson.internal.Unmarshaller.deserializeItem(Unmarshaller.java:62)
      Caused: javax.json.bind.JsonbException: Internal error: No enum constant org.gitlab4j.api.models.Visibility.private
      	at org.eclipse.yasson.internal.Unmarshaller.deserializeItem(Unmarshaller.java:68)
      	at org.eclipse.yasson.internal.Unmarshaller.deserialize(Unmarshaller.java:51)
      	at org.eclipse.yasson.internal.JsonBinding.deserialize(JsonBinding.java:59)
      	at org.eclipse.yasson.internal.JsonBinding.fromJson(JsonBinding.java:99)
      	at org.glassfish.jersey.jsonb.internal.JsonBindingProvider.readFrom(JsonBindingProvider.java:87)
      Caused: javax.ws.rs.ProcessingException: Error deserializing object from entity stream.
      	at org.glassfish.jersey.jsonb.internal.JsonBindingProvider.readFrom(JsonBindingProvider.java:89)
      	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233)
      	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:212)
      	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:132)
      	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1072)
      	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:919)
      	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:853)
      	at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:298)
      	at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:93)
      	at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
      	at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
      	at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
      	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:365)
      	at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:244)
      	at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:90)
      	at org.gitlab4j.api.GroupApi.getGroup(GroupApi.java:508)
      	at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabOwner.fetchOwner(GitLabOwner.java:26)
      	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.getGitlabOwner(GitLabSCMNavigator.java:206)
      	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.getGitlabOwner(GitLabSCMNavigator.java:199)
      	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.retrieveActions(GitLabSCMNavigator.java:405)
      	at jenkins.scm.api.SCMNavigator.fetchActions(SCMNavigator.java:326)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:486)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:269)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:167)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:920)
      	at hudson.model.ResourceController.execute(ResourceController.java:101)
      	at hudson.model.Executor.run(Executor.java:442)
      Finished: FAILURE

      Connection to GL otherwise works fine. All plugins are at their latest versions.

          [JENKINS-72262] Scanning fails with "java.lang.IllegalArgumentException: No enum constant org.gitlab4j.api.models.Visibility.private"

          Mark Waite added a comment -

          I can't duplicate the issue from my Jenkins 2.426.1-rc pre-release using the most recent release of the gitlab API plugin 5.3.0-91.v1f9a_fda_d654f to scan repositories at https://gitlab.com . Can you provide more details so that others can duplicate the isse?

          Mark Waite added a comment - I can't duplicate the issue from my Jenkins 2.426.1-rc pre-release using the most recent release of the gitlab API plugin 5.3.0-91.v1f9a_fda_d654f to scan repositories at https://gitlab.com . Can you provide more details so that others can duplicate the isse?

          What kind of details do you need? What I can tell you right away is that we're not using gitlab.com, but  a private instance, and we access it with API tokens (for testing I created one with full permissions). The connection test in the global Jenkins configuration was successful, and all the usual repository cloning, pulling, etc. works just fine.

          Dirk Heinrichs added a comment - What kind of details do you need? What I can tell you right away is that we're not using gitlab.com, but  a private instance, and we access it with API tokens (for testing I created one with full permissions). The connection test in the global Jenkins configuration was successful, and all the usual repository cloning, pulling, etc. works just fine.

          Mark Waite added a comment -

          What kind of details do you need?

          It would be best if you could provide the items listed in "How to report an issue", including:

          • Output of the script console that lists exact plugins and their versions
          • Exact version of GitLab that is running at your site
          • Enough configuration details so that you're confident others can duplicate the issue

          I don't have a local version of GitLab running. Other maintainers probably don't have a local version running either. Without the precise GitLab version you are running, I would guess the GitLab version, install it, configure it, then have you tell me it is not the right version. The same would happen with plugin versions.

          Mark Waite added a comment - What kind of details do you need? It would be best if you could provide the items listed in "How to report an issue" , including: Output of the script console that lists exact plugins and their versions Exact version of GitLab that is running at your site Enough configuration details so that you're confident others can duplicate the issue I don't have a local version of GitLab running. Other maintainers probably don't have a local version running either. Without the precise GitLab version you are running, I would guess the GitLab version, install it, configure it, then have you tell me it is not the right version. The same would happen with plugin versions.

          OK, here we go (sorry for the delay):

          • Plugins/Versions:
            Jenkins: 2.414.3
            OS: Linux - 6.1.0-13-cloud-arm64
            Java: 17.0.8 - Debian (OpenJDK 64-Bit Server VM)
            ---
            Office-365-Connector:4.20.0
            Parameterized-Remote-Trigger:3.2.0
            active-directory:2.34
            amazon-ecr:1.114.vfd22430621f5
            ansicolor:1.0.4
            ant:497.v94e7d9fffa_b_9
            antisamy-markup-formatter:162.v0e6ec0fcfcf6
            any-buildstep:14.ve115ec1484f0
            anything-goes-formatter:19.v3e2b_1b_3e0ee5
            apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
            artifact-manager-s3:822.vf129d4836c31
            artifactory:4.0.0
            authentication-tokens:1.53.v1c90fd9191a_b_
            aws-credentials:218.v1b_e9466ec5da_
            aws-global-configuration:128.ve2c5685a_09c3
            aws-java-sdk-ec2:1.12.529-406.vdeff15e5817d
            aws-java-sdk-ecr:1.12.529-406.vdeff15e5817d
            aws-java-sdk-minimal:1.12.529-406.vdeff15e5817d
            badge:1.9.1
            basic-branch-build-strategies:81.v05e333931c7d
            bootstrap5-api:5.3.2-2
            bouncycastle-api:2.29
            branch-api:2.1128.v717130d4f816
            build-blocker-plugin:1.7.9
            build-failure-analyzer:2.4.2
            build-metrics:1.3
            build-name-setter:2.4.0
            build-timeout:1.31
            build-user-vars-plugin:1.9
            built-on-column:1.4
            caffeine-api:3.1.8-133.v17b_1ff2e0599
            checks-api:2.0.2
            cloudbees-folder:6.858.v898218f3609d
            command-launcher:107.v773860566e2e
            commons-httpclient3-api:3.1-3
            commons-lang3-api:3.13.0-62.v7d18e55f51e2
            commons-text-api:1.11.0-94.v3e1f4a_926e49
            conditional-buildstep:1.4.3
            config-file-provider:959.vcff671a_4518b_
            configuration-as-code:1714.v09593e830cfa
            configurationslicing:548.ve92d48e66b_f8
            copyartifact:722.v0662a_9b_e22a_c
            credentials:1307.v3757c78f17c3
            credentials-binding:642.v737c34dea_6c2
            data-tables-api:1.13.6-5
            date-parameter:0.0.4
            description-setter:1.10
            display-url-api:2.200.vb_9327d658781
            docker-build-publish:1.4.0
            docker-commons:439.va_3cb_0a_6a_fb_29
            docker-workflow:572.v950f58993843
            durable-task:523.va_a_22cf15d5e0
            echarts-api:5.4.0-7
            email-ext:2.102
            embeddable-build-status:412.v09da_db_1dee68
            envinject:2.908.v66a_774b_31d93
            envinject-api:1.199.v3ce31253ed13
            extended-read-permission:53.v6499940139e5
            extensible-choice-parameter:1.8.1
            flexible-publish:0.16.1
            font-awesome-api:6.4.2-1
            git:5.2.0
            git-client:4.5.0
            git-parameter:0.9.19
            git-server:99.va_0826a_b_cdfa_d
            git-userContent:1.4
            gitlab-api:5.3.0-91.v1f9a_fda_d654f
            gitlab-branch-source:684.vea_fa_7c1e2fe3
            global-build-stats:288.vb_2c4a_0f138b_b_
            gradle:2.9
            groovy:457.v99900cb_85593
            groovy-label-assignment:1.2.0
            groovy-postbuild:2.5
            handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
            hashicorp-vault-plugin:361.v44fea_4fc08d9
            htmlpublisher:1.32
            instance-identity:185.v303dc7c645f9
            ionicons-api:56.v1b_1c8c49374e
            jackson2-api:2.15.3-366.vfe8d1fa_f8c87
            jakarta-activation-api:2.0.1-3
            jakarta-mail-api:2.0.1-3
            javadoc:243.vb_b_503b_b_45537
            javax-activation-api:1.2.0-6
            javax-mail-api:1.6.2-9
            jaxb:2.3.9-1
            jdk-tool:73.vddf737284550
            jenkins-multijob-plugin:623.v03401733c9a_9
            jersey2-api:2.41-133.va_03323b_a_1396
            jira:3.11
            job-dsl:1.87
            jobConfigHistory:1229.v3039470161a_d
            jquery3-api:3.7.1-1
            jsch:0.2.8-65.v052c39de79b_2
            junit:1240.vf9529b_881428
            locale:314.v22ce953dfe9e
            lockable-resources:1185.v0c528656ce04
            logstash:2.5.0218.v0a_ff8fefc12b_
            mailer:463.vedf8358e006b_
            matrix-auth:3.2.1
            matrix-project:818.v7eb_e657db_924
            maven-plugin:3.23
            mercurial:1260.vdfb_723cdcc81
            metrics:4.2.18-442.v02e107157925
            mina-sshd-api-common:2.11.0-86.v836f585d47fa_
            mina-sshd-api-core:2.11.0-86.v836f585d47fa_
            monitoring:1.95.0
            multi-branch-project-plugin:0.7
            multiple-scms:0.8
            nodelabelparameter:1.12.0
            parameterized-trigger:2.46
            pipeline-build-step:516.v8ee60a_81c5b_9
            pipeline-graph-analysis:202.va_d268e64deb_3
            pipeline-groovy-lib:689.veec561a_dee13
            pipeline-input-step:477.v339683a_8d55e
            pipeline-model-api:2.2150.v4cfd8916915c
            pipeline-model-definition:2.2150.v4cfd8916915c
            pipeline-model-extensions:2.2150.v4cfd8916915c
            pipeline-rest-api:2.33
            pipeline-stage-step:305.ve96d0205c1c6
            pipeline-stage-tags-metadata:2.2150.v4cfd8916915c
            pipeline-stage-view:2.33
            pipeline-utility-steps:2.16.0
            plain-credentials:143.v1b_df8b_d3b_e48
            plugin-usage-plugin:4.2
            plugin-util-api:3.6.0
            powershell:2.1
            prism-api:1.29.0-8
            promoted-builds:936.va_571a_a_b_f8da_5
            publish-over:0.22
            publish-over-ssh:1.25
            rebuild:320.v5a_0933a_e7d61
            resource-disposer:0.23
            run-condition:1.7
            s3:466.vf5b_3db_8e3eb_2
            scm-api:676.v886669a_199a_a_
            script-security:1275.v23895f409fb_d
            sidebar-link:2.4.1
            snakeyaml-api:2.2-111.vc6598e30cc65
            ssh-agent:333.v878b_53c89511
            ssh-credentials:308.ve4497b_ccd8f4
            ssh-slaves:2.916.vd17b_43357ce4
            sshd:3.312.v1c601b_c83b_0e
            structs:325.vcb_307d2a_2782
            swarm:3.41
            testng-plugin:835.v51ed3da_fcc35
            throttle-concurrents:2.14
            timestamper:1.26
            token-macro:384.vf35b_f26814ec
            trilead-api:2.84.v72119de229b_7
            uno-choice:2.8.0
            validating-string-parameter:183.v3748e79b_9737
            variant:60.v7290fc0eb_b_cd
            versionnumber:1.11
            view-job-filters:369.ve0513a_a_f5524
            workflow-api:1283.v99c10937efcb_
            workflow-basic-steps:1042.ve7b_140c4a_e0c
            workflow-cps:3806.va_3a_6988277b_2
            workflow-durable-task-step:1289.v4d3e7b_01546b_
            workflow-job:1360.vc6700e3136f5
            workflow-multibranch:756.v891d88f2cd46
            workflow-scm-step:415.v434365564324
            workflow-step-api:639.v6eca_cd8c04a_a_
            workflow-support:865.v43e78cc44e0d
            ws-cleanup:0.45
          • GitLab version: v16.5.1-ee
          • Configuration details: Not sure what to provide here. We've got more than 2 levels of sub groups in our GL, and I wanted to create jobs for GL projects below level 2, which includes projects located directly below "Level1/Level2/", but also below additional sub groups under "Level2". As written above, I use a group API token with full access, created at "Level2".

          Dirk Heinrichs added a comment - OK, here we go (sorry for the delay): Plugins/Versions: Jenkins: 2.414.3 OS: Linux - 6.1.0-13-cloud-arm64 Java: 17.0.8 - Debian (OpenJDK 64-Bit Server VM) --- Office-365-Connector:4.20.0 Parameterized-Remote-Trigger:3.2.0 active-directory:2.34 amazon-ecr:1.114.vfd22430621f5 ansicolor:1.0.4 ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:162.v0e6ec0fcfcf6 any-buildstep:14.ve115ec1484f0 anything-goes-formatter:19.v3e2b_1b_3e0ee5 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 artifact-manager-s3:822.vf129d4836c31 artifactory:4.0.0 authentication-tokens:1.53.v1c90fd9191a_b_ aws-credentials:218.v1b_e9466ec5da_ aws-global-configuration:128.ve2c5685a_09c3 aws-java-sdk-ec2:1.12.529-406.vdeff15e5817d aws-java-sdk-ecr:1.12.529-406.vdeff15e5817d aws-java-sdk-minimal:1.12.529-406.vdeff15e5817d badge:1.9.1 basic-branch-build-strategies:81.v05e333931c7d bootstrap5-api:5.3.2-2 bouncycastle-api:2.29 branch-api:2.1128.v717130d4f816 build-blocker-plugin:1.7.9 build-failure-analyzer:2.4.2 build-metrics:1.3 build-name-setter:2.4.0 build-timeout:1.31 build-user-vars-plugin:1.9 built-on-column:1.4 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.0.2 cloudbees-folder:6.858.v898218f3609d command-launcher:107.v773860566e2e commons-httpclient3-api:3.1-3 commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.11.0-94.v3e1f4a_926e49 conditional-buildstep:1.4.3 config-file-provider:959.vcff671a_4518b_ configuration-as-code:1714.v09593e830cfa configurationslicing:548.ve92d48e66b_f8 copyartifact:722.v0662a_9b_e22a_c credentials:1307.v3757c78f17c3 credentials-binding:642.v737c34dea_6c2 data-tables-api:1.13.6-5 date-parameter:0.0.4 description-setter:1.10 display-url-api:2.200.vb_9327d658781 docker-build-publish:1.4.0 docker-commons:439.va_3cb_0a_6a_fb_29 docker-workflow:572.v950f58993843 durable-task:523.va_a_22cf15d5e0 echarts-api:5.4.0-7 email-ext:2.102 embeddable-build-status:412.v09da_db_1dee68 envinject:2.908.v66a_774b_31d93 envinject-api:1.199.v3ce31253ed13 extended-read-permission:53.v6499940139e5 extensible-choice-parameter:1.8.1 flexible-publish:0.16.1 font-awesome-api:6.4.2-1 git:5.2.0 git-client:4.5.0 git-parameter:0.9.19 git-server:99.va_0826a_b_cdfa_d git-userContent:1.4 gitlab-api:5.3.0-91.v1f9a_fda_d654f gitlab-branch-source:684.vea_fa_7c1e2fe3 global-build-stats:288.vb_2c4a_0f138b_b_ gradle:2.9 groovy:457.v99900cb_85593 groovy-label-assignment:1.2.0 groovy-postbuild:2.5 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 hashicorp-vault-plugin:361.v44fea_4fc08d9 htmlpublisher:1.32 instance-identity:185.v303dc7c645f9 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.15.3-366.vfe8d1fa_f8c87 jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javadoc:243.vb_b_503b_b_45537 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.9-1 jdk-tool:73.vddf737284550 jenkins-multijob-plugin:623.v03401733c9a_9 jersey2-api:2.41-133.va_03323b_a_1396 jira:3.11 job-dsl:1.87 jobConfigHistory:1229.v3039470161a_d jquery3-api:3.7.1-1 jsch:0.2.8-65.v052c39de79b_2 junit:1240.vf9529b_881428 locale:314.v22ce953dfe9e lockable-resources:1185.v0c528656ce04 logstash:2.5.0218.v0a_ff8fefc12b_ mailer:463.vedf8358e006b_ matrix-auth:3.2.1 matrix-project:818.v7eb_e657db_924 maven-plugin:3.23 mercurial:1260.vdfb_723cdcc81 metrics:4.2.18-442.v02e107157925 mina-sshd-api-common:2.11.0-86.v836f585d47fa_ mina-sshd-api-core:2.11.0-86.v836f585d47fa_ monitoring:1.95.0 multi-branch-project-plugin:0.7 multiple-scms:0.8 nodelabelparameter:1.12.0 parameterized-trigger:2.46 pipeline-build-step:516.v8ee60a_81c5b_9 pipeline-graph-analysis:202.va_d268e64deb_3 pipeline-groovy-lib:689.veec561a_dee13 pipeline-input-step:477.v339683a_8d55e pipeline-model-api:2.2150.v4cfd8916915c pipeline-model-definition:2.2150.v4cfd8916915c pipeline-model-extensions:2.2150.v4cfd8916915c pipeline- rest -api:2.33 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2150.v4cfd8916915c pipeline-stage-view:2.33 pipeline-utility-steps:2.16.0 plain-credentials:143.v1b_df8b_d3b_e48 plugin-usage-plugin:4.2 plugin-util-api:3.6.0 powershell:2.1 prism-api:1.29.0-8 promoted-builds:936.va_571a_a_b_f8da_5 publish-over:0.22 publish-over-ssh:1.25 rebuild:320.v5a_0933a_e7d61 resource-disposer:0.23 run-condition:1.7 s3:466.vf5b_3db_8e3eb_2 scm-api:676.v886669a_199a_a_ script-security:1275.v23895f409fb_d sidebar-link:2.4.1 snakeyaml-api:2.2-111.vc6598e30cc65 ssh-agent:333.v878b_53c89511 ssh-credentials:308.ve4497b_ccd8f4 ssh-slaves:2.916.vd17b_43357ce4 sshd:3.312.v1c601b_c83b_0e structs:325.vcb_307d2a_2782 swarm:3.41 testng-plugin:835.v51ed3da_fcc35 throttle-concurrents:2.14 timestamper:1.26 token-macro:384.vf35b_f26814ec trilead-api:2.84.v72119de229b_7 uno-choice:2.8.0 validating-string-parameter:183.v3748e79b_9737 variant:60.v7290fc0eb_b_cd versionnumber:1.11 view-job-filters:369.ve0513a_a_f5524 workflow-api:1283.v99c10937efcb_ workflow-basic-steps:1042.ve7b_140c4a_e0c workflow-cps:3806.va_3a_6988277b_2 workflow-durable-task-step:1289.v4d3e7b_01546b_ workflow-job:1360.vc6700e3136f5 workflow-multibranch:756.v891d88f2cd46 workflow-scm-step:415.v434365564324 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:865.v43e78cc44e0d ws-cleanup:0.45 GitLab version: v16.5.1-ee Configuration details: Not sure what to provide here. We've got more than 2 levels of sub groups in our GL, and I wanted to create jobs for GL projects below level 2, which includes projects located directly below "Level1/Level2/", but also below additional sub groups under "Level2". As written above, I use a group API token with full access, created at "Level2".

            Unassigned Unassigned
            dhs Dirk Heinrichs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: