Automattic / Automattic/jetpack

Javascript deprecation notice: Synchronous XMLHttpRequest on the main thread

Open
#13,526 1 comment 0 reactions 0 assignees View on GitHub
[Feature] Likes [Pri] Low [Type] Janitorial
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### Steps to reproduce the issue

1. Go to https://www.deeblogi.fi with Chrome 78 (beta) or Firefox 69
2. Open browser console
3. See Javascript notice

#### What I expected
No Javascript notices

#### What happened instead
There's a following notice message in console:
```
??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:2999

[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/.

wpLikes.displayWidget @ ??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:2999

ajax @ ??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:2206

getPostLikes @ ??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:2122

readMessage @ ??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:2468

(anonymous) @ ??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:3304

_dispatch @ ??/wp-content/js/postmessage.js,/wp-content/js/jed/jed.js,/wp-content/js/wpcom-proxy-request.js,/wp-content/js/likes-rest-nojquery.js?m=20190321:251
```

#### WordPress and plugin version
WordPress: 5.2.3
Jetpack: 7.7.2

Contributor guide

Open the contributing guide

Research direction

Start by tracing the console stack through postmessage.js, jed.js, wpcom-proxy-request.js, and likes-rest-nojquery.js, focusing on wpLikes.displayWidget, ajax, and getPostLikes. Reproduce the notice in Chrome or Firefox and identify the synchronous XMLHttpRequest path. Done means the reproduction no longer emits this deprecation notice.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.