-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[[__NSArrayM insertObject:atIndex:]: object cannot be nil] [Cordova-Ios] App crash with SSL pinned active #507
Comments
I have the same problem, it happens to me sometimes not always, when I make a post request the ios app crash, on android it works fine. I make the request as: http.post() |
The problem may lie in the "setServerTrustMode" function. If I use the following code, there will be an error.
If I use the following code, it can run normally.
However, I cannot determine if it's a problem with the certificate path or a plugin issue. I have tried placing the certificate in various paths, but the error still occurs. |
I found the reason, it's an SSL issue. The server.cer file works on Android but not on iOS. You can refer to the following link to convert the cer file to DER encoding. |
Hi, I'm having a problem similar to issue #173, but that one is closed. I hope you can help me, please.
Describe the bug
When I'm trying to make a POST request, my app crashes due to an NSException. This works fine on Android with the same code and .cer file.
System info
Minimum viable code to reproduce
const options = {
method: 'post',
data: { id: 12, message: 'test' },
headers: { Authorization: 'OAuth2: token' }
};
cordova.plugin.http.sendRequest('https://google.com/', options, function(response) {
// prints 200
console.log(response.status);
}, function(response) {
// prints 403
console.log(response.status);
//prints Permission denied
console.log(response.error);
});
The text was updated successfully, but these errors were encountered: