Development build works great but Preview build won't make requests

Hi @alfx

Are you by any chance using HTTP to talk to your API server instead of HTTPS? These days that sort of thing is denied by default unless you configure the app to allow clear text traffic.

For Android you can do it using Build Properties. There’s an “usesCleartextTraffic” option:

See also the example of how to use Build Properties in app.json further up the page.

In iOS this sort of thing needs to be configured in Info.plist. In a managed Expo app you don’t have direct access to Info.plist, but you can also configure that from app.json.

There’s an example here:

But if this is the problem you might also look into getting a free Let’s Encrypt SSL certificate for your API server instead.

Also if you haven’t yet, check out Keith’s video about using the native device logs for debugging production app errors:

1 Like