Completion handler passed to -[NSObject webView:decidePolicyForNavigationAction:decisionHandler:] was not called

Hi! I'm having this crash on the app, it only happens in production and I haven't been able to reproduce it. I attacedh the full crash report and here is the code for the decidePolicyForNavigationAction action:


func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
      guard let url = navigationAction.request.url else {
         decisionHandler(.allow)
         return
      }
      
      var policy: WKNavigationActionPolicy = .allow
      
      if (["tel", "sms", "facetime"].contains(url.scheme)
          || navigationAction.navigationType == .linkActivated
          && initialUrl.host != url.host)
            && UIApplication.shared.canOpenURL(url) {
         UIApplication.shared.open(url)
         policy = .cancel
      }
         
      decisionHandler(policy)
   }

Can someone help me find out what could be then cause for this isse?

Completion handler passed to -[NSObject webView:decidePolicyForNavigationAction:decisionHandler:] was not called
 
 
Q