Hi everybody,
I got an app that is trying to fecth data from a REST deployed on our server over HTTPS with our own certificate (we didn’t distribute it so SSL is private)
Response works correctly if I use web preview but when I try to see the preview in the APP on my phone i receive the following message
{
“name”: “error”,
“type”: “object”,
“title”: “Error”,
“properties”: {
“code”: {
“enum”: [
“requestFailed”,
“serverError”,
“unknown”
],
“type”: “string”
},
“message”: {
“type”: “string”
},
“rawError”: {
“type”: “value”
}
},
“description”: “One of the following error codes:\n\n- requestFailed: Thrown if the entire request failed due to e.g. CORS issues or no network connectivity.\n- serverError: Thrown if the server returned an error response.\n- unknown: Thrown if an unknown error occurred while fetching the collection of records.”,
“value”: {
“code”: “unknown”,
“message”: “TypeError: Network request failed”,
“rawError”: {
“line”: 137,
“column”: 7285,
“sourceURL”: “index.android.bundle”
}
}
}
CORS is implemented and I don’t know how to use web service in https in my APP
From server access log we don’t receive any calls
Could someone help me on this?
I guess issue is on certificate not distributed but I don’t know how I can skip or let the app accepting certificates not trusted
Any idea on how to implement this?
Server are ours so it is safe to accept the certificate even if is not signed.
I would also add that in order to let the WS working also on browser, you have firstly to invoke the WS from the browser, accepting the certificate.
Do you know how to save the certificate in the app?
Issue has been solved so the thread can be renamed as FIXED
What I’ve done has been to sign my domain certificate with a CA
Here the instruction on how to generate a certificate signed by a CA for free
ssh into your public server that your domain is associated with