7

I get the following error when attempting to use a lightning component (previously working with Spring 16) in a Summer 16 pre-release org, presumably because of the new locker service:

"Uncaught Error: Unable to create locker IIFE: TypeError: Cannot read property 'onsubmit' of undefined throws at https://nojvsum16-dev-ed.lightning.force.com/auraFW/javascript/JXhCgmQ-0R9LYjekEJHc9w/aura_prod.js:1:27"

The component has ltng:require commands to include jquery, jquery-ui and other javascript and css resources, but only the css gets loaded.

How can I get past this error? Is it still possible to make use of jquery libraries?

  • Were you able to make the component work with jQuery in it's ltng:require component? I'm able to use SVG components now, but I'm getting an error if I try to use jquery in my component and jquery or any third party JS library never loads ... – VarunC May 9 '16 at 17:24
7

Please see my answer/comments here Unable to use SVG in Lightning Components with LockerService activated for related info.

During the prerelease phase of Summer'16 we are actively dialing in what is exposed via LockerService's secure virtual DOM.

Specifically the onsubmit issue you are seeing has been addressed in the .3 patch scheduled to deploy to prerelease environments next week (Tuesday/Wednesday if things stay on schedule).

  • Errors encountered today when attempting to add lightning components to record pages: (1) "Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Something has gone wrong. Error in $A.getCallback() [RangeError: Maximum call stack size exceeded] Failing descriptor: {markup://c:ValueTreeLoad}. Please try again." - this occurs with even the most straightforward components. – Michaelwit May 5 '16 at 8:01
  • (2) "Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Uncaught Error: Unable to create locker IIFE: TypeError: Cannot redefine property: minlength throws at nojvsum16-dev-ed.lightning.force.com/auraFW/javascript/…" - occurs with components that make use of jsQuery/JavaScript. – Michaelwit May 5 '16 at 8:05
  • Hello @DougChasman, can you confirm if we are on patch .3 as of today in Summer '16 Pre-Release orgs? I'm still having the error on my Lightning Tab's load, created from a Lightning Component and is using custom SVG and a rendered controller - "Uncaught Error: Unable to create locker IIFE: TypeError: Cannot redefine property: selected throws at vc-summ16-3-dev-ed.lightning.force.com/auraFW/javascript/…" ... – VarunC May 9 '16 at 16:12
  • 1
    Hello @DougChasman - salesforce.stackexchange.com/questions/121089/… - I've a question posted here with details on Lightning Component throwing different errors with different versions of jQuery library included in ltng:require component. Can you please give it a look, and confirm if this issue is something newer than whats being rpeorted and fixed in this current question? – VarunC May 10 '16 at 12:51
  • @DougChasman As of today (Thursday May 12) there appears to be no resolution yet to the "RangeError: Maximum call stack size exceeded" issue. – Michaelwit May 12 '16 at 8:02

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.