-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[iOS and Android] Network request failed when HTTP/2 enabled. #8027
Comments
On Android there is a known problem with OkHttp and should get better once some upstream issues with OkHttp allow us to use a newer version of OkHttp in RN: #7746. On iOS I don't think we've seen issues yet but thanks for the report. We should fix the JS bug that causes "Can't find variable: self", but |
Similar #7943 |
Are the servers all using nginx 1.10.X? This is probably related to https://trac.nginx.org/nginx/ticket/959 I'm experiencing this on iOS and after adding some debugging in the RN networking internals I saw I was getting error -1004. That led me to this: http://stackoverflow.com/questions/36907767/nsurlerrordomain-code-1004-for-few-seconds-after-app-start-up and then to the nginx issue referred to above. |
Looks like this has been fixed |
This was a really interesting issue and really hard to catch.
We started to encounter this error which was crashing the app when doing a
post
request to the server:console.log from
.catch()
of the fetch call.XCode console output:
One weird thing is that the first request always throws this error but from the second request everything works fine.
After a long day investigating it we discovered that is related to the HTTP/2 feature
It used to work before, but Chrome deprecated the old way it worked on May 15 and it was de-facto disabled since then.
We've reenabled it by upgrading out openresty which is based on NGINX 1.9.15, but apparently react-native can't handle the upgraded version, which sucks ass.
It will be a pain in the ass to reproduce it since you need OpenSSL 1.0.2, that means the most recent Ubuntu - 16.04, because previous versions are stuck on OpenSSL 1.0.1.
We're running Ubuntu 14.04, so I had to compile OpenSSL from source to make it work.
I saw that on release 0.27 of react-native you guys cherry picked this commit ( 6bbaff2 ) which is related somehow but in the description of the issue ( #4021) that motivated the commit the problem was only for Android however we experienced this in both platforms ( iOS and Android ).
The text was updated successfully, but these errors were encountered: