Closed FH-Inway closed 1 month ago
Thanks for reporting this. It's one of the unfortunate side-effects of the latest, critical security update on PSFramework, which really could not wait :(. Combined with a bit of overload at work and it's been taking me to solve this one. Expect a fix within the next few hours.
It should work with old templates, but if you have custom templates that keep failing, try recording them again.
Version 2.2.12.171 is now out, should resolve the issue
Thanks for the quick fix. The good news is, the error does not occur anymore. The bad news: The files generated by Invoke-PSMDTemplate
are now missing content.
I used the following command:
Invoke-PSMDTemplate CommandTest -Name Invoke-PSMDTemplate
I ran it once with the latest versions of PSFramework (1.12.346) and PSModuleDevelopment (2.2.12.171): Invoke-PSMDTTemplate.Tests.2.2.12.171.ps1 And once with earlier versions (PSFramework: 1.11.343, PSModuleDevelopment 2.2.11.168), where the content of the generated file matches what I expected so far: Invoke-PSMDTTemplate.Tests.2.2.11.168.ps1
My gist Test Invoke-PSMDTemplate also includes a script for running Invoke-PSMDTemplate
with the earlier versions (assuming these versions are installed).
Since this issue is resolved and this new behavior seems more like a regression issue for PSModuleDevelopment, do you want me to close this issue and create a new one over at https://github.com/PowershellFrameworkCollective/PSModuleDevelopment/issues ?
Thanks for the swift response and test. Yes, shifting this over to the other repository would be good. Will look into it right away and also include automatic tests for template integrity for the next version. Really should have caught that - "Looked good" when I manually checked the result, but obviously didn't check well enough, sorry.
All good. Good idea with the automated template integrity test. Closing down here, will create a new issue on PSModuleDevelopment.
Invoke-PSMDTemplate
started failing with the following error on Windows Server 2022:This happens with versions 1.12.345 and 1.12.346 of PSFramework. Version 1.11.343 works. Example failing run with version 1.12.346: https://github.com/d365collaborative/d365fo.tools/actions/runs/11161820250/job/31030721873#step:7:22
This looks similar to https://github.com/PowershellFrameworkCollective/PSModuleDevelopment/issues/202, but not sure if it is the same root cause.
Call stack I have been able to piece together:
Invoke-PSMDTemplate
: https://github.com/PowershellFrameworkCollective/PSModuleDevelopment/blob/0cbff3f2918d851c0d3291704c6480fe44bc9c07/PSModuleDevelopment/functions/templating/Invoke-PSMDTemplate.ps1#L203Import-PSFClixml
: https://github.com/PowershellFrameworkCollective/psframework/blob/aab5bf9dae41f4dd626a3d9037baf10b122b45e3/PSFramework/functions/serialization/Import-PSFClixml.ps1#L50ClixmlSerializer.FromByteCompressed
: https://github.com/PowershellFrameworkCollective/psframework/blob/aab5bf9dae41f4dd626a3d9037baf10b122b45e3/library/PSFramework/Serialization/ClixmlSerializer.cs#L132Content of
$error
:More detailed error messages from
Get-PSFMessage -Errors
:Error message 1
Error message 2
@splaxi: fyi