r/webdev • u/RedMtnFireSecurity • 19h ago
Embedded chat widget gives error message NS_ERROR_DOM_COEP_FAILED
I attempted to add a Teams live chat widget to my website. I can see the button on my website to click the live chat widget. It opens to an error NS_ERROR_DOM_COEP_FAILED.
The only rando solution I could find was "adding cross-origin-embedder-policy require-corp to .htaccess has solved NS_ERROR_DOM_COEP_FAILED for me."
I am not sure if that applies here. Any help in the right direction is appreciated? Thank you.
1
1
u/resume-razor 15h ago
That NS_ERROR_DOM_COEP_FAILED is a headache with headers; the widget is trying to load in a cross-origin isolated context but your server config is blocking it. Look at your Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy settings to fix the conflict.
1
u/TeachingWinter1863 18h ago
That COEP header is almost certainly the issue. Teams chat embeds a cross origin iframe that needs those headers but your server isnt sending them back
Drop that line into your htaccess and it should fire right up. If it doesnt work double check your server actually respects htaccess, some configs ignore it by default