I'm trying to use aura storage in an app included from a VF page, but I have the following error. Same code works well for a standalone .app
Uncaught TypeError: $A.$clientService$.$initHost$ is not a function throws at https://xxxxxxx-developer-edition.eu11.force.com/distributor/auraFW/javascript/-Nl7t7IjS5oiqOIuVwZRSw/aura_proddebug.js:17270:24
Sample app code :
<aura:application access="GLOBAL"
extends="ltng:outApp"
description="Only used for visualforce page javascript inclusion of main big component">
template="c:TemplateAppForStorage"
<aura:dependency resource="c:MyMainBigComponent"/>
</aura:application>
TemplateAppForStorage:
<aura:component isTemplate="true" extends="aura:template" description="App template to initialize storage">
<aura:set attribute="auraPreInitBlock">
<!-- Note that the maxSize attribute in auraStorage:init is in KB -->
<auraStorage:init name="actions"
persistent="false"
secure="true"
maxSize="2048" />
</aura:set>
</aura:component>
Sample of including vf page
<apex:page sidebar="false" showHeader="false" standardStylesheets="false"
cache="false" applyBodyTag="false" applyHtmlTag="false">
<apex:includeLightning />
<div id="lightningvfDIV" style="min-height: 100% !important;display:block;"/>
<script>
$Lightning.use("c:MyAppForVfPage", function() {
$Lightning.createComponent("c:MyMainBigComponent",
{},
"lightningvfDIV",
function(cmp) {
console.log('Page includer initialized');
});
});
</script>