Script error windows


#1

Hello,

I have a error for code script in windows.
This code is - https://js.usemessages.com/messageswidgetshell.js

Please help


#2

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


#3

Hello,

Such error for me, is to windows a laptop, no apple, mobile device.

Thk’ s


#4

Hi,

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?.

Regards


#5

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.


#6

Hi all,

This should now be fixed (re. Error "Initial messages API call failed")


#7

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


#8

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.

Cheers.


#9

While making changes in the backend of hp customer support I got some script errors. Please tell me how to handle this ???