-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] #438
Comments
FYI, I downgraded to 2.6 and this works fine. |
what's setup in your global configuration? |
It's this change: If its a bot user it expects a response, if its not a bot user it should just return null and not even try parse it |
I was able to reproduce by using the regular Slack Jenkins App token along with a Base URL and Bot User. To avoid this for now either, un-check Is Bot User or remove the base URL and switch to a Bot User integration token |
@steven-foster @gudlyf could you have a look at #439 please? It appears that your config is invalid, but it would be easier for the plugin to handle it I think... |
Jenkins: 2.155
Slack Plugin: 2.7
Code in Jenkinsfile:
pipeline { agent { any } stages { stage('slack test') { steps { slackSend (message: "test") } } } }
More of the error:
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json.JSONObject.<init>(JSONObject.java:194) at org.json.JSONObject.<init>(JSONObject.java:321) at jenkins.plugins.slack.workflow.SlackResponse.<init>(SlackResponse.java:15) at jenkins.plugins.slack.workflow.SlackSendStep$SlackSendStepExecution.run(SlackSendStep.java:272) at jenkins.plugins.slack.workflow.SlackSendStep$SlackSendStepExecution.run(SlackSendStep.java:198) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE
The message does appear in Slack, but the build sees the resulting error from the plugin as a failure. Plugin works fine in Freestyle project.
The text was updated successfully, but these errors were encountered: