Invoke-PnPSiteTemplate: Object reference not set to an instance of an object.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
I'm getting the following error when trying to import a PNP template.
I'm using PowerShell 7.3.1
Get-PnPException is:
Message : Object reference not set to an instance of an object.
Stacktrace : at PnP.PowerShell.Commands.Base.PnPConnectedCmdlet.ProcessRecord() in c:\build\src\Commands\Base\PnPConnectedCmdlet.cs:line 79
at PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord() in c:\build\src\Commands\Base\PnPSharePointCmdlet.cs:line 121
at System.Management.Automation.CommandProcessor.ProcessRecord()
ScriptLineNumber : 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Invoke-PnPSiteTemplate with PowerShell 7.3.1, then inspect PnPConnectedCmdlet.cs at line 79 and PnPSharePointCmdlet.cs at line 121 using the reported stack trace. Identify which object is null during template import; done means the reported template import no longer raises the null-reference exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100