Modernization: WorkflowAnalyzer: Object reference not set to an instance of an object.

Created on 19 Feb 2020  路  4Comments  路  Source: pnp/modernization

Category

  • [x] Bug

Problem Area

  • [x] Modernization Scanner: something went wrong...

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.

bug ModernizationScanner

All 4 comments

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:

  • Running the scan close to the datacenter hosting SharePoint...an Azure VM in the same region is ideal
  • Bump the number of threads to 20 (from default 10)
  • Use filters or CSV with sites to scan and run multiple parallel scans from multiple machines

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

Was this page helpful?
0 / 5 - 0 ratings