Blocking error from "Create a Release in Octopus Deploy" for Azure DevOps

Dear support,

We have issues in using task “Create a Release in Octopus Deploy
Version: 4.2.485.” in agents of Azure DevOps self hosted server.

This issue appeared yesterday, as soon as we upgraded our self hosted Octopus server to V2021.2 (Build 7462)

Could you please help me in fixing the issue because it blocks all our deployment pipelines

Here are some details:

Log report from the task “Create a Release in Octopus Deploy
Version: 4.2.485.” in agents of Azure DevOps:

2021-09-15T06:51:05.6332670Z C:\agent\_work\r53\a>dotnet "C:\agent\_work\_tool\octo\7.4.3429\x64\/octo.dll" create-release "--space=Spaces-1" "--project=Projects-281" "--releaseNumber=3.9.4563" "--channel=Channels-281" "--server=http://octopus.....net/" "--apiKey=***" --ignoreSslErrors --enableServiceMessages "--releaseNotesFile=C:\agent\_work\r53\a\release-notes-4c7b3f90-15f1-11ec-aea6-1793173114c0.md" 
2021-09-15T06:51:06.2241005Z Octopus CLI, version 7.4.3429
2021-09-15T06:51:06.2248403Z 
2021-09-15T06:51:06.5718403Z Detected automation environment: "AzureDevOps"
2021-09-15T06:51:07.0688556Z Found space: ....... (Spaces-1)
2021-09-15T06:51:07.0699910Z Space name specified, process is now running in the context of space: .......
2021-09-15T06:51:07.0700714Z Handshaking with Octopus Server: http://octopus........net/
2021-09-15T06:51:07.0884381Z Handshake successful. Octopus version: 2021.2.7462; API version: 3.0.0
2021-09-15T06:51:07.1427699Z Authenticated as: ...... Azure devops server (a service account)
2021-09-15T06:51:07.1726684Z Found environments: 
2021-09-15T06:51:07.1890842Z This Octopus Server supports channels
2021-09-15T06:51:07.3244184Z Found project: ....... (Projects-281)
2021-09-15T06:51:07.3302236Z Building release plan for channel 'Channels-281'...
2021-09-15T06:51:07.4285207Z Found channel: Production (Channels-281)
2021-09-15T06:51:07.4353069Z Finding deployment process...
2021-09-15T06:51:07.4821650Z Finding release template...
2021-09-15T06:51:07.5984117Z The package version for some steps was not specified. Going to try and resolve those automatically...
2021-09-15T06:51:07.6533357Z Finding latest package for step: Deploy artifact
2021-09-15T06:51:08.2360011Z Octopus Server returned an error: Error converting value "Dates that were already inserted to database will not be fixed.
2021-09-15T06:51:08.2362002Z 
2021-09-15T06:51:08.2362649Z Dates that will be inserted after the fix will be stored in UTC format." to type 'Octopus.Server.Extensibility.JiraIntegration.Integration.JiraDoc'. Path 'issues[2].fields.comment.comments[0].body', line 1, position 1747.
2021-09-15T06:51:08.2363475Z Could not cast or convert from System.String to Octopus.Server.Extensibility.JiraIntegration.Integration.JiraDoc.
2021-09-15T06:51:08.2389966Z Error from Octopus Server (HTTP 500 InternalServerError)
2021-09-15T06:51:08.2390477Z Exit code: -7
2021-09-15T06:51:08.2648105Z ##[error]Error: The process 'C:\agent\_work\_tool\octo\7.4.3429\x64\octo.cmd' failed with exit code 4294967289
2021-09-15T06:51:08.2661258Z ##[error]Failed to deploy release The process 'C:\agent\_work\_tool\octo\7.4.3429\x64\octo.cmd' failed with exit code 4294967289
2021-09-15T06:51:08.2726579Z ##[section]Finishing: Create Octopus Release

Log report from Octopus server to V2021.2 (Build 7462):

2021-09-15 06:51:03.9008   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:07.7325   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:07.7873   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:07.8501   2752     64  INFO  Retrieved Jira Work Item data for work item ids......
2021-09-15 06:51:07.9419   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:08.0049   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:08.0680   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:08.1251   2752     64  INFO  Retrieved Jira Work Item data for work item ids ......
2021-09-15 06:51:08.1879   2752     64 ERROR  Error parsing JSON content for type Octopus.Server.Extensibility.JiraIntegration.Integration.JiraSearchResult. Content Type: '', content: {"expand":"schema,names","startAt":0,"maxResults":1000,"total":3,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"58900","self":"http://jira........net/rest/api/2/issue/58900","key":"....-208","fields":{"summary":"Implement UIDProtector transformer","comment":{"comments":[],"maxResults":0,"total":0,"startAt":0}}},{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"58800","self":"http://jira........net/rest/api/2/issue/58800","key":"....-207","fields":{"summary":"Implement Deterministic Identifier Anonymization transformer","comment":{"comments":[],"maxResults":0,"total":0,"startAt":0}}},{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"57900","self":"http://jira........net/rest/api/2/issue/57900","key":"....-645","fields":{"summary":"Date and time in DB is stored in wrong time zone ","comment":{"comments":[{"self":"http://jira........net/rest/api/2/issue/57900/comment/51701","id":"51701","author":{"self":"http://jira........net/rest/api/2/user?username=....","name":"....","key":".....","emailAddress":"......","avatarUrls":{"48x48":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=48","24x24":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=24","16x16":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=16","32x32":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=32"},"displayName":"....","active":true,"timeZone":"Europe/Kiev"},"body":"Dates that were already inserted to database will not be fixed.\r\n\r\nDates that will be inserted after the fix will be stored in UTC format.","updateAuthor":{"self":"http://jira........net/rest/api/2/user?username=....","name":"....","key":"....","emailAddress":"......","avatarUrls":{"48x48":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=48","24x24":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=24","16x16":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=16","32x32":"https://www.gravatar.com/avatar/e24be1a191025db90056a47cf2f1fb76?d=mm&s=32"},"displayName":"....","active":true,"timeZone":"Europe/Kiev"},"created":"2021-08-02T12:44:39.163+0200","updated":"2021-08-02T12:44:39.163+0200"}],"maxResults":1,"total":1,"startAt":0}}}]}, error: Newtonsoft.Json.JsonSerializationException: Error converting value "Dates that were already inserted to database will not be fixed.


Dates that will be inserted after the fix will be stored in UTC format." to type 'Octopus.Server.Extensibility.JiraIntegration.Integration.JiraDoc'. Path 'issues[2].fields.comment.comments[0].body', line 1, position 1747.
 ---> System.ArgumentException: Could not cast or convert from System.String to Octopus.Server.Extensibility.JiraIntegration.Integration.JiraDoc.
   at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
   at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   --- End of inner exception stack trace ---

Hi @pr,

Thanks for getting in touch!

There is currently a known issue within this version that causes release creation to fail if there is a JIRA work item that contains comments.
The fix has been completed and merged, we’re just waiting for the release to roll out.

In the meantime, the workaround would be to disabled the JIRA integration within Octopus (Configuration > Settings > Jira Integration > Is Enabled).

Regards,
Paul

Thanks Paul for your prompt answer !
Looking forward for the fix to be deployed.

Have a good day.

Pierpaolo

1 Like

thanks for the awesome information.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.