tera
March 30, 2023, 11:03pm
1
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
Jon_Shier
(Jon Shier)
March 31, 2023, 12:45am
2
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.
bbrk24
March 31, 2023, 1:58am
3
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.
tera
March 31, 2023, 9:20am
4
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."
10 Likes
Jon_Shier
(Jon Shier)
March 31, 2023, 9:04pm
5
That's amazing. No wonder it's not fixed.
6 Likes
eskimo
(Quinn βThe Eskimo!β)
April 1, 2023, 1:25am
6
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.
WebKit:main
β achristensen07:eng/Move-CertificateInfocontainsNonRootSHA1SignedCertificate-call-from-UI-to-web-process
opened 09:29PM - 03 Jan 23 UTC
#### 6cd18ec581756428f9d624d38b1c48b1b0c591d0
<pre>
Move CertificateInfo::contai⦠nsNonRootSHA1SignedCertificate call from UI to web process
<a href="https://bugs.webkit.org/show_bug.cgi?id=250043">https://bugs.webkit.org/show_bug.cgi?id=250043</a>
rdar://99324948
Reviewed by Chris Dumez.
It calls security framework functions which call SecTrustEvaluateIfNecessary which now warns developers
when it's used on the main thread. This warning is a good thing, but many developers are getting
confused and thinking that the problem is in their application code, when it's really in WebKit code.
To stop the warning when debugging third party apps, move the call to the web process. Also stop
sending an unnecessary std::optional.
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/ProvisionalFrameProxy.h:
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::commitProvisionalFrame):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Canonical link: <a href="https://commits.webkit.org/258511@main">https://commits.webkit.org/258511@main</a>
</pre>
https://github.com/WebKit/WebKit/commit/ba0a1f6f35bdae80ecd9ee4245449e71cbf0fe17
| Misc | iOS, tvOS & watchOS | macOS | Linux | Windows |
| ----- | ---------------------- | ------- | ----- | --------- |
| [β
π§ͺ style](https://ews-build.webkit.org/#/builders/6/builds/101856 "Passed style check") | [β
π ios](https://ews-build.webkit.org/#/builders/77/builds/11005 "Built successfully") | [β
π mac](https://ews-build.webkit.org/#/builders/43/builds/34930 "Built successfully") | [β
π wpe](https://ews-build.webkit.org/#/builders/8/builds/111191 "Built successfully") |
| | [β
π ios-sim](https://ews-build.webkit.org/#/builders/76/builds/11966 "Built successfully") | [β
π mac-AS-debug](https://ews-build.webkit.org/#/builders/85/builds/1919 "Built successfully") | [β
π gtk](https://ews-build.webkit.org/#/builders/36/builds/94266 "Built successfully") | [β
π wincairo](https://ews-build.webkit.org/#/builders/12/builds/108949 "Built successfully")
| [β
π§ͺ webkitperl](https://ews-build.webkit.org/#/builders/19/builds/107636 "Passed tests") | [β
π§ͺ ios-wk2](https://ews-build.webkit.org/#/builders/78/builds/9154 "Passed tests") | [β
π§ͺ api-mac](https://ews-build.webkit.org/#/builders/3/builds/92420 "Passed tests") | [β
π§ͺ gtk-wk2](https://ews-build.webkit.org/#/builders/35/builds/36936 "Passed tests") |
| | [β
π§ͺ api-ios](https://ews-build.webkit.org/#/builders/9/builds/91039 "Passed tests") | [β
π§ͺ mac-wk1](https://ews-build.webkit.org/#/builders/73/builds/23848 "Passed tests") | [β
π§ͺ api-gtk](https://ews-build.webkit.org/#/builders/34/builds/78721 "Passed tests") |
| | [β
π tv](https://ews-build.webkit.org/#/builders/81/builds/4594 "Built successfully") | [β
π§ͺ mac-wk2](https://ews-build.webkit.org/#/builders/70/builds/25334 "Passed tests") | |
| | [β
π tv-sim](https://ews-build.webkit.org/#/builders/82/builds/4677 "Built successfully") | [β
π§ͺ mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/84/builds/1774 "Passed tests") | |
| | [β
π watch](https://ews-build.webkit.org/#/builders/80/builds/10759 "Built successfully") | [β
π§ͺ mac-wk2-stress](https://ews-build.webkit.org/#/builders/62/builds/44821 "Passed tests") | |
| | [β
π watch-sim](https://ews-build.webkit.org/#/builders/79/builds/6429 "Built successfully") | | |
| [β
π π§ͺ unsafe-merge](https://ews-build.webkit.org/#/builders/75/builds/3085 "Built successfully and passed tests") | | | |