Jira CreateIssue exception C#

Hello everyone, I hope I am not reposting this issue. I am using Atlassian SDK and trying to create a new Issue via code. Every request works fine but not the create jira Issue (user credentials available can interrogate any issue etc.).
the request looks like the following:

 var issueTypes = await jira.IssueTypes.GetIssueTypesForProjectAsync(Data.Constants.Jira.ProjectKey);
 var priorities = await jira.Priorities.GetPrioritiesAsync();
 var issue = jira.CreateIssue(Data.Constants.Jira.ProjectKey);
issue.Summary = jiraIssue.TicketSummary;
issue.Description = jiraIssue.Description;
issue.Assignee = user;
issue.Priority = priorities.FirstOrDefault(priority => priority.Name == jiraIssue.Priority);
issue.Type = issueTypes.FirstOrDefault(type => type.Name == "Kanban Task");
                
issue.Reporter = user;
jiraIssue.Components.ForEach(component => issue.Components.Add(component));
issue.Labels.Add(jiraIssue.Label);

return (true, await jira.Issues.CreateIssueAsync(issue, cancellationToken))

This requests is terminated with the following exception:
{“errorMessages”:[“Can not instantiate value of type [simple type, class com.atlassian.jira.rest.v2.issue.IssueUpdateBean] from JSON String; no single-String constructor/factory method”]}

I tried pretty much everything to solve this but i always receive this message, which i can’t really solve.
Does anyone have any hints on how to possibly solve this ?
Thank you.

Just checking: Are you calling a Jira Cloud site with this? The Atlassian SDK is for Jira Server/DC, and is not always 100% compatible with Jira Cloud APIs.

Not entirely sure, how the IT guys have this configured. I do know that jira is customized fully for our company. I went with the presumption that this SDK is ok to use to communicate with JIRA.
As mentioned in the thread, all requests are going through, single one that is crashing is the Create Issue and i double checked that is my user has wrights to create issues for that specific project.

If your site lives at https://somename.atlassian.net then it is definitely Jira Cloud. Atlassian does not publish a C# client library for Jira Cloud, although you can probably build one from the OpenAPI spec. I’m guessing that the SDK you are using is designed for Jira Server.

yes, based on your description then it is definitely Jira Server used.

can be marked as finished … apparently i was using an outdated SDK … latest version is 13 i was way behind. Updated it and now it is working.

2 Likes