Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Blocker
-
Resolution: Fixed
-
Component/s: bitbucket-plugin
-
Labels:
-
Environment:Jenkins 1.617, bitbucket-plugin 1.1.0
Jenkins 2.25, bitbucket-plugin 1.1.5
-
Similar Issues:
Description
Trying to use the bitbucket hook and so far as I can tell, I guess that it is sending a JSON body without specifying a user. I wasn't able to retrieve the JSON that it was sending, but it seems like that field is not a guaranteed field.
Error while serving http://104.236.89.214/bitbucket-hook/
java.lang.reflect.InvocationTargetException
...
Caused by: net.sf.json.JSONException: JSONObject["user"] not found.
at net.sf.json.JSONObject.getString(JSONObject.java:2040)
at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.processPayload(BitbucketHookReceiver.java:104)
at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:59)
The offending line:
String user = payload.getString("user");
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Summary | bitbucket can send webhook without user specified | Bitbucket Plugin unable to parse Bitbucket webhook response json |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | JNJira [ 163741 ] | JNJira + In-Review [ 208877 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Environment | jenkins 1.617, bitbucket-plugin 1.1.0 |
Jenkins 1.617, bitbucket-plugin 1.1.0 Jenkins 2.25, bitbucket-plugin 1.1.5 |
Comment | [ I don't see a 1.5, do you mean 1.1.5? I can confirm the bug replicates in that version as well. ] |
Attachment | bb-server-4.9.1_payload.txt [ 34349 ] |
Attachment | bitbucket.hpi [ 36186 ] |
Assignee | Jennifer Hofmeister [ hjen ] |
Assignee | Jennifer Hofmeister [ hjen ] |
Attachment | error.html [ 40476 ] |
Assignee | Félix Belzunce Arcos [ fbelzunc ] |
Attachment | Screen Shot 2017-12-04 at 12.50.59.png [ 40574 ] |
Comment | [ [~fbelzunc] but same happens on Bitbucket Cloud right? So the issue is more on the receiving plugin side i believe? ] |
Attachment | Screen Shot 2017-12-05 at 15.14.27.png [ 40582 ] |
Attachment | Screen Shot 2017-12-05 at 15.14.27.png [ 40583 ] |
Attachment | Screen Shot 2017-12-05 at 15.15.17.png [ 40584 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Comment |
[ The same problem net.sf.json.JSONException: JSONObject["user"] not found. Jenkins ver. 2.60.3 Bitbucket Plugin 1.1.8 ] |