Sep 25 2020 07:01 AM
Hello everyone!
I tried to add the code for the Google Tag Manager in the browser's console while I was on a modern page, but unfortunately when I'm in the tag manager's preview mode, the debug pane does not open and this error pops up in the console:
goog.asserts.AssertionError {
message: "Failure: Bad value `d8aec69a-5e9c-4c7a-ae18-1f0ba39af3bc` for
|filterCspNonceValue",
stack: "AssertionError: Failure: Bad value `d8aec69a-5e9c-4c7a-ae18-1f0ba39af3bc` for
|filterCspNonceValue
at new goog.asserts.AssertionError (https://tagmanager.google.com/debug:46:1056)
at Object.goog.asserts.fail (https://tagmanager.google.com/debug:49:89)
at Object.soy.esc.$$filterCspNonceValueHelper
(https://tagmanager.google.com/debug:738:137)
at Object.soy.$$filterCspNonceValue (https://tagmanager.google.com/debug:706:443)
at Object.gtm.debugui.soy.frame.renderContent
(https://tagmanager.google.com/debug:748:488)
at Object.gtm.debugui.frame.createInlineFrame_
(https://tagmanager.google.com/debug:756:404)
at Object.gtm.debugui.frame.init (https://tagmanager.google.com/debug:761:237)
at https://tagmanager.google.com/debug:761:385
at https://tagmanager.google.com/debug:762:3"
Adding the same script from google tag manager in a classic experience page and opening the debug pane works fine, without the assertion error occurring.
I also tried to use the SPFx extension (that seems to do pretty much the same thing) from this repository: https://gitlab.lsonline.fr/SharePoint/sp-dev-fx-webparts/gtm but the same issue occurs.
I am using SharePoint 2019 but this error pops up in SharePoint online too.