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.

Warning in zone-evergreen.js from Chrome

See original GitHub issue
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
(anonymous) @ zone-evergreen.js:2967

Looks like the code it is referring to is this:

        const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {
            self[XHR_SYNC] = args[2] == false;
            self[XHR_URL] = args[1];
            return openNative.apply(self, args);
        });

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
fr0commented, Jul 30, 2019

Sorry for the late response - it happens every time when using karma-jasmine.

https://github.com/fr0/angular-test/tree/zone

Run npm install then npm test

1reaction
JiaLiPassioncommented, May 28, 2020

This is not a zone.js issue, the warning is from here. https://github.com/evanw/node-source-map-support/blob/50642d69b1ba461beb651bbf4f6e52fbddaa5318/source-map-support.js#L96

The source map support library will open a sync xhr, so the warning will be displayed. will close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

zone.js violation warnings on console in Angular project only ...
Consider marking event handler as 'passive' to make the page more responsive. The weird thing is that warning appear on Chrome only. (my...
Read more >
Activate JavaScript in your browser - Google AdSense Help
Activate JavaScript in Google Chrome. Open Chrome on your computer. Click More and then Settings. Click Security and Privacy. Click Site settings.
Read more >
Browser support - Angular
Chrome, latest ; Firefox, latest and extended support release (ESR) ; Edge, 2 most recent major versions ; Safari, 2 most recent major...
Read more >
[Violation] 'setTimeout' handler took 85ms | auto optimize JS ...
i believe is jquery when we block him with autoptimize. and all the cache together will show the real execution time of jquery...
Read more >
10 Things Every Angular Developer Should Know About Zone.js
Angular introduced Zone.js to handle change detection. This allows Angular to decide when the UI has to be refreshed.
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