Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking requests might not be loaded because of CORB #17159

Closed
tsteur opened this issue Jan 27, 2021 · 6 comments · Fixed by #17180
Closed

Tracking requests might not be loaded because of CORB #17159

tsteur opened this issue Jan 27, 2021 · 6 comments · Fixed by #17180
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jan 27, 2021

In the browser developer console I see a warning linking to https://www.chromestatus.com/feature/5629709824032768 anyone seen this before?
See https://www.chromium.org/Home/chromium-security/corb-for-developers for more information.

HTTP with 204 seems to work but 200 blocked. send_image=0 is used so it should have sent an HTTP 204 header. Actually... this output happens because of bulk requests. The request with HTTP 200 was sent as a bulk request in this example.

image

response headers:

image

The console warning reads Cross-Origin Read Blocking (CORB) blocked cross-origin response XYZ with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.

For a URL where this can be reproduced feel free to ping me privately. I'm not sure if the tracking request will be executed or if just the response is not loaded.

Goal of this issue is to make sure such requests are tracked and the warning is no longer shown.

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Jan 27, 2021
@tsteur tsteur added this to the 4.2.0 milestone Jan 27, 2021
@sgiehl
Copy link
Member

sgiehl commented Feb 1, 2021

@tsteur I'm not very deep into CORS/CORB, but based on the description CORB is only applied for this type of content: JSON, HTML, XML. According to your screenshot, the bulk request returns a json, with http 200. Maybe the response type is the problem in that case. BulkTracking currently has it's own response handler, which always uses json. See https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/BulkTracking/Tracker/Response.php
Not sure if there was an intention that bulktracking requests are returning json content, is the response used in some cases? 🤔

@tsteur
Copy link
Member Author

tsteur commented Feb 1, 2021

I reckon to solve this issue be great if it also supported send_image=0 I suppose and then returned an HTTP 204. There should be no reason for returning JSON in a JS tracker request. And we're not reading the response.

The send_image would need to be set along {requests: [], token_auth: 'optional', send_image:0}. Be great to add this 👍

@bitsagarob
Copy link

We are still having this issue even when using latest matomo.js script

@tsteur
Copy link
Member Author

tsteur commented Oct 3, 2021

@segersrobbert are you using the latest version of Matomo? In case you are, is there any chance you can post a link to where we can reproduce this?

@inkskull
Copy link

inkskull commented Jan 4, 2022

Hello,
Still got what seems to be the same issue :

matomo-tracking.min.…cc00d517f6177b.js:2 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://monserveurencarton.eu/yunohost/sso/?r=aHR0cHM6L...Lmpz with MIME type text/html.

Tried it on Firefox : get the same answer

@FrozenBlueSky
Copy link

FrozenBlueSky commented Jun 8, 2022

I have the same issue. Usind version 4.10.1

matomo.js:35 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://... with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants