Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 661
Al3 Avatar asked Apr 19 '18 17:04

Al3


People also ask

What does domain error 303 mean?

A 303 See Other error is a status response code telling you that the URL you're trying to access is redirecting you to another URL. You'll receive the 303 See Other error when this communication doesn't happen correctly.


2 Answers

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.

like image 161
uson1x Avatar answered Sep 28 '22 11:09

uson1x


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

like image 21
Andrii Zarubin Avatar answered Sep 28 '22 11:09

Andrii Zarubin