Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error: Resource is currently in an error state #62065

Closed as not planned
Closed as not planned
@sysmat

Description

@sysmat

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

common, core

Is this a regression?

Yes

Description

when using rxResource I get error,

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Error: Resource is currently in an error state (see Error.cause for details): Cannot read properties of null (reading 'subscribe')
    at Object.ResourceImpl.computed.equal.equal [as computation] (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/resource/resource.ts:198:21)
    at Object.producerRecomputeValue (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/computed.ts:148:25)
    at producerUpdateValueVersion (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/graph.ts:305:8)
    at ResourceImpl.computed2 [as value] (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/computed.ts:72:5)
    at OrganizationComponent2_Template (ng:///OrganizationComponent2.js:42:48)
    at executeTemplate (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/instructions/shared.ts:100:5)
    at refreshView (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/instructions/change_detection.ts:232:7)
    at detectChangesInView (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/instructions/change_detection.ts:495:5)
    at detectChangesInViewIfAttached (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/instructions/change_detection.ts:443:3)   
    at detectChangesInComponent (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/instructions/change_detection.ts:429:3)        
Caused by: TypeError: Cannot read properties of null (reading 'subscribe')
    at ResourceImpl.stream [as loaderFn] (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/rxjs-interop/src/rx_resource.ts:85:28)
    at http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/resource/resource.ts:356:21
    at untrackedPrimitive (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/primitives/signals/src/untracked.ts:20:12)
    at untracked (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/render3/reactivity/untracked.ts:16:10)
    at ResourceImpl.<anonymous> (http://localhost:9876/darwin_arm64-fastbuild-ST-46c76129e412/bin/packages/core/src/resource/resource.ts:355:28)
    at Generator.next (<anonymous>)
    at chunk-7TZ2JX6C.js:85:61
    at new ZoneAwarePromise (node_modules/zone.js/fesm2015/zone.js:2701:25)
    at __async (chunk-7TZ2JX6C.js:69:10)
    at ResourceImpl.loadEffect (chunk-HRL75XE6.js:25733:16)

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

Angular CLI: 20.0.2
Node: 22.16.0
Package Manager: npm 10.9.2
OS: win32 x64

Angular: 20.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.2
@angular-devkit/core         20.0.2
@angular-devkit/schematics   20.0.2
@angular/build               20.0.2
@angular/cli                 20.0.2
@schematics/angular          20.0.2
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else?

it was working in ng 19

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions