UI IllegalArgumentException regarding credentialsId parameter

34 views
Skip to first unread message

Benjamin Paz

unread,
Jun 19, 2020, 6:33:37 PM6/19/20
to Jenkins Users
Hello,

I have an easily repeatable issue that i have found in the Jenkins UI.

I am using Jenkins Jenkins ver. 2.222.1 
credentials-binding plugin 1.23
aws-lambda plugin 0.5.10

Start with a freestyle job, add a secret file into global store, named Jenkins.  The job buttons to "save" or "apply" changes can be used without issue. Adding the buildstep aws lambda deployment and the job can still be saved. However after reloading the job then it can no longer save.. The job will return the a popup with an error from the UI:

This are excerpts of the stacktrace: 
org.kohsuke.stapler.WrongTypeException: Got type array but no lister class found for type class java.lang.String
	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:724)

Caused: java.lang.IllegalArgumentException: Failed to convert the credentialsId parameter of the constructor public org.jenkinsci.plugins.credentialsbinding.impl.FileBinding(java.lang.String,java.lang.String)


Caused: java.lang.IllegalArgumentException: Failed to instantiate class org.jenkinsci.plugins.credentialsbinding.impl.FileBinding from {"variable":"NameWasHere","includeUser":"false","credentialsId":["folder-filename.txt",""],"stapler-class":"org.jenkinsci.plugins.credentialsbinding.impl.FileBinding","$class":"org.jenkinsci.plugins.credentialsbinding.impl.FileBinding"}
        
Caused: java.lang.Error: Failed to instantiate class org.jenkinsci.plugins.credentialsbinding.impl.FileBinding from {"variable":"NameWasHere","includeUser":"false","credentialsId":["folder-filename.txt",""],"stapler-class":"org.jenkinsci.plugins.credentialsbinding.impl.FileBinding","$class":"org.jenkinsci.plugins.credentialsbinding.impl.FileBinding"}

Examining the secret displayed name now contains the folder and cannot be updated. The original file name from the global space was "filename.txt" but now the name appears as "folder-filename.txt".   This name always was presented with the folder in the config.xml file but not on the Jenkins UI. Back in the Jenkins UI, the secret file configuration is unable to change the "folder-filename.txt" and cannot display all of the available files in the global store.

Please advise,
Ben

Benjamin Paz

unread,
Jun 23, 2020, 4:07:49 PM6/23/20
to Jenkins Users
We are able to continue with the job by deleting the secret files and then re-adding to the job.  Until the screen is refreshed the UI configuration for that job continues to function normally.

As I have used Jenkinsfile in the past on several other projects. I believe the Jenkinsfile or other code solution will resolve this issue.

Please provide some feedback on the UI issue, even if it is just to say that the experience is the same.

benjam...@gdit.com

unread,
Sep 8, 2020, 4:23:47 PM9/8/20
to Jenkins Users
Maybe this question is published in the wrong forum?
Reply all
Reply to author
Forward
0 new messages