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

Client-side CORB Warning #174

Open
vliegenthart opened this issue Apr 18, 2019 · 9 comments
Open

Client-side CORB Warning #174

vliegenthart opened this issue Apr 18, 2019 · 9 comments

Comments

@vliegenthart
Copy link

We use this keen-tracking package to stream events directly from client-side browsers. Since recently this warning has been showing up:

Cross-Origin Read Blocking (CORB) blocked cross-origin response <KEEN API URL> with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.

Anything we can do from our side to fix and/or circumvent it?

Thanks!

@adamkasprowicz
Copy link
Contributor

Hi @vliegenthart
Which version of the keen-tracking do you use?
In v4 you can set a request type
https://github.com/keen/keen-tracking.js#request-types
By default it's Fetch, with a "cors" option turned on.

@vliegenthart
Copy link
Author

Hi @adamkasprowicz,

My apologies for my slow response.

I'm using keen-tracking version 4.0.7 and I've enabled the beaconAPI request type. Is there a way to fix the mentioned error for beaconAPI? Thanks!

@adamkasprowicz
Copy link
Contributor

Hi @vliegenthart ,
I passed this ticket to our backend guys. It's related to a mismatch between request headers and response headers. We can't control the headers of the beacon request, so we have to change the response headers for this kind of requests.

@adamkasprowicz
Copy link
Contributor

PS: In the near future, we'll move from Beacon API to Fetch with KeepAlive flag. It's not yet supported because of cors bug https://bugs.chromium.org/p/chromium/issues/detail?id=835821

@vliegenthart
Copy link
Author

Hi @adamkasprowicz,

Thanks for the update! I'll keep an eye out for any developments.

@DroidUnknown
Copy link

Is there any update on this issue? I am also facing CORB with latest keen tracking api. All my requests are getting blocked from Chrome browser with Beacon API.

If I try to use fetch api then some of the events are registered with status 200 or 201 but the events that are fired at page close get cancelled out.

@vliegenthart
Copy link
Author

@adamkasprowicz Do you have any update on this issue? Thanks!

@maciejrybaniec
Copy link
Contributor

maciejrybaniec commented Feb 24, 2020

Hi @DroidUnknown,
Could You please specify if the request or responses are blocked ? Based on specification CORB prevents the browser from delivering cross-origin network responses. So all of events should be delivered correctly to Keen platform.

@maciejrybaniec
Copy link
Contributor

maciejrybaniec commented Feb 24, 2020

Hi @vliegenthart

Actually the fixing for this issue is currently not on our roadmap due to other initiatives - especially having in mind that the discussion about beaconAPI is still open for different browsers (Mozilla) and it could change in near future.

The error about CORB should not affect the page that using Keen-Tracking and all events should be sent to correctly.

We'll try to address that issue as soon as it will be possible - by adding support to keepAlive flag - however the issue mentioned earlier (Bug) must be resolved to deliver a full working solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants