PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.03k stars 346 forks source link

Refused to create a TrustedTypePolicy named 'trusted-html-__plasmo-loading__' #1021

Closed HHogg closed 1 month ago

HHogg commented 1 month ago

What happened?

Trying to load content scripts throws the following errors.

Refused to create a TrustedTypePolicy named 'trusted-html-__plasmo-loading__' 
because it violates the following Content Security Policy directive: "trusted-types 
default nextjs nextjs#bundler dompurify goog#html google-analytics 
connect.facebook.net/fbevents facebook.com/signals/iwl 'allow-duplicates'".
TypeError: Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': 
Policy "trusted-html-__plasmo-loading__" disallowed.

I saw #985 and on that thread and it suggest it's fixed in 0.87.2 but I'm still seeing this in 0.88.0.

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

HHogg commented 1 month ago

Just to rule out anything with the website I'm trying to insert the content script into, I could successfully render content into it before I was using plasmo.

HHogg commented 1 month ago

I think this was actually an issue with the matching URL I was using. I have it working now.