Skip to content

Conversation

@ollie-troward
Copy link

@ollie-troward ollie-troward commented Mar 13, 2018

Hello,

I recently discovered when the Proxy Configuration is set and there is no Username and Password set, the plugin crashes with a "NullPointerException" due to the HashMap containing a null value.

Steps to Reproduce

  1. Spin up Jenkins.
  2. Configure the proxy settings but do not set a username and password.

screenshot 2018-03-13 20 15 17

  1. Make sure there's a file available, then run the plugin on post build.
  2. Look at the stack trace pasted below:
java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
	at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
	at org.apache.http.impl.client.BasicCredentialsProvider.setCredentials(BasicCredentialsProvider.java:61)
	at hockeyapp.HockeyappRecorder.createPreconfiguredHttpClient(HockeyappRecorder.java:165)
	at hockeyapp.HockeyappRecorder.performForApplication(HockeyappRecorder.java:252)
	at hockeyapp.HockeyappRecorder.perform(HockeyappRecorder.java:204)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
	at hudson.model.Build$BuildExecution.post2(Build.java:186)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
	at hudson.model.Run.execute(Run.java:1752)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Build step 'Upload to HockeyApp' marked build as failure
Finished: FAILURE

Hopefully this fix is sufficient, I only manually tested it by re-uploading the .hpi with the change.

@ltzany
Copy link

ltzany commented Apr 4, 2018

any updates for getting this PR tested or submitted?

@mezpahlan
Copy link

There is an open bug [JENKINS-41873] that this looks like it might solve. Can we get someone to look into this please.

@mezpahlan mezpahlan merged commit 399ef38 into jenkinsci:master May 30, 2018
@hugosanchezmartinez
Copy link

Hi there, any idea when is going to be available in production?

@mezpahlan
Copy link

Hi! I've only recently been made a maintainer of the plugin and only this morning been given access to release plugin changes. I'm hoping that I can produce a release sometime this week but if you could bear with me whilst I learn how to release plugins that would be appreciated.

@mezpahlan
Copy link

Hi @hugosanchezmartinez this should be ready now 1.2.4

@hugosanchezmartinez
Copy link

@mezpahlan Thanks! Appreciated.

@ollie-troward
Copy link
Author

Thanks guys 😄

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

Successfully merging this pull request may close these issues.

5 participants