Skip to main content
agentgill
Participating Frequently
Oct 9, 2023 3:51 PM UTC

Salesforce UI Elements from managed package (4.28) - UI components not loading

When trying to add Salesforce UI Elements into Lightning Page or Flow - I am seeing this error when opening page or running the flow

Refused to frame 'https://mydomain--mysandbox-box.sandbox.vf.force.com/' because an ancestor violates the following Content Security Policy directives: "frame-ancestor 'self'"

Additional Info: https://developer.box.com/guides/tooling/salesforce-toolkit/ui-elements/

6 replies

smartoneinok Box
Senior Developer Advocate
Oct 13, 2023 3:58 PM UTC

Hello 👋,

Let me look into this further. I’m not sure off the top of my head.

Thanks,
Alex, Box Developer Advocate 🥑

Translate
smartoneinok Box
Senior Developer Advocate
Oct 13, 2023 4:39 PM UTC

Can you try turning off clickjack protection and seeing if that works?

Translate
MitchellAtBox
Box Employee
Oct 16, 2023 3:51 PM UTC

This may work and a few other settings within session settings. I’d recommend trying in a sandbox first.

Translate
agentgill
agentgillAuthor
Participating Frequently
Oct 23, 2023 8:34 AM UTC

Yes turning off clickjack protection works, however I prefer not to turn this off.

Support are suggesting adding Trusted Domain in Sessions Settings and also Trust Domains (CSP)

I’ve added this and still see the error

The domain the managed package is trying to reach is this:

https://mydomain--mysandbox--box.sandbox.vf.force.com/

Worth noting, my org domain is this

https://mydomain--mysandbox.sandbox.vf.force.com

The Box target includes “–box” in the domain

Translate
agentgill
agentgillAuthor
Participating Frequently
Oct 23, 2023 8:35 AM UTC

Worked but would prefer not to turn off, see other response - thanks

Translate
Box Employee
Oct 31, 2023 5:13 PM UTC

Following the workaround here Help And Training Community and possibly following Help And Training Community
Should fix the issue without disabling clickjack.

Translate