ios https network error

The app is detached.

I can use a http url and it works fine, but not the https url. The https url works fine in postman.

I get [TypeError: Network request failed] when I use the https url.

Nothing special about the code. It fails whether I run it through the emulator or my phone. It has to be some sort of permissions error maybe?

fetch(url, {
method: ‘POST’,
body: JSON.stringify(data),
.then((res) => {
console.log(‘res’, res);
callback(true,, null);
.catch((error) => {
console.log(‘error’, error);

What is the error message?
The https has a valide certificate?

read above please and yes the server has a valid cert (hosted on amazon)

1 Like

This is the Type Error, in your code u can
console.log(e) -> that will print [TypeError: Network request failed]
console.log(e.message) -> that will show more info about the error.
or even
console.log(JSON.stringfy(e)) -> that will show an json with ALL error info.

Older Android phones might have trouble with Amazon TLS certificates because Amazon was not a root CA back then. Unclear if that’s your issue but I would look at ADB logs and your Android certificate store to see if this could be it.

No. This is an ios app.

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