0

We use web components for header and footer in our application. When we try to integrate Sales force embedded chat, it's working fine in all browsers except IE11 and Edge.

When we remove webcomponents-bundle.js (polyfill for web components in IE and Edge), chat works fine, if we add it back, we are getting errors as mentioned below.

SCRIPT5007: Unable to get property 'get' of undefined or null reference aura_prod_compat.js (4,43619)

SCRIPT5007: Unable to get property 'isEmpty' of undefined or null reference lightning.out.delegate.js (153,33)

Why do I get this error? How can I fix it?

4
  • are you talking about web components or lightning web components - lwc is already serving polyfills so that may clash with the google ones. Also not clear if there is any other impact when you removing the google polyfills - if its working without them in ie / edge why not just remove it anyways? You may want to add some more details in your post about context etc.
    – Renji-xD
    Jun 24, 2019 at 12:53
  • yes i am talking about web components not lwc. If we remove webcomponents_bundle.js from our application, our header and footer are not working, since those are build using litelement (web component approach), but chat is working fine, if we add webcomponents_bundle.js back, chat will not work. Basically aura_prod.js is getting conflict with webcomponent_bundle.js, only in case of IE and Edge browser.
    – JAGAN MANI
    Jun 24, 2019 at 16:02
  • so you are embedding it on a external site (as other web components are not supported in lwc context) ? in that case it may makes more sense to open a case and ask direct for sf support. The code is coming from them and i could e. .g imagine they are still serving stuff which can clash. I also expect the amount users working with external Chat AND webcomponents relatively low which lowers to the chance to get a hint here
    – Renji-xD
    Jun 24, 2019 at 16:21
  • Yes, we are embedding on external site, which has web components. Do you mean aura_prod.js has stuff that clashes with webcomponent_bundle.js?
    – JAGAN MANI
    Jun 24, 2019 at 16:38

1 Answer 1

0

To sum up:

  • You are using Salesforce Functionality on a external Website
  • You are loading Polyfills for WC because you are using Lit-Element Components
  • Content is loaded via Lightning out (based on your shared Error)

I quickly tried out the github example for Lit-Elements and got the same Errors (without Chat, but trying to embed a Aura / LWC on a local HTML Site). When you debug the error you will see that loading the polyfills will lead to the fact that the shadow Root property is defined which executes a different behavior then if it would be undefined (what it normally would be for ie11 / edge).

So yes - i think you are facing an incompability between Web Components, (external) Polyfills and the Salesforce Framework because they depend on specific behavior which is not implement by other polyfills. What i would suggest is that you are opening a case to salesforce and specifically ask for support of Web Components (and their Polyfills - sharing your example in the context of lightning out) in an external Context.

Of course would be interesting if you share the result with us - i think i never read any specific documentation about it - so it is an interesting case for everybody i guess

1
  • Thanks Renji for quick response, Sure we will check with Sales force team, and keep posted.
    – JAGAN MANI
    Jun 24, 2019 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .