jira-azuredevops-migrator icon indicating copy to clipboard operation
jira-azuredevops-migrator copied to clipboard

jira-export crashes mid-job (System.ArgumentOutOfRangeException)

Open The-Judge opened this issue 3 years ago • 3 comments

Describe the bug During jira-export execution, a System.ArgumentOutOfRangeException occurs. It first runs fine for the first projects but then crashes. In our config, we use a quite wide JQL to catch ALL issues: summary is not EMPTY ORDER BY createdDate ASC The export starts, successfully extract 6 projects and with the 7th, it suddenly crashes.

To Reproduce Steps to reproduce the behavior:

  1. I can't provide; it has not happened with a JQL for 3 single projects of the same Jira in a row now, but it happens with the 4th config.

Expected behavior The application should not crash.

Error log

[E][11:21:14] Unexpected migration error.
[System.ArgumentOutOfRangeException] System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at JiraExport.JiraMapper.MapEpicChildLink(JiraRevision r, List`1 links, String field, String type)
   at JiraExport.JiraMapper.MapLinks(JiraRevision r)
   at JiraExport.JiraMapper.MapRevision(JiraRevision r)
   at JiraExport.JiraMapper.<>c__DisplayClass10_0.<Map>b__2(JiraRevision r)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at JiraExport.JiraMapper.Map(JiraItem issue)
   at JiraExport.JiraCommandLine.ExecuteMigration(CommandOption user, CommandOption password, CommandOption url, CommandOption configFile, Boolean forceFresh, CommandOption continueOnCritical):
   at System.String.Substring(Int32 startIndex, Int32 length)
   at JiraExport.JiraMapper.MapEpicChildLink(JiraRevision r, List`1 links, String field, String type)
   at JiraExport.JiraMapper.MapLinks(JiraRevision r)
   at JiraExport.JiraMapper.MapRevision(JiraRevision r)
   at JiraExport.JiraMapper.<>c__DisplayClass10_0.<Map>b__2(JiraRevision r)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at JiraExport.JiraMapper.Map(JiraItem issue)
   at JiraExport.JiraCommandLine.ExecuteMigration(CommandOption user, CommandOption password, CommandOption url, CommandOption configFile, Boolean forceFresh, CommandOption continueOnCritical)

Desktop (please complete the following information):

  • OS: Windows 10 10.0.18363 Build 18363
  • Jira: v8.13.0

Additional context Command used: ./jira-export -u fjira -p PASSWORD_REMOVED --url https://jira.ourdomain.net --config ..\configs\ALL.json --force

AB#4700

The-Judge avatar Mar 18 '21 10:03 The-Judge

Following. Same issue here on Windows 10 using Jira Cloud. I've migrated around 10 project with no issue. This one started doing the same as @The-Judge.

The export says it exported all the items that I see in the JQL query (880) but there are only around 60 json files in the export folder.

Jira version : 1001.0.0-SNAPSHOT Jira type : Cloud System : Microsoft Windows 10.0.19042 jira-azuredevops-migrator-2.3.117 Agile template

[E][16:48:10] Unexpected migration error.
[System.ArgumentOutOfRangeException] System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at JiraExport.JiraMapper.MapEpicChildLink(JiraRevision r, List`1 links, String field, String type)
   at JiraExport.JiraMapper.MapLinks(JiraRevision r)
   at JiraExport.JiraMapper.MapRevision(JiraRevision r)
   at JiraExport.JiraMapper.<>c__DisplayClass10_0.<Map>b__2(JiraRevision r)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at JiraExport.JiraMapper.Map(JiraItem issue)
   at JiraExport.JiraCommandLine.ExecuteMigration(CommandOption user, CommandOption password, CommandOption url, CommandOption configFile, Boolean forceFresh, CommandOption continueOnCritical): 
   at System.String.Substring(Int32 startIndex, Int32 length)
   at JiraExport.JiraMapper.MapEpicChildLink(JiraRevision r, List`1 links, String field, String type)
   at JiraExport.JiraMapper.MapLinks(JiraRevision r)
   at JiraExport.JiraMapper.MapRevision(JiraRevision r)
   at JiraExport.JiraMapper.<>c__DisplayClass10_0.<Map>b__2(JiraRevision r)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at JiraExport.JiraMapper.Map(JiraItem issue)
   at JiraExport.JiraCommandLine.ExecuteMigration(CommandOption user, CommandOption password, CommandOption url, CommandOption configFile, Boolean forceFresh, CommandOption continueOnCritical)
[I][16:48:10] Export complete. Exported 881 items (1 errors, 109 warnings) in 00:02:42.

oarm14 avatar Jun 11 '21 00:06 oarm14

Looks like this was resolved in #276 but never merged.

oarm14 avatar Jun 14 '21 23:06 oarm14

Just wanted to inform that for as long as this Bug is open, in the meantime I switched employers and aren't in need of a solution anymore. I'll unsubscribe, but will leave it open since others seem to have similar issues. Sad, that even after more than 4 months, there is not even a reply from a project member. Future users should take this into account when evaluating this software/agency behind it as their tool/partner.

The-Judge avatar Jul 28 '21 11:07 The-Judge

This issue was addressed in https://github.com/solidify/jira-azuredevops-migrator/pull/468, closing

Alexander-Hjelm avatar Aug 24 '22 12:08 Alexander-Hjelm