question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zone-patch-rxjs - Unsubscription error - Cannot read property 'apply' of null

See original GitHub issue

I’m trying to implement a retry http interceptor for Angular 7.

Without import 'zone.js/dist/zone-patch-rxjs'; it works fine but when I add it, I get:

ERROR {"message":"1 errors occurred during unsubscription:\n1) TypeError: Cannot read property 'apply' of null","name":"UnsubscriptionError","errors":[{}]}

This is an example repo to reproduce the issue:

https://stackblitz.com/edit/angular-s3iv5u?file=polyfills.ts

Comment and uncomment the line import 'zone.js/dist/zone-patch-rxjs'; in polyfills.ts to see the error appear and disappear.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
JiaLiPassioncommented, May 13, 2020

@xinbaihui , thank you for the sample, I have created a PR https://github.com/angular/angular/pull/37091 to fix this one.

0reactions
angular-automatic-lock-bot[bot]commented, Aug 27, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rxjs - Angular 4, Observables, and "Cannot read property ...
I am trying to use observables, and I get an error saying "Cannot read property 'unsubscribe' of null". I am wondering where I...
Read more >
Angular 7 - How to retry an http request on cer...anycodings
I'm trying to catch http request's errors anycodings_rxjs from an Angular interceptor and handle 401 anycodings_rxjs as logout while retrying a ...
Read more >
Cannot read property 'unsubscribe' of null - ionic-v3
I developed an application with Ionic v3 to a university. It has several functionalities and works fine but when I run in develop...
Read more >
Component testing scenarios - Angular
This guide explores common component testing use cases. ... Angular doesn't know that you set the input element's value property. It won't read...
Read more >
cannot read properties of undefined (reading 'unsubscribe')
I recomend too use it when u have issues like this. import { PLATFORM_ID } from "@angular/core" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found