pnp / pnp/pnpframework

Invoke-PnPSiteTemplate: Object reference not set to an instance of an object.

Open
#822 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.