Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Critical bug in version 19.2.12 prevents application from start #61644

Copy link
Copy link
@ZixZux

Description

@ZixZux
Issue body actions

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

PR #61354 introduces a critical bug.

The application can't be started at all, the error occurs: "RuntimeError: NG0200: Circular dependency in DI detected for _ApplicationRef. Find more at https://angular.dev/errors/NG0200".

It seems the source of the problem is the code: private readonly appRef = inject(ApplicationRef);

Please provide a link to a minimal reproduction of the bug

The application is configured with provideHttpClient( withFetch(), withInterceptorsFromDi() ).

Exception occurs in method hydrate(token, record, flags) while resolving ApplicationRef in the FetchBackend class:

if (record.value === CIRCULAR) {
  throwCyclicDependencyError(stringify(token));

The token here is the "class _ApplicationRef" and the record is the "{ factory: ƒ ApplicationRef_Factory(ngFactoryType), ... }".

Please provide the exception or error you saw

RuntimeError: NG0200: Circular dependency in DI detected for _ApplicationRef. Find more at https://angular.dev/errors/NG0200
    at throwCyclicDependencyError (core.mjs:978:9)
    at R3Injector.hydrate (core.mjs:2238:9)
    at R3Injector.get (core.mjs:2121:23)
    at injectInjectorOnly (core.mjs:1111:28)
    at ɵɵinject (core.mjs:1117:40)
    at inject (core.mjs:1202:10)
    at <instance_members_initializer> (module-BQ-7fJZl.mjs:1620:12)
    at new _FetchBackend (module-BQ-7fJZl.mjs:1612:1)
    at Object.FetchBackend_Factory [as factory] (module-BQ-7fJZl.mjs:1832:12)
    at core.mjs:2243:35
    at runInInjectorProfilerContext (core.mjs:881:5)
    at R3Injector.hydrate (core.mjs:2242:11)
    at R3Injector.get (core.mjs:2121:23)
    at injectInjectorOnly (core.mjs:1111:28)
    at ɵɵinject (core.mjs:1117:40)

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.2.12                                                                                                                                                                                               Node: 24.1.0 (Unsupported)                                                                                                                                                                                         Package Manager: npm 11.4.1                                                                                                                                                                                        OS: win32 x64                                                                                                                                                                                                                                                                                                                                                                                                                         Angular: 19.2.12                                                                                                                                                                                                   ... animations, cli, common, compiler, compiler-cli, core, forms                                                                                                                                                   ... platform-browser, router                                                                                                                                                                                                                                                                                                                                                                                                          Package                         Version                                                                                                                                                                            ---------------------------------------------------------                                                                                                                                                          @angular-devkit/architect       0.1902.12                                                                                                                                                                          @angular-devkit/build-angular   19.2.12                                                                                                                                                                            @angular-devkit/core            19.2.12                                                                                                                                                                            @angular-devkit/schematics      19.2.12                                                                                                                                                                            @schematics/angular             19.2.12                                                                                                                                                                            rxjs                            7.8.2                                                                                                                                                                              typescript                      5.8.3                                                                                                                                                                              zone.js                         0.15.1

Anything else?

This is the regression, because prior to the version 19.2.12 application started successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packageneeds reproductionThis issue needs a reproduction in order for the team to investigate furtherThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.