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 with reproduction steps – What is the expected behavior?
On some sites, there can be a large number of postMessage calls made for various purposes unrelated to the CMP. As a result, the stub attempts to parse a lot of messages that are not JSON formatted and/or are not intended for the CMP. This results in many caught exceptions thrown. While not directly user impacting, this takes up unnecessary CPU cycles and makes debugging with caught exceptions very difficult with the caught exception "noise" coming from the CMP.
This could be mitigated significantly with a couple simple checks against string message payloads before attempting to parse them as JSON. A couple simple checks might be
Check that the payload starts with a curly bracket
Check that the payload contains "tcfapi"
The text was updated successfully, but these errors were encountered:
Version
1.3.1
Module (core, cmpapi, cli, stub, or testing)
stub
Describe with reproduction steps – What is the expected behavior?
On some sites, there can be a large number of postMessage calls made for various purposes unrelated to the CMP. As a result, the stub attempts to parse a lot of messages that are not JSON formatted and/or are not intended for the CMP. This results in many caught exceptions thrown. While not directly user impacting, this takes up unnecessary CPU cycles and makes debugging with caught exceptions very difficult with the caught exception "noise" coming from the CMP.
This could be mitigated significantly with a couple simple checks against string message payloads before attempting to parse them as JSON. A couple simple checks might be
The text was updated successfully, but these errors were encountered: