Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted to write progress on an uninitialized ProgressRecord #274

Closed
benclaussen1 opened this issue Feb 25, 2022 · 3 comments
Closed

Attempted to write progress on an uninitialized ProgressRecord #274

benclaussen1 opened this issue Feb 25, 2022 · 3 comments
Labels
bug Issues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version

Comments

@benclaussen1
Copy link

Describe the bug

While updating our deprecated DNS sensors, I was going to remove the old ones when I received this error:

PS C:\> $DNSSensors | ogv -pass | Remove-Object -Force
Remove-Object : Attempted to write progress on an uninitialized ProgressRecord. If this is a Release build, please
report this bug along with the cmdlet chain you tried to execute. To disable PrtgAPI Cmdlet Progress in the meantime
use Disable-PrtgProgress.
At line:1 char:27
+ $DNSSensors | ogv -pass | Remove-Object -Force
+                           ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-Object], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,PrtgAPI.PowerShell.Cmdlets.RemoveObject

After running Disable-PrtgProgress my pipeline executed successfully.

Steps to reproduce

# This is specific to my actions which led to this error:

# Get a list of sensors
$DNSSensors = Get-Sensor -Filter (New-SearchFilter -Property Type -Operator Contains  -Value 'dns')

$DNSSensors | ogv -pass | Remove-Object -Force

What is the output of 'Get-PrtgClient -Diagnostic'?

PSVersion      : 5.1.19041.1320
PSEdition      : Desktop
OS             : Microsoft Windows 10 Enterprise
PrtgAPIVersion : 0.9.17
Culture        : en-US
CLRVersion     : 528372
PrtgVersion    : 22.1.74.1869
PrtgLanguage   : english.lng

Additional context

No response

@benclaussen1 benclaussen1 added the alleged-bug Bugs raised by people helpfully using the Bug Report template! label Feb 25, 2022
@lordmilko lordmilko added bug Issues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version and removed alleged-bug Bugs raised by people helpfully using the Bug Report template! labels Feb 27, 2022
@lordmilko
Copy link
Owner

Hi @benclaussen1,

Please be advised a new pre-release version of PrtgAPI has now been released which should include a fix for this issue. Please see the manual installation instructions for details on how to run this pre-release version.

This issue specifically only occurs when executing a pipeline in the form Variable -> Third Party Cmdlet PrtgAPI doesn't have special handling for (e.g. Out-GridView) -> PrtgAPI Cmdlet, so depending on how you use PowerShell this issue may or may not have a big impact in day to day usage of PrtgAPI

Regards,
lordmilko

@benclaussen1
Copy link
Author

benclaussen1 commented Mar 3, 2022 via email

@benclaussen1
Copy link
Author

Tested this morning... Working perfectly for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version
Projects
None yet
Development

No branches or pull requests

2 participants