Jenkins Artifactory plugin failing with java.lang.NullPointerException

Describe the bug
Artifactory plugin failing with java.lang.NullPointerException

To Reproduce
Whenever we try to upload artifacts, we face the below issue whenever we generate cloudbees jobs from Jobdsl for the first time we see this issue. And then once you reset “Override default deployer credentials” to none from Artifactory plugin parameter, and re-run the issue disappears. It’s behaving weird.

Expected behavior
It has to upload artifacts to jfrog without null pointer exception even though you had over the credentials.
Note: I had already configured Artifactory plugin configuration globally in cloudbees with creds

Screenshots
image
Versions

Additional context
12:04:36 FATAL: null
12:04:36 java.lang.NullPointerException
12:04:36 at org.jfrog.hudson.util.SpecUtils.getSpecStringFromSpecConf(SpecUtils.java:20)
12:04:36 at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.setUp(ArtifactoryGenericConfigurator.java:375)
12:04:36 at hudson.model.Build$BuildExecution.doRun(Build.java:158)
12:04:36 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:522)
12:04:36 at hudson.model.Run.execute(Run.java:1896)
12:04:36 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
12:04:36 at hudson.model.ResourceController.execute(ResourceController.java:101)
12:04:36 at hudson.model.Executor.run(Executor.java:442)

Recommendation for those using vendor version of Jenkins to use thier support system. We don’t know what changes they have made

@halkeye Sure but they had guided us here to work with.
could you please help if there is any support/work around for cloudbees for the Artifactory plugin on this issue

@pavan-acquia I think you may have misunderstood the message from CloudBees support.

You’re using the Artifactory plugin and seeing a null pointer exception in one of the methods of the Artifactory plugin. Per the plugin documentation, the Artifactory plugin is maintained by JFrog. It is an open source plugin. JFrog states that they welcome contributions.

CloudBees defines the Artifactory plugin as a “Tier 3” plugin. Their description says:

These are plugins which have not been verified by CloudBees. These plugins should be used with caution in a given installation because their stability is unknown. These plugins are supported on a commercially-reasonable basis. This usually implies guidance on using the plugins and diagnosis but are not subject to the CloudBees Support SLA.

I see that you’ve opened a GitHub issue with the Artifactory plugin. That’s a valid way to request help from the people that maintain the Artifactory plugin. Another valid way to request their help may be by contacting the JFrog support team for your Artifactory installation. You could also investigate the null pointer exception and propose a pull request that fixes the issue.

You described the issue as:

As far as I can tell from reading the stack trace, it appears that the downloadSpec is null. You might check the configuration fields of the plugin to see if you can find a downloadSpec field that should be non-empty. That may need to be defined in your Job DSL definition. A non-empty value might workaround the issue for you.

Sure will approach Jfrog team on this.
Thanks a lot for the reply @MarkEWaite
And even with downloadspec null/not null its behaving odd and need to change manually from null to creds and creds to null back sometimes.