I managed to “Fix” it using polyfills for Object.assign : https://polyfill.io/v2/docs/
Basically just import this in your global headers:
But additionaly I can see that the code uses declaration of variables with the “const” command, which is not supported in IE10 and under.
I opened a ticket with support suggesting that this piece of code should be passed thru a javascript compiler like Babel to maximize the compatibility and not just newest browsers.
We have a similar error reporting tool and we are getting annoying errors because of this.
I hope the polyfill solution is useful for you guys.
This fix is only for 1st error.
I have such error on apple mobile devices
messageswidgetshell.js:12 TypeError: undefined is not a function (evaluating ‘Object.assign(document.createEvent(“Event”),t)’)
s @ messageswidgetshell.js:12
messagesInitialized @ messageswidgetshell.js:1
(anonymous function) @ messageswidgetshell.js:1
I got the same problem on IE11. The script contains a copy of “isMobile - https://github.com/kaimallea/isMobile”, this script doesn’t seems to be supported.
Can I configure the included script to avoid such error?.
We’ve been seeing thousands of error reports in our JS error monitoring that stem from the use of Object#assign in the script https://js.usemessages.com/messageswidgetshell.js. It looks like isMobile.js is included in messageswidgetshell.js, but the use of Object#assign is in code that has been concatenated to the end of isMobile.js.
The Object#assign method is not supported in browsers like IE and mobile Safari, hence the errors. If Hubspot is depending on https://js.usemessages.com/messageswidgetshell.js, it should replace that dependency. If it is maintaining the file, it should remove the use of Object#assign.
Hello!
I have such error on apple mobile devices
messageswidgetshell.js:12 TypeError: undefined is not a function (evaluating ‘Object.assign(document.createEvent(“Event”),t)’)
s @ messageswidgetshell.js:12
messagesInitialized @ messageswidgetshell.js:1
(anonymous function) @ messageswidgetshell.js:1