On behalf of our customer, we executed the ModernizationScanner after the migration from an OnPremise system to O365. We received the following error message ~ 300 times.
at SharePoint.Modernization.Scanner.Core.Analyzers.WorkflowAnalyzer.<>c.<Analyze>b__5_18(WorkflowDefinition p) in C:\github\sp-dev-modernization\Tools\SharePoint.Modernization\SharePointPnP.Modernization.Scanner.Core\Analyzers\WorkflowAnalyzer.cs:line 119
at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
at SharePoint.Modernization.Scanner.Core.Analyzers.WorkflowAnalyzer.Analyze(ClientContext cc) in C:\github\sp-dev-modernization\Tools\SharePoint.Modernization\SharePointPnP.Modernization.Scanner.Core\Analyzers\WorkflowAnalyzer.cs:line 119
According to my understanding, the variable p in line 119 or p.RestrictToType can be null, which is why the error listed here occurs. The same problem may occur in line 220.
ScannerSummary.csv Content
Site collections scanned | Webs scanned | List scanned | Scan duration | Scanner version
-- | -- | -- | -- | --
63395 | 91696 | 682210 | 3 days - 14 hours - 8 minutes and 36 seconds | 2.8.0.0
I suspect that workflows already existed in SiteCollection and that they have been deleted or not migrated. Which is why this error occurs.
Nevertheless I expect an error-free execution of the scanner.
Thanks for reporting this @samtrion, I'll look into this for the next release. Once it's fixed you can, if that would still be needed, run the scan but then just the workflow component.
We will definitely have to repeat this process several times in the coming weeks. Since we have only analyzed a fraction so far.
Since you seem to be scanning a fairly large tenant you can boost performance by:
Also, if you feel certain information would be good to include in the reports then let me know
Problem has been fixed and will be part of the upcoming 2.10 release. I'm closing this issue now, feel free to create a new issue if you still have issues when testing with the 2.10 release