Issue metadata
Sign in to add a comment
|
fetch dont receive GET after OPTIONS
Reported by
avlap...@gmail.com,
Jul 18 2017
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Steps to reproduce the problem:
use fetch to get config (JSON) from API.
If I access the service (https://SOME_URL) using the XHR I get the answer and everything is fine.
But if I send a request using a native fetch - request stops on OPTIONS (status 200, but get request dont follow them).
Requests are completely identical for headings and cookies, the only difference is how I send.
// Doesnt work, type: fetch
fetch(
`https://SOME_URL/`,
{
method: "GET",
credentials: 'include',
headers: new Headers({
'x-client-id': '0ccc********913a',
'x-client-secret': 'V7iA6bM2uP0rJ*************I5lH4vA6dE7'
})
}
);
// Work, type: XHR
$.ajax(
{
url: `https://SOME_URL/`,
method: "GET",
xhrFields: {
withCredentials: true
},
headers: {
'x-client-id': '0ccc********913a',
'x-client-secret': 'V7iA6bM2uP0rJ*************I5lH4vA6dE7'
}
});
In Firefox 54.0.1 (32-bit) fetch work fine.
All browser extensions for chrome are disabled.
What is the expected behavior?
I am expected to receive data provide by GET, but I dont receive enything after OPTIONS.
Call with the same options by $.ajax work fine, and call in Firefox fine too.
What went wrong?
fetch dont receive GET after OPTIONS
Did this work before? N/A
Chrome version: 59.0.3071.115 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
,
Jul 18 2017
,
Jul 21 2017
Is there any console output? I would be great if you could provide a net-internals log http://dev.chromium.org/for-testers/providing-network-details - but please note that the log contains all headers excluding credentials.
,
Jul 21 2017
Hi! Console is clear. In the network history I replace company and project name. All link available only at intranet. I request URL https://w3-dev.api.company.com/learning/test/v1/config/type/PROJECT-CONFIG-CLIENT/id/company See at id: 2393
,
Jul 21 2017
Thank you for providing more feedback. Adding requester "yhirano@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 26 2017
Thank you for the log. In the log I see an OPTIONS request for https://w3-dev.api.company.com/learning/test/v1/config/type/PROJECT-CONFIG-CLIENT/id/company at 13:12:01 followed by a GET request for the same URL at 13:12:02. So based on the log it appears to be working. Is the response not available to Javascript on the page?
,
Jul 26 2017
,
Jul 26 2017
No, we have not response. In browser (Netowork tab) I can see only OPTIONS request. This problem I can see on several computers In my company. But everywhere its working in Firefox. If you need more information - please tell me, because it is very Importan for us to use Fetch API on the wide audience.
,
Jul 26 2017
Thank you for providing more feedback. Adding requester "ajha@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 27 2017
,
Aug 2 2017
Thanks. Hmm, as ricea@ said, I see a GET in the net-internals log. It might be hitting some corner case where we have some bugs. What did you mean in #8 by "not response"? The then() callback is never invoked for the promise returned by the fetch() call? Does cross-origin fetch() without custom headers work for you (only in case you can test it). Can I ask you to also provide the net-internals log for the successful case i.e. XHR/jQuery?
,
Aug 10 2017
,
Aug 10 2017
I am at hospital now. Can give additional information only at next week
,
Aug 10 2017
Thank you for providing more feedback. Adding requester "yhirano@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 17 2017
,
Sep 28 2017
Lowering priority based on age and inability to reproduce. If we don't receive extra information in the next three weeks I will have to close the issue as unreproducible.
,
Oct 19 2017
The NextAction date has arrived: 2017-10-19
,
Oct 27 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Jul 18 2017