3

We have a VF page that basically just embeds a lightning component. We've been using this page for some time now, but then it just suddenly stopped working and showed the error:

This page has an error. You might just need to refresh it. Assertion Failed!: Provider type not supported : false Failing descriptor: {c:LeadSearchBar}

Refreshing the page didn't help. Not sure if it's related, but I saw this on the console logs:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://ourcompany.lightning.force.com') does not match the recipient window's origin ('https://ourcompany.cs94.my.salesforce.com').

No error on the actual debug logs.

Then when I tried to create a Lightning App Page via the Lightning App Builder and incorporate the same lightning component we used on the VF page, I got the following error:

A Component Error has occurred!

Message: Assertion Failed!: Provider type not supported : false

Component Descriptor: markup://c:LeadSearchBar

Filename: https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js

Function: QA.log

Line: 237

Column: 157

Stack Trace: QA.log()@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:237:157 $.z.assert()@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:784:397 a.P.Pd()@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:390:477 a.P as constructor@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:388:428 new a()@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:275:254 V.Db()@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:639:465 a.z.Pd()@https://ourcompany.lightning.force.com/auraFW/javascript/m1kqsGvUD3kBv3RmG5pSKA/aura_prod.js:333:140

Is there an Aura update on Salesforce that could have possibly caused this?

We didn't modify anything on our code base and our metadata, and the error also suddenly appeared on our sandbox, which was created days before this happened. This is why we're thinking there must be some changes on Salesforce's side we're not aware of.

2
  • Could you share your code for the component that's failing ? Commented Jun 10, 2018 at 14:50
  • Sorry I wasn't able to post the code before because I still had to ask for permission. Fortunately, this case has been solved already. Thanks! Commented Jun 10, 2018 at 20:53

2 Answers 2

7

For this type of error you should check this two possible issues:

1- Check all attributes that you're using on your [YourControllerClass].js, all should be called with a c. prefix (c. from controller).

Example:

{!account.name} <-- wrong
{!c.account.name} <-- right

2- Check all attributes that you're using on your [YourComponent].cmp, all should be called with a v. prefix.

Example:

{!opportunity.name} <-- wrong
{!v.opportunity.name} <-- right

Hope it helps ;)

0

I did some brute force testing by deleting/commenting blocks of code at a time to determine the root cause of the error. I discovered that our former devs may have forgotten to put the c. prefix when calling the action on the client-side controller. They used onchange="{!clearSearch}" instead of onchange="{!c.clearSearch}" inside the component code.

Looks like Salesforce enhanced their javascript QA tool that's why the error has been caught this time (tho it still kinda sucks that the error message and stack trace didn't really help). I guess our lightning component never really fully worked as expected before.

Thanks to everyone who took the time to read my post!

1
  • I agree, the error-handling sucks! This is a fairly common issue too, for example if you're working a lot with LWC (the syntax for which would onchange="{clearSearch}" Commented Feb 5, 2021 at 13:23

You must log in to answer this question.

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