Website OK on Firefox but not on Safari (kCFErrorDomainCFNetwork error 303) neither Chrome (net::ERR_SPDY_PROTOCOL_ERROR)
Asked Answered
G

4

7

Since some days, my website won't load on Safari nor Chrome on Mac OS X (at home nor on my clients computers). It's working well on Firefox (Mac OS & Windows) and IE / Edge, but not Chrome (Windows). It was well working before that and was not updated since weeks.

I'm facing this error on Safari

Failed to load resource: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 303.)

And this one on Chrome

 Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR

It seem's to be related to HTTP/2 but I don't really know what is the problem.

I saw that a workaround is to clear the cache and cookie. I did and it works on Chrome the first time I load the website, but when I navigate to another page, the error appear again. I also flush opened socket without effects.

On Safari, flushing the cache and cookie has no effects.

My hoster (OVH) tells me that the problem is in my code but I cannot figure out where could be the bug.

Do you have any clue about that ?

Thanks a lot

Gamaliel answered 19/4, 2018 at 17:55 Comment(0)
I
13

We have had a problem with nginx and HTTP/2 which resulted in the same error in Safari and a similar error in Internet Explorer.

When we tweaked the nginx buffers to be:

http2_max_field_size 16k;
http2_max_header_size 128k;

the issue was gone.

Idolater answered 21/5, 2018 at 6:1 Comment(3)
Hi, thanks for the reply ! Unfortunaly, I don't have the hand on the hoster configurations. Moreover, they use Apache and not Nginx, so...Gamaliel
It turns out that once the cookies get too large, the default http2_max_header_size is reached which causes the issue mentioned in the question.Batholith
After hours of dead-end testing with Safari, this was our solution. Thank you so much!Judicatory
T
1

My problem was disappearing after reloading the page. So it always shows the error on the first load after nginx reload. Error log shown:

2018/10/21 06:26:54 [crit] 9439#9439: *54 open() "/var/cache/nginx/proxy_temp/2/01/0000000012" failed (13: Permission denied) while reading upstream, client: 37.9.113.93, server: anvileight.com, request: "GET /ar/ HTTP/1.1", upstream: "http://unix:/run/a8/gunicorn.sock:/ar/", host: "anvileight.com"

My problem was that nginx has directive:

user       deploy deploy;

and indeed, permissions on that folder were incorrect:

ll /var/cache/nginx/proxy_temp
total 40K
drwx------ 102 www-data www-data 4.0K Jan  6  2018 0
drwx------ 102 www-data www-data 4.0K Jan  6  2018 1

When I changed it to

user       www-data www-data;

problem has gone

Teratology answered 21/10, 2018 at 6:30 Comment(0)
A
0

The problem is a result of Safari holding too much local data for the site in question and failing to deal with that correctly. I use archive.org a lot so I had lots of LocalStorage and Cookie data for that site. The fact that this data is only in my main browser Safari and not in any of my other browsers explains why they could browse the site just fine.

So, the solution:

  1. Go into Safari > Preferences > Privacy
  2. Search for the affected domain name (for me this was "archive.org")
  3. Click Remove
  4. The problem goes away!

Here's a video showing the problem before and after: https://i.stack.imgur.com/gAFtv.jpg

Aeronaut answered 11/8, 2019 at 15:12 Comment(1)
Please don't add the same answer to multiple questions. Answer the best one and flag the rest as duplicates, once you earn enough reputation. If it is not a duplicate, tailor the post to the question and flag for undeletion.Pledgee
F
0

This suddenly started happening for me when the files were referenced on my local in a parent directory. Solution was to move to child directory.

Fallible answered 9/6, 2021 at 21:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.