-
Notifications
You must be signed in to change notification settings - Fork 13
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
Troubleshooting steps #220
Comments
Hey @erasmuswill, Apologies for the late reply. Did you make sure to initialize the pinning before any network requests have been made? You might be running into this particular known issue:
If this is not the issue you're facing, could you list out the versions you're using for React Native, Expo, and react-native-ssl-public-key-pinning? |
Hi @frw No worries. Hope you had a good festive season! Initialisation is the first thing done in the root app layout (using Expo Router) but I am not awaiting it since it is in the top level. For the testing that is falsely succeeding I am making a request to a domain that is not used anywhere else in the app, so caching should not be affecting it. React Native: 0.72.6 |
Gotcha, then it probably seems like a deeper issue related to your setup. Are you by chance using any libraries that replace the fetch implementation, or another library that also uses react-native-ssl-pinning to implement SSL pinning? I just tried plugging in the code you provided into a An error is logged when the fetch is attempted. I know you mentioned that it works in a minimal setup but fails in a larger project, but unfortunately I'm not quite sure where the issue could be without a reproducible example. Perhaps you could try setting a breakpoint on the You can also set further breakpoints in Hope that helps, let me know if there are any issues you encounter. |
@erasmuswill If you're using Check out this comment: #223 (comment) |
Thanks @frw |
Hi.
I'm having some trouble using this library and I am not quite sure where to start debugging. I have created a minimal app setup and this library works perfectly. However, in a bigger project, I am having some trouble being able to block domains that should fail validation.
I've tried the exact code as per the testing section of the README and I am now trying to run it against my own domain which is not used anywhere else in the app to avoid any caching issues.
This is the code I am using to test. I am using expo-router and the file containing this code is the very first import in the root layout folder:
The above code fetches and does not return a certificate error as expected. Xcode log shows the following, which I take to mean that setup has been completed successfully.
The text was updated successfully, but these errors were encountered: