akamai / boomerang

End user oriented web performance testing and beaconing
http://akamai.github.io/boomerang/
Other
1.86k stars 292 forks source link

Bug: Trying to read metric from plugin that is undefined #331

Open danielgsims opened 2 years ago

danielgsims commented 2 years ago

I am experiencing an edge case where I am trying to read Time to First Interaction, but do not have the EventTiming plugin.

https://github.com/akamai/boomerang/blob/master/plugins/continuity.js#L3369-L3376

In the above code, there is a path where fid is loaded from the externalMetrics while the EventTiming plugin is undefined or not enabled, but then ttfi tries to read from the EventTiming plugin while it is undefined, resulting in the error TypeError: Cannot read properties of undefined (reading 'metrics')

bluesmoon commented 2 years ago

Thank you for investigating and reporting this issue.