Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.NullReferenceException when downloading Power Pages site with Shortcut or Publishing State Transition Rule #1064

Open
sokaxen opened this issue Oct 23, 2024 · 0 comments

Comments

@sokaxen
Copy link

sokaxen commented Oct 23, 2024

I am having a similar issue to #806.

I'm trying to download a Power Pages site that uses enhanced datamodel using the following command:
pac pages download -id [website ID] -p [path] -mv 2 -o

After some investigation I seem to only hit this error if the portal contains a mspp_shortcut record and/or a mspp_publishingstatetransitionrule record.
If the portal doesnt contain records in both of those tables then the pac powerpages download works as expected.

The error I am hitting is as follows:

Information:
Be careful when you're updating public sites. The changes you make are visible to anyone immediately. To check site visibility go to https://make.powerpages.microsoft.com/.
To get additional information, please visit https://go.microsoft.com/fwlink/?linkid=2204350


Started downloading website [website ID]
Connected to... [Environment]
Downloading - webfiles
Downloading - powerpagesite
Downloading - powerpagesitelanguage
Downloading - powerpagecomponent
Downloaded - webfiles
Downloaded - powerpagesite
Downloaded - powerpagesitelanguage
Downloaded - powerpagecomponent
Sorry, the app encountered a non recoverable error and will need to terminate. The exception details have been captured and will be forwarded to the development team, if telemetry has been enabled. Session Id: 59eb82c3-9a5f-4a1e-93ae-6843b1ed5bd8, Exception Type: System.NullReferenceException
The diagnostic logs can be found at: C:\**\pac-log.txt

The log file has the following error:

2024-10-22 13:43:06.5946 | FTL | bolt.Session :: Object reference not set to an instance of an object.|EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
   at bolt.module.paportal.core.download.CoreEntityDownloader.<>c__DisplayClass16_0.<GroupRecordsByComponentType>b__2(IGrouping`2 g)

Here's an excerpt of the log file:

2024-10-22 13:43:06.5946 | FTL | bolt.Session :: Object reference not set to an instance of an object.|EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
   at bolt.module.paportal.core.download.CoreEntityDownloader.<>c__DisplayClass16_0.<GroupRecordsByComponentType>b__2(IGrouping`2 g)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at bolt.module.paportal.core.download.CoreEntityDownloader.GroupRecordsByComponentType(IDictionary`2 rawRecords, XmlDocument targetSchema)
   at bolt.module.paportal.core.download.CoreEntityDownloader.ExportDownloadedRecords(IDictionary`2 rawRecords, String tempRootFolder)
   at bolt.module.paportal.core.download.CoreEntityDownloader.ExportDataForAllEntities(String tempRootFolder)
   at bolt.module.paportal.PortalDataExporter.ExportDataForCoreEntities(String exportFolder, CliExecutionContext cliInfra, DownloadContext downloadContext)
   at bolt.module.paportal.PortalDataExporter.ExportDataForAllEntities(AuthProfile authProfile, String exportFolder)
   at bolt.module.paportal.PortalDataExporter.DownloadData(AuthProfile authProfile)
   at bolt.module.paportal.verbs.PAPortalDownloadVerb.<ExecuteAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<ExecuteImplAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<>c__DisplayClass8_1.<<ExecuteAsync>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<ExecuteWithTelemetryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<ExecuteAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<>c__DisplayClass11_0.<<RunVerbExecutorAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<RunVerbExecutorAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<ExecuteWithOutputAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<ExecuteAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at bolt.cli.CommandProcessor.<ProcessCommands>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandProcessor.<LaunchCommand>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.ModeManager.<Dispatch>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.Session.<Run>d__14.MoveNext()
2024-10-22 13:43:06.6935 | ERR | bolt.Session ::    at bolt.module.paportal.core.download.CoreEntityDownloader.<>c__DisplayClass16_0.<GroupRecordsByComponentType>b__2(IGrouping`2 g)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at bolt.module.paportal.core.download.CoreEntityDownloader.GroupRecordsByComponentType(IDictionary`2 rawRecords, XmlDocument targetSchema)
   at bolt.module.paportal.core.download.CoreEntityDownloader.ExportDownloadedRecords(IDictionary`2 rawRecords, String tempRootFolder)
   at bolt.module.paportal.core.download.CoreEntityDownloader.ExportDataForAllEntities(String tempRootFolder)
   at bolt.module.paportal.PortalDataExporter.ExportDataForCoreEntities(String exportFolder, CliExecutionContext cliInfra, DownloadContext downloadContext)
   at bolt.module.paportal.PortalDataExporter.ExportDataForAllEntities(AuthProfile authProfile, String exportFolder)
   at bolt.module.paportal.PortalDataExporter.DownloadData(AuthProfile authProfile)
   at bolt.module.paportal.verbs.PAPortalDownloadVerb.<ExecuteAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<ExecuteImplAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<>c__DisplayClass8_1.<<ExecuteAsync>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<ExecuteWithTelemetryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandLine.VerbExecutor.<ExecuteAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<>c__DisplayClass11_0.<<RunVerbExecutorAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<RunVerbExecutorAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<ExecuteWithOutputAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.Verb.<ExecuteAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at bolt.cli.CommandProcessor.<ProcessCommands>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.CommandProcessor.<LaunchCommand>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.cli.ModeManager.<Dispatch>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at bolt.Session.<Run>d__14.MoveNext()
2024-10-22 13:43:06.7917 | INF | bolt.Session :: End session. (sessionId: 47fd9dac-6a14-4f52-929b-9cda9cfebf13; ResponseCode: 500)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant