Closed Bug 1376253 Opened 7 years ago Closed 2 years ago

Missing CORS preflight OPTIONS request in the Network panel

Categories

(DevTools :: Netmonitor, defect, P2)

56 Branch
defect

Tracking

(firefox57 fix-optional)

RESOLVED WORKSFORME
Tracking Status
firefox57 --- fix-optional

People

(Reporter: gerd.neumann, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(6 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20170625030210

Steps to reproduce:

Doing ajax CORS requests, see description at https://bugzilla.mozilla.org/show_bug.cgi?id=1375561#c0


Actual results:

ATM, in Console this preflight was not successful is not shown. This report is for the netmonitor. Netmonitor shows the OPTIONS request and a green 200 status. See screenshot. Technically, this is correct.


Expected results:

There should be an indicator that this was a preflight request for CORS and despite being 200 status it should show, that something went wrong and that there is a CORs issue.

When I hit CORS issues I first look into the Console (for which we now have Bug 1375561), then I look at the netmonito (for which I now filed this bug report)
Component: Untriaged → Developer Tools: Netmonitor
See Also: → 1375561
Product: Firefox → DevTools
Attached image image.png (obsolete) —

I am not seeing the OPTIONS request anymore.
I am seeing just one blocked GET request now

Chrome is showing both GET & OPTIONS

See the attached screenshot.

@Gerd, how does the test case work for you now?

Honza

Flags: needinfo?(gerd.neumann)
Attached image image.png

Attaching the proper screenshot.

  • The top one is Firefox, showing just one GET
  • The bottom one is Chrome, showing GET and OPTIONS

Here is an online test case based on the one in comment #0

STR:

  1. Load http://janodvarko.cz/tests/bugzilla/1376253/
  2. Open DevTools and select the Network panel
  3. Click the button on the page
  4. You should see two requests GET and (preflight) OPTIONS
  5. There is just GET => BUG

Chrome shows both correctly.

Honza

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Priority: -- → P2
Summary: Add indicator to failed 200 OPTIONS preflight CORS request in netmonitor → Missing CORS preflight OPTIONS request in the Network panel

Junior, can you reproduce this bug?
The preflight request doesn't seem to be reported by Necko platform hooks.
Is it a Necko issue?

Honza

Flags: needinfo?(juhsu)
Attached image 1590520028406.jpg

I see the blocked OPTION in the latest nightly

Flags: needinfo?(juhsu)

@bomsy, can you repro the issue using STRs in comment #3?

Honza

Flags: needinfo?(hmanilla)
Attached image nightly.png
Flags: needinfo?(hmanilla)
Attached image mc.png

I see it Fixed in Nightly see comment #7
But it seem broken in MC see comment #8

Looks like it might have regressed?

Flags: needinfo?(odvarko)

@harald, can you also test this one?

I am wondering if CORS cache can be involved in this...

Honza

Flags: needinfo?(odvarko) → needinfo?(hkirschner)

WFM in Nightly, I see both a red OPTIONS and GET request.

Flags: needinfo?(hkirschner)

(In reply to Hubert Boma Manilla (:bomsy) from comment #9)

I see it Fixed in Nightly see comment #7
But it seem broken in MC see comment #8

Bomsy, could you check this again. How it's working for you now in Nightly/m-c?

Honza

Flags: needinfo?(hmanilla)

Hey honza,
i'm still seeing the same as Comment 9

Flags: needinfo?(hmanilla)

(In reply to Hubert Boma Manilla (:bomsy) from comment #13)

Hey honza,
i'm still seeing the same as Comment 9

Thanks for the update. Yes, I can now see the same.

What could be the difference between m-c and Nightly build?

Honza

Honza do you still an issue here?

Flags: needinfo?(odvarko)
Attached image image.png

I can't reproduce the issue anymore.

  • The Network panel shows two failed requests: OPTIONS, GET
  • The Console panel shows two errors (+ XHRs if the XHR filter is on)

Honza

Flags: needinfo?(odvarko)

Feel free to reopen if you are still experiencing the reported problem.

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

Attachment

General

Creator:
Created:
Updated:
Size: