Skip to content

CSP/require-trusted-types/lazy-loading error #20113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EvanBor opened this issue Feb 20, 2021 · 2 comments
Closed

CSP/require-trusted-types/lazy-loading error #20113

EvanBor opened this issue Feb 20, 2021 · 2 comments

Comments

@EvanBor
Copy link

EvanBor commented Feb 20, 2021

🐞 bug report

Affected Package

The issue is caused by package @angular/core

Is this a regression?

No

Description

CSP require-trusted-types rule for 'script' with trusted-types angular angular#unsafe-bypass blocks module lazy-loading

🔥 Exception or Error


Uncaught (in promise): TypeError: Failed to set the 'src' property on 'HTMLScriptElement': This document requires 'TrustedScriptURL' assignment.
TypeError: Failed to set the 'src' property on 'HTMLScriptElement': This document requires 'TrustedScriptURL' assignment.

🌍 Your Environment

Angular Version:


Angular CLI: 11.1.2
Node: 14.15.4
OS: darwin x64

Angular: 11.1.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1101.2
@angular-devkit/build-angular   0.1101.2
@angular-devkit/core            11.1.2
@angular-devkit/schematics      11.1.2
@angular/cli                    11.1.2
@schematics/angular             11.1.2
@schematics/update              0.1101.2
rxjs                            6.6.3
typescript                      4.1.3
@alan-agius4 alan-agius4 transferred this issue from angular/angular Feb 22, 2021
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Feb 22, 2021

I'm sorry, but this issue is not caused by Angular CLI.

Webpack, which is the bundler used by the Angular CLI, doesn’t support trusted types, hence this is not actionable from our end.

Please file an issue in their issue tracker.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants