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

Chrome seems to have issues with Meteor when its Data Saver feature is used on HTTP #5641

Closed
greggman opened this issue Nov 10, 2015 · 5 comments
Labels

Comments

@greggman
Copy link
Contributor

My site www.vertexshaderart.com wasn't working on Chrome on iOS. I narrowed it down to their Data Saver feature. Turning it off fix the issue.

I'm sure the chrome team would like it to just work so I filed a bug.

In the meantime I'm trying to see if can add the header they mentioned to work around the issue. They say adding Cache-Control: no-transform should disable the data saver feature.

At the moment I have that being served by most requests but it's not enough. Missing is adding that to sockjs and websocket responses. I'm in the process of just hacking that in to see if it solves the issue.

@greggman
Copy link
Contributor Author

So I think this patch to sockjs works around the issue. I hacked it into my site and it started working.

@zol
Copy link
Contributor

zol commented Nov 17, 2015

Hey @greggman . Thanks for reporting this. Does this issue break your site in a major way? (that your patch works around?)

@greggman
Copy link
Contributor Author

Yes, the site doesn't work at all because of this issue. DDP never gets started.

Google looked into the issue. The specific issue is SocksJS is marking a couple of XHRs it does at the beginning as JSON but they aren't actually JSON. Google's Data Saver feature (and other proxies possibly as well) uses content aware compression. So, they see the content is marked as "JSON" and they remove any insigifinicant whitespace. SocksJS is incorrectly looking for that insignificant whitespace since they're claiming it's JSON they shouldn't be looking at whitespace.

There's 3 workarounds.

  • SocksJS should stop looking for insiginicant whitespace

or

  • SocksJS should stop marking the XHR as JSON if it's not actually JSON

or

  • Set the no-transform header and hope that all proxies respect it.

@geeksville
Copy link

Thanks @greggman - I too had users reporting this problem (my site was dead on Android if the user had turned on data saver). Your patch fixed it for me.

@zol zol removed the desired label Feb 23, 2016
@abernix
Copy link
Contributor

abernix commented Nov 25, 2016

Thanks for reporting this issue originally, @greggman. Sorry this didn't get followed up on sooner!

I've just dug through a bit and see the Chromium team filed an issue with SockJS (sockjs/sockjs-node#190) and (your) PR was merged into sockjs@0.3.16. Meteor has been using sockjs@0.3.17 since Meteor 1.3.3 (233b24e) so this is fixed in recent versions of Meteor!

Great find and fix on this. Closing as resolved. :)

@abernix abernix closed this as completed Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants