Bug 249944 - MiniBrowser: [WKWebView setInspectable:]: unrecognized selector sent to instance
Summary: MiniBrowser: [WKWebView setInspectable:]: unrecognized selector sent to instance
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-29 09:54 PST by Philip Rogers
Modified: 2022-12-30 19:08 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Rogers 2022-12-29 09:54:31 PST
I am getting the following error when running a release build of the MiniBrowser on MacOS 13.1:
WebKitBuild/Release/MiniBrowser.app/Contents/MacOS/MiniBrowser
  MiniBrowser[59280:935743] -[WKWebView setInspectable:]: unrecognized selector sent to instance 0x144e21a10

Removing the following line from Tools/MiniBrowser/mac/WK2BrowserWindowController.m works around the error:
  _webView.inspectable = YES;

This line was added in https://commits.webkit.org/255557@main
Comment 1 Radar WebKit Bug Importer 2022-12-29 11:05:14 PST
<rdar://problem/103762598>
Comment 2 Patrick Angle 2022-12-30 19:08:20 PST
It appears you might be running MiniBrowser without setting the frameworks path, as that would cause the system's WebKit.framework to be loaded, which does not have the `inspectable` property, whereas your built `WebKit.framework` should. If I'm reading your report correctly you are currently directly launching the MiniBrowser binary without pointing it at your built frameworks, which isn't supported. The most convenient way to run MiniBrowser from built sources is with the `run-minibrowser` script in `Tools/Scripts`. This script will run MiniBrowser and tell it to load frameworks from your build products directory as well.

If this issue reproduces for you even when using the `Tools/Scripts/run-minibrowser` script, could you please include what command you used to build the project from the command line? (`Tools/Scripts/build-webkit` + `Tools/Scripts/run-minibrowser` worked for me on a macOS 13.2 developer beta.)