You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In report.js, matchedMessage.path is sometimes an array, not a path. I believe this is on restart when it loads up a cached version of the current warning.
Provide an example
See below for st, this is in a path-regex-match filter which fails:
Expected behavior
Hopefully the email sender doesn't crash :)
Are you using the binary or the source code?
Source, on the release branch.
Your information
AS397444.
In getContext in the showPaths > 0 if block, after the content.data.filter filter runs, you can get: matchedMessage.path: [ 20912, 6939, 57695, 397444 ] matchedMessage.path.getValues: undefined
(note line number is off by a few here as I added some console.log to get the above info):
TypeError: path.matchedMessage.path.getValues is not a function
at forEach (/home/bgpalerter/BGPalerter/src/reports/report.js:95:41)
at Array.forEach (<anonymous>)
at ReportEmail.getContext (/home/bgpalerter/BGPalerter/src/reports/report.js:92:18)
at ReportEmail.getEmailText (/home/bgpalerter/BGPalerter/src/reports/reportEmail.js:113:30)
at ReportEmail.report (/home/bgpalerter/BGPalerter/src/reports/reportEmail.js:141:35)
at clb (/home/bgpalerter/BGPalerter/src/reports/report.js:50:29)
at /home/bgpalerter/BGPalerter/src/utils/pubSub.js:15:17
at new Promise (<anonymous>)
at _loop (/home/bgpalerter/BGPalerter/src/utils/pubSub.js:14:13)
at PubSub.publish (/home/bgpalerter/BGPalerter/src/utils/pubSub.js:13:36)
The text was updated successfully, but these errors were encountered:
Nice catch and thanks for reporting.
It was indeed caused by cached path objects that when converted from JSON lose their prototype.
There is no real reason to cache the latest alerts, to avoid duplicates on restart it's enough to store the sent dictionary.
I addressed this, now in release branch. I postponed the release to run it for a week with the new patch.
Describe the bug
In report.js, matchedMessage.path is sometimes an array, not a path. I believe this is on restart when it loads up a cached version of the current warning.
Provide an example
See below for st, this is in a path-regex-match filter which fails:
Expected behavior
Hopefully the email sender doesn't crash :)
Are you using the binary or the source code?
Source, on the
release
branch.Your information
AS397444.
In getContext in the showPaths > 0 if block, after the content.data.filter filter runs, you can get:
matchedMessage.path: [ 20912, 6939, 57695, 397444 ]
matchedMessage.path.getValues: undefined
(note line number is off by a few here as I added some console.log to get the above info):
The text was updated successfully, but these errors were encountered: