Putting a break on console warning

I am getting this console warning:

How do I put a breakpoint on it? It is not obvious what "this method" it's talking about.

1 Like

You should see a runtime warning as well, which may be able to point to the source. Make sure you haven’t turned off the os module functionality. Most of the time this warning is from WKWebView, unless you’re using the Security APIs directly.

If it is from WebView as @Jon_Shier said, ime there's no way around this: If it's on the main thread you get this warning, and if it's off the main thread it kills your app.

Indeed. WebKit itself calls this on the main thread:

SecTrustCopyCertificateChain β†’ SecTrustEvaluateIfNecessary

and that complains.

Wanted to check if this error is caused by my code or not - it is not in this case, so all good for now.

Apparently someone in Apple was also annoyed with this error to the extent they've put a workaround: this error is not logged if my app's bundle identifier is prefixed with "com.apple." :wink:

10 Likes

That's amazing. No wonder it's not fixed.

6 Likes

See this DevForums post for my take on this general issue.

Share and Enjoy

Quinn β€œThe Eskimo!” @ DTS @ Apple

5 Likes

It appears that a fix for this was merged into WebKit on January 5th.