Skip to content

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

Closed
@EvanBor

Description

@EvanBor

🐞 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions