Problems fetching data from a SSL based Server
Asked Answered
E

0

2

I had a Backend which wasn´t SSL based (http:.....). Everything worked just great. I am developing an Android and iOS App with React Native. I used superagent as my request client. So after i had changed my backend to SSL (https:...) i get the [TypeError: Network request failed] error on all GET/POST etc.

Now maybe i have to save the ssl - certificate or something like that, but didn´t find anything that worked. Maybe someone experienced the same/similar issue and could help me out?

Enthrone answered 13/12, 2015 at 21:37 Comment(9)
Do you get a security warning when you visit the link via a browser?Lucilelucilia
No, it works fine...Enthrone
There's no strikethrough through the https when you visit it in your browser? You've also changed the GET/POST url to https? Just trying to narrow it downLucilelucilia
Yeah, i actually just changed my URL constant to https. After that i get this error. No idea why. Switching back to my http works perfect.Enthrone
I tried to use any other request clients, which doesn´t work. Then i tried to acces any data with post/get etc. with POSTMAN and Advanced Rest Client which worked perfect too. So this means my backend works, but not with my React Native App...Enthrone
Have you tried deleting the app from the simulator and rebuilding it? Maybe it's a caching errorLucilelucilia
Also check #31255225Lucilelucilia
@Richard de Wit yes i tried, without success :( Maybe it is caused by the emulator? I use Genymotion, but actually i tried it with a real device which brings me the same issue. It has to be a React Native/JavaScript issue, or i am missing something which i have to onclude. Something like Internet permission in Android Manifest or something which is needed for SSL requests?!Enthrone
You would only need to supply the SSL client cert if the cert your server uses isn't signed by a trusted certificate authority. If a browser considers the connection secure, your device will as well.Nonprofessional

© 2022 - 2024 — McMap. All rights reserved.