Closed Bug 1642293 Opened 6 years ago Closed 4 years ago

CORS randomly fails - does not send POST request to server

Categories

(Core :: Networking: HTTP, defect)

76 Branch
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jimmy, Unassigned, NeedInfo)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36

Steps to reproduce:

I have a web application using CORS. It has been tested with the latest Chrome, latest Safari, Latest Edge, old Edge 15, and old IE11. They all work. But in Firefox, all of a sudden requests randomly starts failing with the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8888/Server/Api/Server/Server.php. (Reason: CORS request did not succeed).
Learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSDidNotSucceed

If I restart Firefox, it works for a while, until it starts randomly failing again. I have no add-ons installed by the way.

So just to clarify; when it enters this unreliable mode, it only fails some requests. I can often refresh, and the page will load fine. But if I want all requests to work (at least for a short time), I have to restart Firefox.

In the server log I can see that the request failing (both the OPTIONS and POST request may fail) is never actually received on the server. While this could theoretically be a problem in some layer between Firefox and the server, it is unlikely since it works reliably in other browsers. It seems the request is never really sent from Firefox, even though the Network tab says otherwise (see screenshot).

Unfortunately I have no way to reliably reproduce this error. I'm mainly reporting this in the hope that someone else sees it and is able to add additional information. Or maybe a developer realize that this might be linked to some other bug.

Actual results:

CORS fails

Expected results:

CORS should not have failed - it does not on other browsers

Here is a screenshot of the OPTIONS request that might fail - although it most often goes through, while the following POST request is never received on the server.

Here is a screenshot of the POST request that might fail, in which case the request is never received on the server.

Hi Jimmy,

I'm going to set a component in order to involve the developer team in reviewing this issue.

Thanks for reporting!

Component: Untriaged → Networking: HTTP
Product: Firefox → Core

Thank you, Peter. Appreciated :-)

Jimmy

Jimmy, can I please ask you for a life test case so that we can try to reproduce this bug? Thanks.

Flags: needinfo?(jimmy)

Without a test case we can't make any progress. Closing as incomplete.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: