Transport Security Protocol problem

Recently for some reason I hit fetch of localhost:someport and transport security protocol blocked every network request in expo app. How should I solve this without ejecting?

are you doing this from your phone? if so, the reason you are seeing this is that localhost refers to your phone and not your computer when running the app on your phone.

Yes, I connect on my physical device. I understand that reason is tsp that block all network requests because it was working fine until I hit HTTP. With that said, how do I include domain exceptions and allow arbitrary loads in expo?

you can’t hit localhost from your device. you need to use a network ip.

i imagine what you are asking about is NSAllowsArbitraryLoads which you probably stumbled upon while googling this. it’s a red herring. NSAllowsArbitraryLoads is enabled in expo go and all expo projects by default. Search · NSAllowsArbitraryLoads · GitHub

Ok, so I need a solution for this issue now

i think you are really misunderstanding what i am saying. there is no issue. just don’t use localhost to refer to your server because that will not work from your phone. use a network ip or something else instead.

I am sorry, I just tried to use another device and it works fine, but so then why do all network requests fail on my current device…

if you hit localhost then there is no way that using another physical device would work, unless you are using an android device, where adb reverse (run automatically with expo-cli) will solve this issue. perhaps you are using a simulator, which is very different because it is running on the same host.

if you are still having trouble, please see How do I ask a good question? - Help Center - Stack Overflow and follow those guidelines and follow up here

No, I am using devices. Ok, will read that. I fix that by reinstalling expo go app…

The server checks what the highest SSL/TLS version is that is supported by them both, picks a cipher suite from one of the clients option if it supports one and optionally picks a compression method. After this the basic setup is done, the server provides its certificate.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.