question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IllegalArgumentException: Permission can not be null for sid:[USERNAME]

See original GitHub issue

Jenkins version 2.158 Plugin version: 1.4 (incl CasC-Support) OS: Jenkins:2.158/Docker Image

Starting a new docker container based on the Official Jenkins Docker Image fails when I have specifiv users listed. If I only have anonymous listed, it works. Prior to upgrading Jenkins+plugins the complete permissions-list worked fine.

jenkins:
  authorizationStrategy:
    globalMatrix:
      grantedPermissions:
        - "Overall/Administer:anonymous"
        ... [Bunch of permissions for anonymous]
        - "Overall/Administer:[USERNAME]"
        ... [Bunch of permissions for USERNAME]

Exception:

java.lang.IllegalArgumentException: Permission can not be null for sid:[USERNAME]
	at hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:94)
	at io.jenkins.plugins.casc.support.matrixauth.MatrixAuthorizationStrategyConfigurator.lambda$setGrantedPermissions$2(MatrixAuthorizationStrategyConfigurator.java:57)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at io.jenkins.plugins.casc.support.matrixauth.MatrixAuthorizationStrategyConfigurator.setGrantedPermissions(MatrixAuthorizationStrategyConfigurator.java:54)
	at io.jenkins.plugins.casc.Attribute.setValue(Attribute.java:170)
	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:355)
Caused: io.jenkins.plugins.casc.ConfiguratorException: string: Failed to set attribute grantedPermissions(class: class java.lang.String, multiple: true)
	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:357)
	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:273)
	at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:96)
	at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:101)
	at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:43)
	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:349)
	at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:284)
	at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:657)
	at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:620)
Caused: io.jenkins.plugins.casc.ConfiguratorException: jenkins: error configuring 'jenkins' with class io.jenkins.plugins.casc.core.JenkinsConfigurator configurator
	at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:626)
	at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:657)
	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:642)
	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:545)
	at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:275)
	at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:267)
Caused: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1083)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:48)
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1117)
	at jenkins.model.Jenkins.<init>(Jenkins.java:921)
	at hudson.model.Hudson.<init>(Hudson.java:85)
	at hudson.model.Hudson.<init>(Hudson.java:81)
	at hudson.WebAppMain$3.run(WebAppMain.java:233)
Caused: hudson.util.HudsonFailedToLoad
	at hudson.WebAppMain$3.run(WebAppMain.java:250)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
ryanpeachcommented, Sep 18, 2021
1reaction
jonbrohaugecommented, Mar 27, 2019

After painstakingly adding permissions one line at a time, it appears that a plugin has removed one permission entry without notification. Thanks to the JFrog/Artifactory Plugin 👎

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jenkins unable to start - Stack Overflow
But jenkins is unable to start with below error ... java.lang.IllegalArgumentException: Permission can not be null for sid:username.
Read more >
jenkinsci/configuration-as-code-plugin - Gitter
I am trying to get my config to work in docker an i keep getting an error: java.lang.IllegalArgumentException: Permission can not be null...
Read more >
[JENKINS-66271] Cannot resolve permission for ID: View/Create
After updating Jenkins to the latest version, the Configuration as Code plugin can no longer resolve the View/Create permission.
Read more >
Solved - Permission Issue - High Performance Minecraft
Caused by: java.lang.IllegalArgumentException: Permission name cannot be null at org.bukkit.permissions.PermissibleBase.
Read more >
Making a custom permission for kits but error? | Bukkit Forums
Thread.run(Unknown Source) [?:1.8.0_121] Caused by: java.lang.IllegalArgumentException: Permission name cannot be null at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found