Skip to content

Publishing module using Sampler throws an error #509

@ykuijs

Description

@ykuijs

Problem description

The pipeline of my module throws an error since this week. I suspect this is caused by v0.118.2 of Sampler:

Image

Verbose logs

About to release '/home/runner/work/M365DSC.CompositeResources/M365DSC.CompositeResources/output/M365DSC.CompositeResources/1.25.122.100'.
  Outputting configured repositories using command Get-PSResourceRepository

Name      Uri                                      Trusted Priority
----      ---                                      ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False   50
  Publishing using command Publish-PSResource
ERROR: Error occured while running 'Test-ModuleManifest': Object reference not set to an instance of an object.
At /home/runner/work/M365DSC.CompositeResources/M365DSC.CompositeResources/output/RequiredModules/Sampler/0.118.2/tasks/release.module.build.ps1:389 char:13
+             Publish-PSResource @PublishModuleParams
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At /home/runner/work/M365DSC.CompositeResources/M365DSC.CompositeResources/output/RequiredModules/Sampler/0.118.2/tasks/release.module.build.ps1:339 char:1
+ task publish_module_to_gallery -if ($GalleryApiToken -and (Get-Comman …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 2 tasks, 1 errors, 0 warnings 00:00:02.1522950
Publish-PSResource: /home/runner/work/M365DSC.CompositeResources/M365DSC.CompositeResources/output/RequiredModules/Sampler/0.118.2/tasks/release.module.build.ps1:389

How to reproduce

Not sure

Expected behavior

Successful publication of the module.

Current behavior

Throws an error message

Suggested solution

Do not know the root cause

Operating system the target node is running

Ubuntu
  24.04.1
  LTS

PowerShell version and build the target node is running

PSv7 as part of Build image

Module version used

Most recent (0.118.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug.help wantedThe issue is up for grabs for anyone in the community.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions