Questions tagged [locker-service]

Locker Service is a set of new security features for Lightning Components.

Filter by
Sorted by
Tagged with
1
vote
0answers
51 views

Component.destroy not available for components from difference namespaces

I have a "manager" component , who is delivered in a managed package. One of its role is to instanciate a "step component" , then when we click on next, we instanciate a new component and destroy the ...
1
vote
0answers
496 views

e.recordSave event not being fired on Summer 17 (Communities) It was working before

We have a partial sandbox to test our app for the new release (Summer 17). And we are facing a issue with the force:recordEdit component. We have a pretty simple component: quickForm.cmp: <force:...
8
votes
3answers
3k views

Lightning components and locker service

I am trying to get a hang of what is accessible via locker and what elements are not. Following through threads in this forum, I realized there are some components that are genuinely locked by locker ...
2
votes
1answer
2k views

Cross-Origin Frame Error in Lightning Component embedded in Salesforce Console

Prior to the Summer 17 release, my lightning component worked fine. After the release, I changed my API version for my VF page and lightning components to v40. Now when I try to load jQuery, I ...
1
vote
2answers
1k views

Chart.js with Locker Service - Failed to create chart: can't acquire context from the given item

Any help appreciated, I have seen a few post on this subject, but none with a conclusive answer that solves the issue. I have followed all advice in these posts. I am using ChartJS within a Lightning ...
2
votes
2answers
703 views

aura:iteration order messed up with LockerService enabled

With LockerService enabled, we are running into an aura:iteration bug where the order is messed up depending on the values of the array. We're unable to find a work around. In the component we have a ...
6
votes
2answers
920 views

Locker Service and Fullcalendar.io

I have seen that there have already been some questions regarding the open source Fullcalendar.io and the various libraries associated with it, and the strict requirements of Locker Service, but I was ...
1
vote
0answers
201 views

Issue with d3.4.4.0 and lightning locker service

I used the below code to implement collapsible tree chart using d3.js. The same code works fine with lockerservice off. With lockerservice on the tree chart is not working. What I have found is the ...
0
votes
1answer
33 views

Lockerservice Object as parameter

While passing an object of sobjectType Quote to an apex controller from lightning helper, we are facing an error "Unable to read SObject", but same thing is working fine without locker service turned ...
4
votes
1answer
275 views

Summer 17 LockerService Error while using Node.contains

When I try to execute the following code: this.root.contains(this.element) where root is a "SecureElement: [object HTMLDivElement]{ key: {"namespace":"xyz"} }" and element is a "SecureElement: [...
8
votes
1answer
455 views

Issues with running LockerService, d3, and Lightning components

Our d3 & Lightning Components work correctly when LockerService is turned off, but do not work when Locker Service is turned on. We're running d3 4.4.0 as specified by the list of Locker Service ...
1
vote
1answer
229 views

jQuery Tabelize is not working when Locker Services is activated

I am having an issue with using jQuery Tabelize when Locker Services are activated.When Locker services are deactivated code just works fine. I have created sample code to reproduce the error. ...
2
votes
1answer
129 views

Questions related to LockerService SecureObject functionality and behaviour in Aura/Lightning

Lately I've found myself pretty deep in the weeds with a lightning application and have a series of questions I'm hoping someone here with some inside knowledge might be able to assist with. Or at ...
2
votes
1answer
717 views

Lightning Component Dynamic DOM jQuery Binding after LockerService

I have a function that runs after my scripts finish loading that will perform several callouts and makes logic decisions to create a html string representing DOM elements (Essentially building a ...
1
vote
0answers
106 views

Data binding - sub object is not converted to secure object under Locker Service

I'm facing a really strange issue I have an attribute defined in my lightning component: <aura:attribute name="item" type="Object"/> This object is fetched from server in the init call with a ...
3
votes
0answers
1k views

URL.createObjectURL not working in lightning

This might relate to LockerService(Link). I try to use URL.createObjectURL on a vf page. Works fine in classic but in lightning it will give me "This page isn't available in Salesforce Lightning ...
2
votes
1answer
188 views

Table rows does not render properly when Locker Service is Enabled

I have an issue where the Rows and columns appear as plain text instead of rows and columns when Locker service is enabled, but when I disable the Locker service I can see the data as proper rows and ...
2
votes
0answers
211 views

Locker Service/Lightning Out Issue

I have a Managed Package Lightning Component being exposed to a non-Managed Package VF page via Lightning Out. With Locker Service enabled, I get the following errors for managed package static ...
0
votes
0answers
55 views

Function from Javscript Static Resource coming as Undefined after enabling Locker Service [duplicate]

After enabling Locker service, javascript function from static resource is coming as undefined. JS file: function myFunc(){ return '1'; } Lightning component: <aura:component controller="...
5
votes
1answer
533 views

Event from a Lightning Component has an event.target with DOM properties missing - what is going on?

With this markup in a component: <tr data-id="{! item.id }" onclick="{! c.rowSelect }"> <td>{! item.name }</td> <td><ui:outputText value="{! item.type }"/></...
1
vote
1answer
236 views

Datatable page length selectbox not populating with options when locker service is enabled

When we enable the locker service, then the select box is not populating with the options i.e. no option is visible and its not there in dom as well
4
votes
1answer
229 views

LockerService with Lightning Components & d3 transformation issue

I'm experiencing issues with d3 v4.4.0 and v4.7.3 when I'm trying to redraw some chart. There is a problem with g tag decomposition. When I try to redraw some element: rect.transition() ....
4
votes
1answer
539 views

Problem with LockerService and XMLHttpRequest

I have a custom component and when I try to use the following code: Component.cmp <aura:component implements='forceCommunity:availableForAllPageTypes' access='global'> <aura:handler ...
2
votes
1answer
358 views

Locker Service With Inner html tag issue

I have below code where i am trying to display data in a table format based the html element stored in a field. <table class="slds-table slds-table--bordered slds-table--cell-buffer"> <...
3
votes
1answer
501 views

LockerService - Cannot set autocorrect attribute on input element

When I try to set the autocorrect on an input I got the following warning in my browser console: WARNING: SecureElement: [object HTMLInputElement]{ key: {"namespace":"c"} } does not allow getting/...
4
votes
1answer
597 views

LockerService and HTMLElement type

When I create a simple HTML Element, var div = document.createElement('div'); I am unable to set the type attribute. div.setAttribute('type', 'whatever'); Will LockerService someday support that?
1
vote
1answer
139 views

Feed Publisher Community and Locker Service

Locker Service is about to be automatically activated in Summer 17. Does someone know what is going to happen with the feed publisher component in the community template ? Today, if activated it is ...
4
votes
1answer
1k views

Is there any way to validate a third party JavaScript library against Lightning LockerService?

I have been using some of the third party libraries e.g. pdf.js and html2canvas.js for a customer project. Now when I activate the LockerService, these libraries do not work as expected. Is there any ...
2
votes
1answer
381 views

Lightning iframe navigateToUrl not working with Locker Service

We're using iframes in Lightning and our links aren't working when locker service is turned on. If we turn locker service off they work fine. I have the following function which is where the error ...
0
votes
1answer
577 views

Is it possible to set Custom Dimensions in Google Analytics for Salesforce Communities with Locker Service

I am trying to get data from my Salesforce Communities (napili) into Google Analytics. This Google Analytics guide says this can be done using custom dimensions. Custom dimensions and metrics allow ...
6
votes
2answers
4k views

window.onload() and LockerService

When calling window.onload() and LockerService is enabled, I get this error: aura_proddebug.js:17569 Uncaught TypeError: Cannot use 'in' operator to search for 'target' in undefined at Function....
3
votes
1answer
2k views

document.getElementById(“myID”).getComputedTextLength() is not a function

I have developed a lightning component, I am using following JavaScript methods .getComputedTextLength() .getScreenCTM() .getTotalLength() .getBBobx() I am getting following errors ...
2
votes
1answer
53 views

Linting Managed Lightning Components - is this even possible?

It's possible to scan lightning components for LockerService errors using Heroku and Salesforce-Lightning-CLI plugin. Am I correct in assuming that there is no way to scan managed components for ...
0
votes
0answers
466 views

$A.callback Failed, Action Failed: $controller$doinit [Invalid value used as weak map key]

I am facing a similar issue like what is explained in this link :-$A.getCallback() [TypeError: Invalid value used as weak map key] We can avoid this situation by deactivating the Locker Services, but ...
17
votes
2answers
562 views

Locker Service: Cannot set field values that were null on records from SOQL or SObjectType.newSObject()

We have a number of Apex controllers that are shared between Visualforce and Lightning. When these controllers init record values, there are some cases where no record value exists, so the method uses ...
3
votes
2answers
369 views

Locker Service preventing delete of object properties

We have a lightning component that is initialized with an SObject from Apex. It then allows the user to make some changes to that SObject and send it back to Apex in another method for some processing....
0
votes
0answers
32 views

What are locker-service requirements that my app should follow

I have developed an app it works fine. But then I integrate my app in salesforce while locker-service active it gives error. I have "use strict" statement in my app it helped me rectify some errors ...
2
votes
0answers
209 views

Sfdc.canvas.publisher.publish no longer works after locker service was enabled

Created a VF Page to initialize the App: <apex:page standardStylesheets="false" sidebar="false" standardController="CustomObject"> <apex:includeScript value="/lightning/lightning.out.js"...
7
votes
2answers
232 views

LockerService and window.crypto.getRandomValues()

When LockerService is enabled and I run the example code from Mozilla: var array = new Uint32Array(10); window.crypto.getRandomValues(array); I get this error: Uncaught TypeError: Failed to ...
7
votes
1answer
581 views

LockerService and WebSocket

In a lightning community with LockerService enabled, I am trying to instantiate a websocket using new WebSocker('wss://xyz.com'), but I am unable to because of the way WebSocket is implemented in ...
1
vote
0answers
25 views

LockerService is nothing to do with Javascript/Iframe in Salesforce Classic [duplicate]

I am asking question just to ensure that my understanding is correct.I have read Writing Secure code with Locker Service and LockerService and Lightning Container Component:Securely Using third-party ...
5
votes
2answers
173 views

Run Jasmine tests inside LockerService

I am trying to run our JavaScript tests (written with Jasmine) inside LockerService. I know Salesforce did the same with jQuery in the past because they mentioned it during the last Dreamforce event. ...
18
votes
1answer
6k views

Which external Javascript libraries work with Lightning Locker Service?

Components often seem to work with external libraries until the Locker Service is enabled. What libraries work with locker service enabled and where can I go to find out?
2
votes
0answers
433 views

Uncaught ReferenceError: d3 is not defined, while LockerService (LS) is active

I am using d3.js in my lightning component, I am getting following error Uncaught ReferenceError: d3 is not defined This error occurs when I active my LockerService (LS). Otherwise it works. ...
3
votes
1answer
873 views

Use jquery data table export functionality in lightning component of salesforce after enabling locker service?

I have created lightning component to use jquery data table. I am using export functionality of jquery data table. But it is not working. It is showing only Export button. When I clicked that it doesn'...
3
votes
1answer
2k views

Event.source returns error “Cannot read property 'get' of undefined”

I am trying the code below(most of it from the Dev Docs here) Component <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId"> <aura:attribute name="stages" type="...
1
vote
1answer
534 views

LockerService - dataset property on script tags doesn't work

When LockerService is enabled, execute the following code: var test = document.createElement('script'); test.setAttribute('data-field-test', 'myTest'); console.log(test.dataset); The test.dataset is ...
2
votes
1answer
61 views

Locker service and document.createAttribute(“XYZ”)

When using LockerService in a Lightning community, I run this: document.createAttribute("data-xyz"); The result when LockerService is activated is null instead of the attribute object. I am pretty ...
4
votes
1answer
157 views

When locker service was enabled after render function no longer work

Here is the code for the after render ({ afterRender: function (component, helper) { this.superAfterRender(); var allElements = document.getElementsByClassName("myBtn"); ...
2
votes
0answers
214 views

Uncaught TypeError: $A.g.lg is not a function - intermittent error on browser back/forward?

I'm seeing a very intermittent error sometimes in my Lightning app. This is a standalone app, not part of Lightning Experience or Salesforce1. It's a single-page type of app, so there's not really ...

1 2 3
4
5
8