-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
iOS: not working with pinned cert mode #137
Comments
Is there any fix for this issue? |
Some additional information on this issue. This is the code:
So encoding format of certificate is correct. But issue still persists and the error code we are getting is
@silkimen We have checked with latest releases pushed over past few days but none of them seems to fix this issue. Plugin works fine if We would really appreciate any help or input on this issue. Please let me know if you need any more details to replicate this issue. Thanks |
Hi Vipin, is your endpoint publicly available, so I can test it on my device? |
@silkimen Thanks for responding. I am not sure how to make it easier for you to debug this issue. Please let me know what you suggest. |
@silkimen I created a private repo for the demo project which contains all resources to replicate and test this issue. I have added you as a collaborator to that repo. Please let me know if you need anything else to try and replicate this issue. Once it is fixed we can report the results here. |
Hi @silkimen |
@ravi-pandit14 @mrvipinkashyap Have you guys tried version 2.0.0 or above for this plugin? Looks like the |
@keithdmoore Thanks for checking. |
I'm having the same issue with the v2.0.1. It works if the
option is used but it doesn't work when the pinning is active or in
mode. Pls fix this. |
I am having the same issue. |
Ok, so I was having this issue and I realised I was putting the certificates folder in the wrong place so it was not actually finding it therefore it was not pinning and throwing this error. After I placed the certs inside the correct folder, it worked fine. The certificates folder should be inside the www folder. Make sure it's in the right place or else it will keep failing. Now, in Ionic 4, if anyone is using it, it's more tricky since when you build your app your www gets rewritten. To make it work I had to create a Cordova hook that copies the certificates folder from the root of the project and paste it inside the right folder inside each platform ( |
Hello @mm44m6 , I have tried to put .cer file in certificates folder and add |
@divyangsolanki |
@mm44m6 And in my www folder certificates folder is not created after building the application. |
@divyangsolanki |
@mm44m6 I have tried one solution to give certificate file path in config.xml file
For Platform iOS:
This solution is also not working. |
@divyangsolanki: you have to put your certs in |
I have tried to implement as per your suggestion but it is not working. I am always getting "Success" although I have put an invalid certificate in android. |
We have the same problem and Can't figure out what's wrong. We're only getting back a "canceled". |
@zeidlos are you putting the certificates in the right folder? And also, are you using the right certificates for you endpoint? From what I've seen here, while trying to debug the native code, this error could be related to ssl issues. |
@mm44m6 I have put my certificates in the right folder and I am using an invalid certificate to check whether error case is generated or not. But it is not working in iOS. |
@mm44m6 Hello Maria, can you share the hook you created? I'm using Ionic 3 but the www-Folder is not in our version control, so I need a way to put the certificates into the www folder automatically after the build process. |
@elin-y the hook I was talking about, I hope it helps you. |
I'm having the same issue, anyone had success when pinning on iOS? |
Anyone has the solution for Ionic4 using this plugin? but it's not working so far.
|
Closing this, feel free to open a new issue, if this won't solve your problem! 👍 |
In my case, iOS app stopped with the log message:
In this context, this usually means certificate file cannot be loaded (not found or wrong format). My issue was, I had a multiple certificate files. Only one of them was not a valid format (or somehow something is wrong with the cert):
So, in case you have multiple .cer files, please make sure EVERY .cer file is valid (even if that is not the cert that you are actively using). Hope this helps reduce someone's frustration when facing this issue. |
@kctang Hi, I facing the same issue and I am frustrated but thank you are giving solution i will try and check if this is working are not. Error: |
@kctang Hi, Thanks. It's working. |
We are facing an issue with getting this plugin to work on iOS. This plugin is working fine on Android.
We are getting following error on iOS:
Error:
{"status":-1,"error":"cancelled"}
Some additional details about setup:
We are using ionic and have also tested this plugin on starter Ionic app to make sure this is not something related to compatibility with other plugins.
We have checked relevant fixes provided for this similar issue reported in other cases but none of them have worked. e.g #116 (comment)
using package.json dependencies:
The text was updated successfully, but these errors were encountered: