0

we're building a Lightning Community site, and we found a really peculiar and weird behavior. I'll try to isolate the problem to better explain it (I won't report the code at the moment, as this doesn't sound like to be the cause).

Basically, we are using Napili as template, and one page is having a strange behaviour when the browser page gets refreshed -> everything freeze and the page is not responsive anymore, caused by a memory leak.

The page is using a component used in other pages, always fine. The page is structured with 2 main columns of components. The component is fine if listed in the left column. The component "kills" the page after refresh if listed on the right column.

Stack trace not really useful:

AuraError {component: "lightning:tabset", componentStack: "[siteforce:routerInitializer] > [siteforce-generat…tning:tab] > [lightning:tab] > [lightning:tabset]", action: null, name: "TypeError", message: "Error in $A.getCallback() [Cannot read property 'parentNode' of null]", …}

AuraError {component: "c:ComponentName", componentStack: "[siteforce:routerInitializer] > [siteforce-generat…ession] > [aura:expression] > [c:ComponentName]", action: null, name: "ReferenceError", message: "afterRender threw an error in 'c:ComponentName' [$ is not defined]", …}

We performed many tests, even with the component entirely empty, and still it crashes the page when refreshing.

Have you experienced anything similar before? Otherwise we'll proceed with opening a support case with SF.

Thanks

0

Found the problem. I'll post here the result as it might be useful for anyone that finds himself/herself in the same position and struggles to debug it.

Basically, there was an override of the method afterRender, which was loading another style class. The first load was ok, the second was having a problem in loading it, crashing the page and having a big memory leak.

afterRender: function(component, event, helper) {
  this.superAfterRender();
  $("svg.slds-icon.slds-icon-text-default.slds-icon--x-small.slds-icon").addClass("theclasscalled");
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.