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?

BigPun86
  • 2,480
  • 2
  • 25
  • 49
  • Do you get a security warning when you visit the link via a browser? – Richard de Wit Dec 14 '15 at 11:16
  • No, it works fine... – BigPun86 Dec 14 '15 at 13:57
  • 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 down – Richard de Wit Dec 14 '15 at 14:01
  • 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. – BigPun86 Dec 14 '15 at 14:44
  • 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... – BigPun86 Dec 14 '15 at 14:46
  • 1
    Have you tried deleting the app from the simulator and rebuilding it? Maybe it's a caching error – Richard de Wit Dec 14 '15 at 15:06
  • Also check http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http – Richard de Wit Dec 14 '15 at 15:07
  • @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?! – BigPun86 Dec 14 '15 at 17:12
  • 1
    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. – Johnny C May 18 '16 at 16:50

0 Answers0