Closed camnewnham closed 7 months ago
The source of the problem is explained well here: microsoft/PowerShellForGitHub#413, and an appropriate fix that could be used in this project can be seen in microsoft/PowerShellForGitHub#415
Thanks @HowardWolosky, Is there anything I can do to work around this as a user or do I need to wait for an update from the maintainers? (I can see your list amongst the commits a few years ago!)
Fixed by #241 for StoreBroker v1 and #242 for StoreBroker v2.
Not sure if I'll be able to put out an updated nuget package or get an update out to PowerShellGallery in the near future, but if you have your Action pull from this repo directly and then import the module, you should be unblocked.
Hello @HowardWolosky, do you have any estimation when this fix can be published in PowerShellGallery? It seems to me that pulling directly from github repo and building it inside of github action is not the best long term solution.
Thanks @HowardWolosky For anyone coming across this I added this to the start of my StoreBroker CI...
git clone https://github.com/microsoft/StoreBroker.git
Import-Module .\StoreBroker\StoreBroker\StoreBroker.psd1 -Verbose
@HowardWolosky I'm still getting an exception with PackageTool:
Write-Error: D:\a\..\..\StoreBroker\StoreBroker\PackageTool.ps1:3760
Line |
3760 | Write-Log -Exception $_ -Level Error
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 2024-02-02 00:26:10 : runneradmin : Remove-DeprecatedProperties:
| D:\a\xr.unity\xr.unity\StoreBroker\StoreBroker\PackageTool.ps1:2828 Line | 2828 | … questBody =
| Remove-DeprecatedProperties -SubmissionRequestBody $submi … |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | You cannot call a method on a null-valued
| expression.
Error: Process completed with exit code 1.
Or have I done the import/update wrong?
Thanks @camnewnham importing was successfull, but I also got another issue
Write-Error: C:\x\.github\windows\StoreBroker\StoreBroker\PackageTool.ps1:3760
Line |
3760 | Write-Log -Exception $_ -Level Error
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 2024-02-02 07:01:44 : runneradmin : Convert-ListingToObject:
| C:\x\.github\windows\StoreBroker\StoreBroker\PackageTool.ps1:1390 Line | 1390 |
| Convert-ListingToObject -PDPRootPath $PDPRootPath -LanguageEx … |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot bind argument to parameter
| 'NamespaceUri' because it is an empty string.
Error: Process completed with exit code 1.
@szujak - The problem you're seeing is unrelated to this problem. Go ahead and file a different issue, and try to provide additional lines from your StoreBroker.log file leading up to that error. The root issue it points to is that the .xml file that your using for your PDP files is missing a namespace attribute. In the new issue that you open, you can cover how you created those PDP files and possibly even share a sample one.
@camnewnham - Nothing wrong on your end. I did a bad merge. Parameter for DeepCopy-Object
in this project is Object
, but the new code is referencing InputObject
. Will get that fixed.
@camnewnham The problem you were seeing should now be fixed as of #246.
@HowardWolosky When will be a new release in the PSGallery?
@HowardWolosky When will be a new release in the PSGallery?
Likely early this week.
This fix has now been published to PowerShellGallery.
/cc: @zhuxb711, @camnewnham, @szujak
Fantastic, we appreciate the quick triage @HowardWolosky :)
Github Actions runners have just been updated from Powershell Core to Powershell 7.4.x : https://github.com/actions/runner-images/issues/9115
This is causing an exception in PackageTool.ps1: