KocproZ / jenkins-discord

A post-build plugin that sends the build status to a Discord channel.
MIT License
39 stars 36 forks source link

JSON exception causing failed execution #14

Closed Scarsz closed 6 years ago

Scarsz commented 6 years ago
com.mashape.unirest.http.exceptions.UnirestException: java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [char$
        at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143)
        at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)
        at nz.co.jammehcow.jenkinsdiscord.DiscordWebhook.send(DiscordWebhook.java:112)
        at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:80)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
        at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:682)
        at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1098)
        at hudson.model.Run.execute(Run.java:1784)
        at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
        at hudson.model.ResourceController.execute(ResourceController.java:97)
        at hudson.model.Executor.run(Executor.java:421)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
        at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:106)
        at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:139)
        ... 11 more
Caused by: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
        at com.mashape.unirest.http.JsonNode.<init>(JsonNode.java:51)
        at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:95)
        ... 12 more
Caused by: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
        at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
        at org.json.JSONArray.<init>(JSONArray.java:106)
        at org.json.JSONArray.<init>(JSONArray.java:145)
        at com.mashape.unirest.http.JsonNode.<init>(JsonNode.java:48)
        ... 13 more
jupjohn commented 6 years ago

Could you give me a bit more background into how this occurred? Also, try using the most recent version and see if the problem still persists. Thanks.

jupjohn commented 6 years ago

Would appreciate some more feedback on this.

Scarsz commented 6 years ago

Literally just installed, configured, failed. I’ll have some more info later.

Scarsz commented 6 years ago

Unable to reproduce in latest version.