Macro Tasks left running after failed http requests with Unknown Error, preventing protractor from completing tests
See original GitHub issue🐞 bug report
Affected Package
@angular/common/http
Is this a regression?
Yes. Worked in @angular/common@9.1.12
Description
A macroTask is left running when certain http errors occur and this prevents protractor for completing since there are tasks left running in the ngZone.
🔬 Minimal Reproduction
https://github.com/wfairclough/AngularHttpMacroTaskMinimalReproduction
Run npm install
Run with npx ng serve
Open Chrome Browser to http://localhost:4200
Reproduce Bug
- Click Button Make Successful Request and see successul response.
- Click Button Check Task Counts and see the open micro and macro task counts in the ngZone.
- Click Button Make Failed Request and see the error response.
- Click Button Check Task Counts again and notice that the macroTask count is now 1.
- Repeat failed requests as many times as you like and the marcroTask count will just keep increasing.
🔥 Exception or Error
No macroTasks should be left running after this failed http request.
🌍 Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 10.1.0
Node: 10.20.1
OS: linux x64
Angular: 10.1.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.1001.0
@angular-devkit/build-angular 0.1001.0
@angular-devkit/build-optimizer 0.1001.0
@angular-devkit/build-webpack 0.1001.0
@angular-devkit/core 10.1.0
@angular-devkit/schematics 10.1.0
@angular/cli 10.1.0
@ngtools/webpack 10.1.0
@schematics/angular 10.1.0
@schematics/update 0.1001.0
rxjs 6.6.3
typescript 4.0.2
webpack 4.44.1
Anything else relevant? Error occurs in both browsers I tested with Chrome and Firefox.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to track which async tasks protractor is waiting on?
A bit trickier solution · Go to node_modules/zone.js/dist/zone.js . · Look for Zone's constructor function: function Zone(parent, zoneSpec) · Add ...
Read more >spawn Unknown system error -86 >> From: Task: WebDriver ...
So I have been working in Protractor for my end to end tests of my Angular application. It has been working for as...
Read more >Subsurface Investigations - Federal Highway Administration
rock coring, sampling, in-situ testing, and geophysical exploration methods. ' Chapters 7 and 8 discuss laboratory testing of soil and rock materials.
Read more >Automated Testing Techniques for Event-Driven and ... - Pure
We present a new methodology that extends the error detection capabilities of existing, manually written Android test suites. In the context of.
Read more >9 Testing and Profiling Java Application Projects
A Selenium Mocha/Protractor test case with a default test method is created. ... profiling task you are running on the target application without...
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
@JoostK , sure, I just checked this one, I think this can be handled inside
zone.js
, it is a bug about integrated zone.js with@angular/common/http
, I will fix it.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.