We are using Jira Software cloud and Scriptrunner to create custom notifications on creation and close of an issue. This was working fine until the business requested users be able to send an email to create an issue. Issues are created via email as expected but SR does not send the notification. The error I receive is below. The developer who helped me with the script is no longer with the company and I am trying to learn Groovy. I'd like to know if it is even possible to have SR work with email ingestion before spending time or asking for help from another developer.
"Error: java.lang.RuntimeException: com.mashape.unirest.http.exceptions.UnirestException: java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Cannot': was expecting ('true', 'false' or 'null') at [Source: Cannot generate an OAuth token for null user; line: 1, column: 7] at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143) at com.mashape.unirest.request.BaseRequest.asObject(BaseRequest.java:80) at com.adaptavist.sr.cloud.UnirestCustomiser.executeRequest(UnirestCustomiser.groovy:144) at com.adaptavist.sr.cloud.UnirestCustomiser.execAsPrefixMethod(UnirestCustomiser.groovy:109) at com.adaptavist.sr.cloud.UnirestCustomiser$_instrumentRequest_closure3.doCall(UnirestCustomiser.groovy:91) at Script1.run(Script1.groovy:7) at Script1$run.call(Unknown Source) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:30) at com.adaptavist.sr.cloud.workflow.SendNotification.run(SendNotification.groovy:121) Caused by: java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Cannot': was expecting ('true', 'false' or 'null') at [Source: Cannot generate an OAuth token for null user; line: 1, column: 7] at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:106) at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:139) at com.mashape.unirest.request.BaseRequest.asObject(BaseRequest.java:80) at com.adaptavist.sr.cloud.UnirestCustomiser.executeRequest(UnirestCustomiser.groovy:144) at com.adaptavist.sr.cloud.UnirestCustomiser.execAsPrefixMethod(UnirestCustomiser.groovy:109) at com.adaptavist.sr.cloud.UnirestCustomiser$_instrumentRequest_closure3.doCall(UnirestCustomiser.groovy:91) at Script1.run(Script1.groovy:7) at Script1$run.call(Unknown Source) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:30) at com.adaptavist.sr.cloud.workflow.SendNotification.run(SendNotification.groovy:121) at com.adaptavist.sr.cloud.MainHandler.executeScript(MainHandler.groovy:282) at com.adaptavist.sr.cloud.MainHandler.processInput(MainHandler.groovy:247) at com.adaptavist.sr.cloud.MainHandler$_handleRequest_closure1.doCall(MainHandler.groovy:117) at com.adaptavist.sr.cloud.MainHandler$_handleRequest_closure1.doCall(MainHandler.groovy) Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Cannot': was expecting ('true', 'false' or 'null') at [Source: Cannot generate an OAuth token for null user; line: 1, column: 7] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1487) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:518) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2299) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1458) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:683) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3604) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3549) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2580) at com.fasterxml.jackson.databind.ObjectMapper$readValue$4.call(Unknown Source) at com.adaptavist.sr.cloud.MainHandler$1.readValue(MainHandler.groovy:82) at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:101) ... 13 more"