zionyx / jenkins-tray

Jenkins Tray
MIT License
25 stars 21 forks source link

Jenkins Error 500 when trying to claim a build with Claim Plugin v2.5 and above #70

Closed luebbe closed 8 years ago

luebbe commented 8 years ago

When I try to claim a build from jenkins tray, it fails with a error 500 message from jenkins and jenkins tray shuts down. Is it possible that the call to the claim plugin has changed?

When I claim a build from the jenkins web gui, this works and jenkins tray reports the build as claimed.

The last lines in the jenkins error log are:

Caused by: net.sf.json.JSONException: JSONObject["assignee"] not found.
    at net.sf.json.JSONObject.getString(JSONObject.java:2040)
    at hudson.plugins.claim.AbstractClaimBuildAction.doClaim(AbstractClaimBuildAction.java:64)
    ... 81 more
zionyx commented 8 years ago

Thanks for the issue. I'll look into it and come back to you.

zionyx commented 8 years ago

I manage to reproduce the problem. But i have actually never used this feature. Have you ever succeeded in the past? If so, which version of Jenkins Tray / Hudson Tray Tracker did you use, and with which version of Jenkins-CI?

luebbe commented 8 years ago

No, I have never succeeded. It was my first try with Jenkins tray + claim plugin and I immediately ran into the error 500 issue. Does this have anything to do with authentication? I haven't understood yet how to use the jenkins api token from Jenkins tray.

zionyx commented 8 years ago

I'll ask the originator of Hudson Tray Tracker, @aseigneurin, to find out if this feature is complete. It still says experimental in the settings.

I don't think it has anything to do with authentication nor API token. I tried with / without authentication and it still fails the same way.

aseigneurin commented 8 years ago

From what I remember, I was able to get the assignee from the API but not to claim a build correctly. Claiming was done through the UI and there was no -clean- API available for that.

See where I had left the implementation: https://code.google.com/archive/p/hudson-tray-tracker/issues/53

zionyx commented 8 years ago

Thanks @aseigneurin. In that case, i'll disable claim feature by default on new installation while working on a proper fix for it when possible.

zionyx commented 8 years ago

Found out that the json data parsed to claim the build has a missing required field, assginee. This field is a consequence of https://issues.jenkins-ci.org/browse/JENKINS-7824 for Claim Plugin v2.5 and above.