Open YeeSkywalker opened 3 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Please try executing Set-PnPTraceLog -On -Level Debug before the invoke commandlet and provide the detailed output.
Please try executing Set-PnPTraceLog -On -Level Debug before the invoke commandlet and provide the detailed output.
I executed Set-PnPTraceLog -On -LogFile "output.txt" -Level Debug before the invoke commandlet, but the output file is empty. It seems that the PnPTraceLog problem is similar to pnp/powershell#1061. I am wondering if there is other way to trace the debug process. Thanks for your help.
Remove -LogFile "output.txt" and let messages appear in the console as a next step. I'd be interested to see the last 10-30 lines before the script bails.
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.
Hey there, sorry for late responding. I have tried 'Set-PnPTraceLog -On -Level Debug' before 'Invoke-PnPTenantTemplate -Path starterkit.pnp', but nothing showed up in the terminal. However, I used 'Get-PnPException' and I got the following message:
I had the same error on macOS PowerShell. The detailed error was
pwsh Information: 0 : 2023-02-15 09:17:50.8911 [PnP.Framework] [0] [Information]File modernOffice_002.jpg retrieved from folder resources\images 0ms pwsh Information: 0 : 2023-02-15 09:17:50.8911 [Files] [19] [Debug] Uploading file resources\images\modernOffice_002.jpg 597ms 5cdb19cc-9aae-4b17-8f88-5d37f9ca1fc9 pwsh Error: 0 : 2023-02-15 09:17:52.3587 [PnP.Framework] [0] [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerException: The file or folder name "SiteAssets/resources\images\modernOffice_002.jpg" contains invalid characters. Please use a different name. Common invalid characters include the following: # % * : < > ? / |
As I understand the paths are mixed up "SiteAssets/resources\images\modernOffice_002.jpg".
Same error here on MacOS.
pwsh Information: 0 : 2024-09-04 20:08:42.7671 [PnP.Framework] [0] [Information] File contoso_report.pptx retrieved from folder resources\documents 0ms
pwsh Information: 0 : 2024-09-04 20:08:42.7672 [Files] [23] [Debug] Uploading file resources\documents\contoso_report.pptx 26771ms 0e55bd2d-19a5-40c9-966b-95db8c2ddcaa
pwsh Error: 0 : 2024-09-04 20:08:43.0606 [PnP.Framework] [0] [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerException: The file or folder name "Shared Documents/resources\documents\contoso_report.pptx" contains invalid characters. Please use a different name. Common invalid characters include the following: # % * : < > ? / |
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServerAsync(ChunkStringBuilder sb)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryAsync()
at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync()
Invoke-PnPTenantTemplate: Value cannot be null. (Parameter 'clientObject')
It's happening when copying most of the files in resources/images/*
As best I can tell, the issue with MacOS is PnP PowerShell and not the starter kit.
The kit does look to add sample files to doc library. Within the provisioning script, for example, this is achieved via:
<pnp:File Src="resources\documents\contoso_report.pptx" Overwrite="true" Folder="{resource:SharedDocumentsFolder}"></pnp:File>
It looks as though PnP PowerShell is then combining the src with the folder and adding this "/" which is not properly interpreted by MacOS PnP PowerShell.
You might need to reach out the PnP PowerShell community and provide what you are seeing along with the PnP Template lines that are throwing the error, i.e. the line provided above.
Category
Describe the bug
Expected or Desired Behavior
Observed Behavior
Steps to Reproduce
Environment Details (Development & Target environment)