partytown icon indicating copy to clipboard operation
partytown copied to clipboard

Smartlook via GTM: `TypeError: Cannot read properties of undefined (reading 'WebWorker')`

Open joelmoss opened this issue 1 year ago • 1 comments

  • [ ] I am interested in helping provide a fix!

Describe the bug Using Google Tag Manager to load Smartlook, and coming across this error in the smartlook script:

TypeError: Cannot read properties of undefined (reading 'WebWorker')
    at 4947 (main-20220808093649.js:formatted:12:35)
    at r (main-20220808093649.js:formatted:23:28)
    at eval (main-20220808093649.js:formatted:4357:17)
    at eval (main-20220808093649.js:formatted:4545:14)
    at Proxy.eval (main-20220808093649.js:formatted:4546:10)
    at Me (3ebfc38f-e80f-4f19-870b-45b10a43dfd9:2:7940)
    at 3ebfc38f-e80f-4f19-870b-45b10a43dfd9:2:19628
(anonymous) @ 3ebfc38f-e80f-4f19-870b-45b10a43dfd9:2
await in (anonymous) (async)
Ze @ 3ebfc38f-e80f-4f19-870b-45b10a43dfd9:2

I have uploaded the smartlook code here, which unfortunately is a bit of mother!! It looks like it is encountering an error with a webworker that smartlook is creating.

window.LZUTF8.WebWorker.scriptURI = URL.createObjectURL(t)

I have tried to include as much as I can here, so hopefully this helps a little, but please let me know if you need anything else. Thank you!

Partytown version 0.6.4

joelmoss avatar Aug 16 '22 22:08 joelmoss

any update on this?

omamazainab avatar May 17 '23 08:05 omamazainab