-
Notifications
You must be signed in to change notification settings - Fork 408
More tasks executed then were scheduled error when xhrrequest a invalid url. #530
Comments
Can confirm having this issue recently also. |
@mhevery i made changes to browser.ts, though seem not find a test/browser/XMLHttpRequest.spec.ts. but error still persist. any work around? |
@myquery , can you provide more details? a reproduce repo will help. and what the changes you made to browser.ts? |
`/**
import {patchTimer} from '../common/timers'; import {propertyPatch} from './define-property'; const set = 'set'; patchTimer(_global, set, clear, 'Timeout'); for (var i = 0; i < blockingMethods.length; i++) { eventTargetPatch(_global); // Treat XMLHTTPRequest as a macrotask. const XHR_TASK = zoneSymbol('xhrTask'); interface XHROptions extends TaskData { function patchXHR(window: any) { function scheduleTask(task: Task) { function placeholderCallback() {} function clearTask(task: Task) { var openNative = var sendNative = var abortNative = patchMethod( /// GEO_LOCATION
import {patchTimer} from '../common/timers'; import {propertyPatch} from './define-property'; const set = 'set'; patchTimer(_global, set, clear, 'Timeout'); for (var i = 0; i < blockingMethods.length; i++) { eventTargetPatch(_global); // Treat XMLHTTPRequest as a macrotask. const XHR_TASK = zoneSymbol('xhrTask'); interface XHROptions extends TaskData { function patchXHR(window: any) { function scheduleTask(task: Task) { function placeholderCallback() {} function clearTask(task: Task) { var openNative = var sendNative = var abortNative = patchMethod( /// GEO_LOCATION |
I'm running into this error on ionic. Could we also note that it should be "THAN were scheduled"? The typo/bad grammar makes the code very easy to find and the error easy to search for, but.... |
@paqogomez , could you provide a reproduce repo? |
The issue can be described as following case.
the demo is in this plunkerplunker demo
When the open url is invalid or cors disallowed, the "More tasks executed then were scheduled" will be thrown, it may related to issue #287, and the reason is
https://github.com/angular/zone.js/blob/master/lib/browser/browser.ts#L77,
when request to a invalid url ,the browser will cancel the request and call https://github.com/angular/zone.js/blob/master/lib/browser/browser.ts#L69 immediately, it will become a sync call, so the updateTaskcount (macroTask +1) will not be called.
The text was updated successfully, but these errors were encountered: