1

Is there anyone get the same problem with following warning when working with Lightning? Please tell me if there is any hints or the ways to solve this. I really appreciate any help. Thank you!

aura_proddebug.js:19404 WARNING: Suppressed Error: Error::Uncaught TypeError: this.$adapter$.$getItems$(...).$then$ is not a function

I only got this warning when was trying to put this lightning component to LEX. Before that there is no warning if I put it in a lightning application for testing. Error

Here's the code :

<aura:component controller="SumaryController" implements="flexipage:availableForAllPageTypes,force:appHost‌​able"> 
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> 
    <div aura:id="chartDiv"> </div> <div aura:id="container"> </div> 
    <!-- JavaScript FRAMEWORK --> 
    <ltng:require styles="/resource/c3js/c3-0.4.11/c3.min.css" scripts="/resource/es6-shim.min.js, /resource/testL" afterScriptsLoaded="{!c.loadSsp}" /> 
</aura:component>
  • 2
    What exactly do you mean by "put this lightning component to LEX". What container is the component in? – TrevorBliss Dec 2 '16 at 18:30
  • 1
    Without the code it will be hard to tell anything ?would you mind sharing code of component – Mohith Shrivastava Dec 2 '16 at 22:15
  • @TrevorBliss, I am sorry for my English and not clearly question. Let me explain like this. - The lightning component which I was developing is "A" - The lightning application which is used for testing is "B" - The lightning app builder which is created for running is "C". When A in B there is no error happen, but when I put A in C the above error happen. – ted Dec 5 '16 at 3:06
  • @MohithShrivastava, thank you for your question. Here is my LC code: code<aura:component controller="SumaryController" implements="flexipage:availableForAllPageTypes,force:appHostable"> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <div aura:id="chartDiv"> </div> <div aura:id="container"> </div> <!-- JavaScript FRAMEWORK --> <ltng:require styles="/resource/c3js/c3-0.4.11/c3.min.css" scripts="/resource/es6-shim.min.js, /resource/testL" afterScriptsLoaded="{!c.loadSsp}" /> </aura:component> – ted Dec 5 '16 at 3:23
2

This is probably an issue with the es6-shim library and its Promise polyfill not meshing with Aura Framework's closure compiler.

Aura already has a Promise polyfill built in to the framework. Try removing this library import and see if the error goes away. If it does but you still need other parts of the library, maybe try removing the Promise section of the library and re-uploading the static resource.

  • Thank you for your suggesting. After es6-shim removed, the errors gone. Thank you very much. Btw, is there any reference document which explain for the difference between running lightning component in lex and lightning application? – ted Dec 5 '16 at 7:16
  • There really shouldn't be any differences from the component developers point of view. Even this issue with the Promise polyfill can (and should) be fixed by the framework itself to not let the closure compiler mess with the Promise APIs. – TrevorBliss Dec 5 '16 at 15:41
  • @ted To answer your question though, the main difference between running your cmp in an app vs. something like Lighting App Builder (LAB), is that your custom app is likely to be much simpler. LAB, and several other apps within LEX, use an app with a custom template that sets up persistent storage through Aura's storage service. This is the code that's executing when you see the error your reported, and just a single example of extra features being used in LEX apps that your custom app won't leverage. There's no document I know of that outlines every feature used. – TrevorBliss Dec 5 '16 at 15:44
  • It's good to know thank you very much for your explanation. – ted Dec 6 '16 at 10:26

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.