Closed jaredrileysmith closed 3 years ago
We also experienced this issue, and I did some debugging. It happens if you have Data Elements that result in the value null. Having undefined, a function, a string, a number etc. works fine, but null leads to this error.
Line 82+83 of the Extension do that:
typeof cleanValue === 'object' &&
typeof cleanValue.then === 'function'
This check is not enough, because typeof cleanValue === 'object' will still work for null, but typeof cleanValue.then === 'function' is the JavaScript error. The extension needs to be modified to:
typeof cleanValue === 'object' &&
cleanValue != null &&
typeof cleanValue.then === 'function'
This would fix the error. You can fix the error on Launch side if you avoid null in your Data Elements for now.
Hi all
@jaredrileysmith thanks for flagging this issue, and @sschaefa thank you for digging in and identifying the solution. Frustratingly, this is an issue that was initially fixed a few months ago, but I apparently missed another location where it could occur. This will be fixed in dataslayer 1.5.1 which I am sending to the web store momentarily.
Best Sean
Please include, if available:
the URL of the page with an error https://www.peacocktv.com
the dataslayer export, if possible (click the file icon on the right of the panel, then export to a JSON file) unable to attach JSON file
any errors in the console for the page Uncaught TypeError: Cannot read property 'then' of null
any errors in the console (and, if possible, the full log) for dataslayer (you can access this by right-clicking in the dataslayer panel, clicking "Inspect", and looking in the new DevTools instance that pops up) None observed
your Chrome version and dataslayer version Chrome 90.0.4430.93 dataSlayer 1.5.0
Please be advised that this issue results in failure of Adobe Launch actions (e.g. tracking calls not sent, etc.)
Images below for illustration of observations