Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ui\webview] Inspector not working properly on macOS #1729

Open
drkameleon opened this issue Sep 24, 2024 · 0 comments
Open

[Ui\webview] Inspector not working properly on macOS #1729

drkameleon opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
3rd-party Issues related to 3rd-party libraries and code bug Something isn't working macos macOS-releated issues ui Issues related to the UI

Comments

@drkameleon
Copy link
Collaborator

drkameleon commented Sep 24, 2024

Describe the bug

When we open a webview with the .debug option (thus enabling the built-in Inspector) and try to see or use the Developer Tools, it behaves weirdly:

  • There is a long error log in the terminal (= where we have loaded the script)
  • The window itself seems "stuck" (it doesn't react normally, it doesn't seem to resize as it should, etc)
  • If we open the Console tab, it actually gets stuck

To Reproduce

webview.debug {!html
    <h1>Hello through the webview</h1>
    <a href="#">Click here to see more!</a>
}

Save this as debugwebview.art and run with arturo mywebview.art.

And then right-click anywhere and select "Inspect Element".

The error log shows:

2024-09-24 06:47:11.482 arturo[27182:1587033] NSWindow warning: adding an unknown subview: <WKInspectorWKWebView: 0x7fb6fff15890>. Break on NSLog to debug.
2024-09-24 06:47:11.488 arturo[27182:1587033] Call stack:
(
	0   AppKit                              0x00007ff81de63e2a -[NSThemeFrame addSubview:] + 112
	1   AppKit                              0x00007ff81de63b69 -[NSView addSubview:positioned:relativeTo:] + 203
	2   AppKit                              0x00007ff81de63a26 -[NSThemeFrame addSubview:positioned:relativeTo:] + 46
	3   WebKit                              0x00007ff91dc81ce0 _ZN6WebKit19WebInspectorUIProxy14platformAttachEv + 336
	4   WebKit                              0x00007ff91de36878 _ZN6WebKit19WebInspectorUIProxy4openEv + 112
	5   WebKit                              0x00007ff91e07b97b _ZN6WebKit19WebInspectorUIProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 159
	6   WebKit                              0x00007ff91e1630ab _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 203
	7   WebKit                              0x00007ff91dde98b3 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 31
	8   WebKit                              0x00007ff91e15f331 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 275
	9   WebKit                              0x00007ff91e15f76b _ZN3IPC10Connection24dispatchIncomingMessagesEv + 311
	10  JavaScriptCore                      0x00007ff835d95a9e _ZN3WTF7RunLoop11performWorkEv + 414
	11  JavaScriptCore                      0x00007ff835d9673a _ZN3WTF7RunLoop11performWorkEPv + 26
	12  CoreFoundation                      0x00007ff81ada1eba __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	13  CoreFoundation                      0x00007ff81ada1e5c __CFRunLoopDoSource0 + 157
	14  CoreFoundation                      0x00007ff81ada1c35 __CFRunLoopDoSources0 + 217
	15  CoreFoundation                      0x00007ff81ada08bf __CFRunLoopRun + 916
	16  CoreFoundation                      0x00007ff81ad9fec1 CFRunLoopRunSpecific + 560
	17  HIToolbox                           0x00007ff824822f3d RunCurrentEventLoopInMode + 292
	18  HIToolbox                           0x00007ff824822d4e ReceiveNextEventCommon + 657
	19  HIToolbox                           0x00007ff824822aa8 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	20  AppKit                              0x00007ff81de3e10c _DPSNextEvent + 858
	21  AppKit                              0x00007ff81de3cfb6 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1214
	22  AppKit                              0x00007ff81de2f638 -[NSApplication run] + 586
	23  arturo                              0x00000001035fcb3a _ZN7webview6detail22cocoa_wkwebview_engine8run_implEv + 74
	24  arturo                              0x00000001035fa1cd webview_run + 45
	25  arturo                              0x00000001038a56e6 show__helpersZwebviews_u295 + 22
	26  arturo                              0x0000000103940ff1 colonanonymous___libraryZ85i_u10136 + 2097
	27  arturo                              0x000000010376e912 ExecLoop__vmZexec_u233 + 11090
	28  arturo                              0x0000000103942d94 run + 692
	29  arturo                              0x0000000103949d7b NimMainModule + 1515
	30  arturo                              0x000000010394b3d1 main + 49
	31  dyld                                0x00007ff81a96c41f start + 1903
)

Screenshots

debugwebview

System

  • OS: macOS
  • Version: 13.6.4 (Ventura)

Additional context

Similar issue: webview/webview#1032

@drkameleon drkameleon added bug Something isn't working 3rd-party Issues related to 3rd-party libraries and code macos macOS-releated issues ui Issues related to the UI labels Sep 24, 2024
@drkameleon drkameleon self-assigned this Sep 24, 2024
@drkameleon drkameleon changed the title [Ui\webview] Console log not working properly on macOS [Ui\webview] Developer tools not working properly on macOS Sep 24, 2024
@drkameleon drkameleon changed the title [Ui\webview] Developer tools not working properly on macOS [Ui\webview] Inspector not working properly on macOS Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party Issues related to 3rd-party libraries and code bug Something isn't working macos macOS-releated issues ui Issues related to the UI
Projects
None yet
Development

No branches or pull requests

1 participant