英文:
React Native Android [AxiosError: Network Error]
问题
我的React Native项目在Android和iOS上都成功运行。但突然间,在Android上的http请求失败了。在iOS上仍然正常工作。当我将域名更改为IP地址时,在Android上可以正常工作。为什么会发生这种情况?我尝试将请求头中添加Content-Type,如下图所示,但仍然得到相同的结果。
英文:
My React Native project was successfully running on both Android and iOS.
But suddenly it http request failed on Android.
It's still working find on iOS.
When I change the domain to ip address it works fine on Android.
Why does this happen?
enter image description here
I tried to add content-type to request headers like below but still get the same results.enter image description here
答案1
得分: 0
我解决了这个问题。
以下链接对我有帮助。
https://community.f5.com/t5/technical-forum/ssl-handshake-failed-for-tcp-android-application-request/td-p/312099
我没有正确安装链证书,所以在 Android 上握手失败。
https://www.sslshopper.com/ssl-checker.html
安装了链证书后,一切正常。
英文:
I figured out the problem.
Below link helped me.
https://community.f5.com/t5/technical-forum/ssl-handshake-failed-for-tcp-android-application-request/td-p/312099
I didn't install chain certificate correctly, so handshake was failed in android.
https://www.sslshopper.com/ssl-checker.html
Installed chain certificate and it worked well.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论