Troubleshoot Issues Related to Lightning Web Security

Developers can sometimes encounter some issues when developing and testing components to run in Lightning Web Security (LWS). Follow these troubleshooting steps, and check whether your issue is addressed within these topics.

  1. Determine if LWS is enabled or disabled. If you suspect that the correct security architecture isn't in effect, see Delayed Enabling or Disabling of LWS.

  2. Eliminate common issues that can be related to LWS.

  3. Ensure that you're following the coding guidelines outlined in Build Components to Work with Lightning Web Security.

  4. Be aware of how LWS sanitizes HTML and SVG elements.

  5. Be aware of LWS limitations.

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 reenable Lightning Web Security as soon as possible.

See Also