Synchronous AJAX call fail in Firefox
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Start at dist/xhook.js around lines 451, 468, 487, and 517, following the synchronous send path in Firefox. Check the documented XMLHttpRequest withCredentials restriction for synchronous requests. Done means synchronous AJAX calls no longer throw this exception while the existing asynchronous behavior remains intact.
Written by the indexing model from the issue text.
Description
It fails with
A parameter or an operation is not supported by the underlying object
window[XMLHTTP]/facade.send/send@http://localhost:3000/dist/xhook.js:468:11
window[XMLHTTP]/facade.send/process@http://localhost:3000/dist/xhook.js:487:1
window[XMLHTTP]/facade.send@http://localhost:3000/dist/xhook.js:517:5
...
It fails on https://github.com/jpillora/xhook/blob/gh-pages/dist/xhook.js#L451 when you try to set withCredentails property to XHR object.
This seems to be a documented behavior.
According to https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
Note: Starting with Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8), Gecko no longer lets you use the withCredentials attribute when performing synchronous requests. Attempting to do so throws an NS_ERROR_DOM_INVALID_ACCESS_ERR exception.
- Dominant language
- HTML
- Stars
- 1k
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jpillora/xhook
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug ready-for-dev
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100