# Flutter plugin reporting NSURLErrorCancelled when using certificate pinning on iOS

**URL:** <https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138>\
**Category:** Real User Monitoring\
**Tags:** mobile-monitoring, ios\
**Created:** [August 5, 2022, 2:40pm UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138 "2022-08-05T14:40:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcornelius](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jcornelius/32/28372_2.png) [@jcornelius](https://community.dynatrace.com/u/jcornelius)\
**Post date:** [August 5, 2022, 2:40pm UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138/1 "2022-08-05T14:40:17Z")

</div>

When using the Dart ssl\_pinning\_plugin check() method to validate certificates for a DNS, it creates a connection to retrieve the certificate info and then terminates the connection which results in the Dynatrace Flutter plugin reporting an error of -999 NSURLErrorCancelled on iOS.

 ![NSURLErrorCancelled.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/0/f0954289733846cdb4eab5cfd866499f4b1440ec.png)

I cannot find a way to exclude that from being reported as an error and as such is causing all the user sessions for iOS to have high error rates and a poor Apdex rating.&nbsp; We are able to exclude common response codes like 4xx or 5xx from being reported in Dynatrace but I do not see a way to exclude this particular error.&nbsp; Is there something that can be configured either in Dynatrace or in the Dart code to exclude this?

---

<div class="post-metadata">

**Author:** ![Patrick\_H](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/patrick_h/32/37540_2.png) [@Patrick\_H](https://community.dynatrace.com/u/Patrick_H)\
**Post date:** [August 9, 2022, 12:55pm UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138/2 "2022-08-09T12:55:38Z")

</div>

On Dynatrace cluster side everything that is a HTTP code can be excluded from treating it as error, but this does not apply to other error responses, so anything that is not a 3-digit number in the HTTP response codes range is treated as an error (negative numbers, strings,…) and currently cannot be ignored.  
FYI&nbsp;[@thomas\_billi](https://community.dynatrace.com/user/23546)&nbsp; do we have an improvement for that situation planned?

---

<div class="post-metadata">

**Author:** ![thomas\_billi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/thomas_billi/32/25487_2.png) [@thomas\_billi](https://community.dynatrace.com/u/thomas_billi)\
**Post date:** [August 9, 2022, 2:01pm UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138/3 "2022-08-09T14:01:27Z")

</div>

It’s definitely a limitation that we are aware of. We do not yet know how we will address it.

---

<div class="post-metadata">

**Author:** ![paul\_kapeller](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/paul_kapeller/32/37806_2.png) [@paul\_kapeller](https://community.dynatrace.com/u/paul_kapeller)\
**Post date:** [March 13, 2024, 8:54am UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138/4 "2024-03-13T08:54:12Z")

</div>

more customizable exclusion rules are planned with OpenPipeline and the new Platform once we ingest RUM data via OpenPipeline.

---

<div class="post-metadata">

**Author:** ![eddbarrientos19](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eddbarrientos19/32/39313_2.png) [@eddbarrientos19](https://community.dynatrace.com/u/eddbarrientos19)\
**Post date:** [November 5, 2024, 1:43am UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138/5 "2024-11-05T01:43:24Z")

</div>

Good evening

Is there any update on how to exclude a “-999NSURLErrorCancelled” error as it is not an HTTP code.

I have a client who is presenting the same error and they are looking to exclude it

---

<div class="post-metadata">

**Author:** ![Vivek\_Reddy](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek\_Reddy](https://community.dynatrace.com/u/Vivek_Reddy)\
**Post date:** [May 26, 2025, 12:18pm UTC](https://community.dynatrace.com/t/flutter-plugin-reporting-nsurlerrorcancelled-when-using-certificate-pinning-on-ios/36138/6 "2025-05-26T12:18:32Z")

</div>

Hi Paul,

Is there any solution for above?

Best Regards,

Vivekananda Reddy Vintha
