Potential exception when using rxjs 7 in Angular 13
See original GitHub issueEnvironment:
- angular: 13.1.0
- rxjs: 7.4.0
Stacktrace:
TypeError: Cannot read properties of undefined (reading 'isStopped')
at error (Subscriber.js:35:18)
at IDBTransaction.error [as __zone_symbol__ON_PROPERTYerror] (ngx-indexed-db.js:106:13)
at IDBTransaction.B (zone.js:803:43)
at ir.invokeTask (zone.js:434:35)
at Object.onInvokeTask (core.mjs:25437:33)
at ir.invokeTask (zone.js:433:64)
at ir.runTask (zone.js:205:51)
at ir.invokeTask [as invoke] (zone.js:516:38)
at pr (zone.js:1656:18)
at IDBTransaction.Er (zone.js:1682:21)
This happens when calling getAllKeysByIndex
and it fails.
When creating the transaction obs.error
is directly passed on and I guess in rxjs7 the callback uses a this
which “gets lost” due to the closure there.
I have also seens this in other places in code. Everything here is just a guess, but maybe someone else could clarify.
I have a rather large app where I can reproduce the issue, but could not yet create a minimal repro for it.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Breaking Changes in Version 7 - RxJS
This is potentially breaking in edge cases for node applications, which may be configured to terminate for unhandled exceptions. In the unlikely event...
Read more >How to set a timeout config for lastValueFrom() using RxJS 7 ...
In my case I send a get request to the server to check if the server is available or not. The main function...
Read more >Handling Exceptions Using the Angular HttpClient Service
In this guide, you learned how to manage HTTP exceptions within your app. You have seen how the RxJs catchError operator can be...
Read more >Error handling in Rxjs Observables | Angular 13 | 2022
Error handling in Rxjs Observables in Angular 13. We explore the try/catch block for synchronous error handling. We explore the catchError ...
Read more >Support for rxjs 7 · Issue #41897 · angular/angular - GitHub
We're exploring how to support both 6 and 7 for projects that want to opt into it earlier.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @HFTSOL, I hope I can take a look at the problem these days. I can’t promise you anything because this is a new issue for me
I will say, that I ended up just using https://www.npmjs.com/package/idb and just using indexeddb directly instead of through Angular, and it’s working pretty well for me. Sometimes framework-agnostic solutions are all you need.