[SalesForce] Lightning Components don’t load for Salesforce Platform user license

I have a Lightning Component embedded in a Visualforce page using Lightning Out.

For users with Salesforce Platform license the page doesn't load at all. Instead I get following error in JS console:

https://enxoo-cpq-dev-ed–c.eu6.visual.force.com/c/CPQ_CONF00_OutApp.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT
404 (Not Found)

enter image description here

Changing user license back to Salesforce and everything works fine – page loads normally.

I have my domain enabled in the environment.

Is there any magic trick that should be done to enable that?

Best Answer

The problem was that one of the aura:attribute had sObject type declared that was only available for Salesforce license users.

<aura:attribute name="contract" type="Contract"/>

To solve it you can change it to

<aura:attribute name="contract" type="Object"/>

But you need to take into account that non-Salesforce license users will not see that object.