Zerg00s/FlowPowerAppsMigrator

Move-Lists.ps1 : You cannot call a method on a null-valued expression.

schullex opened this issue · 10 comments

When exporting lists following exception occurs:
Exporting lists and libraries...
Hidden fields count:
.......\FlowPowerAppsMigrator\MISC\Move-Lists.ps1 : You cannot call a method on a null-valued
expression.
At C:\Users\stefa\Downloads\FlowPowerAppsMigrator\RunAllScripts.ps1:98 char:5

  • . .\MISC\Move-Lists.ps1 -Path $Path -MigrationType Export -Source ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Move-Lists.ps1], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull,Move-Lists.ps1

hi @schullex,

Thank you for creating an issue with the error details. And sorry for the delay. I just published a new release: https://github.com/Zerg00s/FlowPowerAppsMigrator/releases/tag/3.9.6

Would you be able to try it, please? I hope the issue should be resolved in this version.

I am getting the same error as above, even with the newest release.

Do you mind sharing your Lists.xml file, please?

I'm trying to migrate a solution which does not contain a Lists.xml. The migrator pulls the lists directly from the source site.

hi @schullex,

The Lists.xml file is generated automatically during the migration process. All SharePoint lists pulled from the source site are saved to the Lists.xml file. If the export process is successful, this file should be located in the same folder with the .bat files:

image

Do you see this file in your Migrator folder?

@Zerg00s
I have the same issue as well. Can I send you my lists.xml file privately some how?

C:\Temp\FlowPowerAppsMigrator
Exporting lists and libraries...
Hidden fields count:
C:\Temp\FlowPowerAppsMigrator\MISC\Move-Lists.ps1 : You cannot call a method on a null-valued expression.
At C:\Temp\FlowPowerAppsMigrator\RunAllScripts.ps1:98 char:5
. .\MISC\Move-Lists.ps1 -Path $Path -MigrationType Export -Source ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidOperation: (:) [Move-Lists.ps1], RuntimeException
FullyQualifiedErrorId : InvokeMethodOnNull,Move-Lists.ps1

This may help @Zerg00s
I noticed that after the error occured, when I look at the resourceMapping.csv
It doesn't have the "newId" column filled in
image

Might be irrelevant, and Maybe that doesn't happen until later in the script. Just thought I'd point it out.

@lordneeko yes, please! Can you send me this XML file via a private message on LinkedIn? https://ca.linkedin.com/in/molodtsovd

hi @lordneeko and @smithiu. Thank you for sharing the issue details and the Lists.xml file. I was able to reproduce and fix the issue in the latest release: https://github.com/Zerg00s/FlowPowerAppsMigrator/releases/tag/3.9.7

Would you please be able to check if this version works for you?

Running now. It appears that this issue is fixed.