Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException if credentialsId isn't specified in http function #10

Open
MaxNanasy opened this issue May 21, 2020 · 0 comments
Open

Comments

@MaxNanasy
Copy link

If I do the following:

    library(
      identifier: '<id>@<branch>',
      retriever: http(
        httpURL: '<URL>'
      )
    )

then I get the following exception:

java.lang.NullPointerException
	at java.util.Objects.requireNonNull(Objects.java:203)
	at com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById(CredentialsProvider.java:872)
	at com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById(CredentialsProvider.java:850)
	at com.amadeus.jenkins.plugins.workflow.libs.HttpRetriever.initPasswordCredentials(HttpRetriever.java:220)
	at com.amadeus.jenkins.plugins.workflow.libs.HttpRetriever.doRetrieve(HttpRetriever.java:186)
	at com.amadeus.jenkins.plugins.workflow.libs.HttpRetriever.retrieve(HttpRetriever.java:179)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:157)
	at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:207)
	at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:156)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate(ACL.java:290)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Specifying empty credentials works though:

    library(
      identifier: '<id>@<branch>',
      retriever: http(
        httpURL: '<URL>',
        credentialsId: ''
      )
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant