Troubleshoot in Lightning Web Security
Developers can run into some common problems when developing and testing components to run in LWS.
See if your issue is addressed here. If you try these troubleshooting techniques without success, you can disable Lightning Web Security in scratch orgs and continue to troubleshoot. We recommend that you re-enable Lightning Web Security as soon as possible.
LWS enablement:
LWS effects on component performance:
Suggested refactoring for common violations:
- Properties Evaluate as
undefined
in LWS - Alternatives to Mutating Objects
- Static Resources With async Functions
- Custom Properties on Standard JavaScript Objects
- Properties of Cloned Objects in Locker vs LWS
- Objects Passed Between Components Are Proxied
- Map Object Limitations
- Script Tags Transformed to Fetch Calls
- Local Storage Limitations
LWS limits