question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get-NotificationTrigger - There was an error deserializing the object of type PrtgAPI.NotificationTrigger

See original GitHub issue

The following error is generated when the sensor name contains quotation marks:

PS > get-sensor -Id 5725 | Get-NotificationTrigger
Get-NotificationTrigger : There was an error deserializing the object of type PrtgAPI.NotificationTrigger. Encountered unexpected character 'E'.                                                                                          At line:1 char:23                                                                                                                                                                                                                         + get-sensor -Id 5725 | Get-NotificationTrigger                                                                                                                                                                                           +                       ~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                           + CategoryInfo          : NotSpecified: (:) [Get-NotificationTrigger], SerializationException
+ FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,PrtgAPI.PowerShell.Cmdlets.GetNotificationTrigger

Sensor name: Disk Free: D:\ Label: Exchange “DATA” -> Generates the error Sensor name: Disk Free: D:\ Label: Exchange DATA -> No error

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lordmilkocommented, Feb 25, 2020

Thanks @astapelfeld,

I have managed to reproduce the issue by creating a new state trigger on an object whose name contains a quote. At a glance it appears PRTG is (once again) transmitting completely illegal JSON/XML around

Specifically, the href attribute of the objectlink JSON property in the response above decodes to the following

href=\"sensor.htm?id=5725\">Disk Free: D:&#92; Label: Exchange "DATA"</a>"

This is illegal; the quotes surrounding the word DATA should be double encoded so that they come out as single encoded when processed by a parser.

I will look into implementing a workaround for this. Thanks for raising this issue

0reactions
astapelfeldcommented, Mar 2, 2020

Hi @lordmilko , The problem is solved in the pre-release. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PrtgAPI.XML 0.7.2
Indicates a "Notify Changed" event occurred on an EXE/XML sensor, or that a WMI sensor encountered an error. </summary> </member> <member name="F:PrtgAPI.
Read more >
PrtgAPI.XML 0.9.2 - PowerShell Gallery
PrtgAPI.XML ... Specifies the type of object that should be used in conjunction with a ... A new subnode (such as a notification...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found