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

NSWindow warning: adding an unknown subview #273

Closed
probablykasper opened this issue May 16, 2021 · 6 comments
Closed

NSWindow warning: adding an unknown subview #273

probablykasper opened this issue May 16, 2021 · 6 comments

Comments

@probablykasper
Copy link
Member

Describe the bug
Getting this error when opening devtools on macOS. The app doesn't crash. When resizing, the screen goes white.

To Reproduce
I only opened the devtools, not sure what else would contribute to this.

Platform and Versions (please complete the following information):

Operating System - Mac OS, version 10.15.7 X64

Node.js environment
  Node.js - 14.16.0
  @tauri-apps/cli - 1.0.0-beta.1 (outdated, latest: 1.0.0-beta.2)
  @tauri-apps/api - 1.0.0-beta.1

Global packages
  npm - 6.14.11
  yarn - 1.22.10

Rust environment
  rustc - 1.51.0
  cargo - 1.51.0

App directory structure
/node_modules
/src-tauri
/.svelte-kit
/.git
/src

App
  tauri.rs - 1.0.0-beta.1
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
distDir - ../.svelte-kit/build
devPath - http://localhost:5000
framework - Svelte
Error log
2021-05-17 00:11:04.272 kryp[88197:11572423] NSWindow warning: adding an unknown subview: <WKInspectorWKWebView: 0x7fcb44c630a0>. Break on NSLog to debug.
2021-05-17 00:11:04.284 kryp[88197:11572423] Call stack:
(
        0   AppKit                              0x00007fff2ad8092b -[NSThemeFrame addSubview:] + 112
        1   AppKit                              0x00007fff2ad80634 -[NSView addSubview:positioned:relativeTo:] + 203
        2   AppKit                              0x00007fff2ad804f0 -[NSThemeFrame addSubview:positioned:relativeTo:] + 46
        3   WebKit                              0x00007fff3ea06bb0 _ZN6WebKit17WebInspectorProxy14platformAttachEv + 384
        4   WebKit                              0x00007fff3ec8ff08 _ZN6WebKit17WebInspectorProxy4openEv + 96
        5   WebKit                              0x00007fff3eecd252 _ZN6WebKit17WebInspectorProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 1710
        6   WebKit                              0x00007fff3ea46684 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 114
        7   WebKit                              0x00007fff3ed0c232 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 28
        8   WebKit                              0x00007fff3ea3292b _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 209
        9   WebKit                              0x00007fff3ea3228f _ZN3IPC10Connection24dispatchIncomingMessagesEv + 475
        10  JavaScriptCore                      0x00007fff32278e67 _ZN3WTF7RunLoop11performWorkEv + 551
        11  JavaScriptCore                      0x00007fff3227901a _ZN3WTF7RunLoop11performWorkEPv + 26
        12  CoreFoundation                      0x00007fff2dae3d52 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        13  CoreFoundation                      0x00007fff2dae3cf1 __CFRunLoopDoSource0 + 103
        14  CoreFoundation                      0x00007fff2dae3b0b __CFRunLoopDoSources0 + 209
        15  CoreFoundation                      0x00007fff2dae283a __CFRunLoopRun + 927
        16  CoreFoundation                      0x00007fff2dae1e3e CFRunLoopRunSpecific + 462
        17  HIToolbox                           0x00007fff2c70eabd RunCurrentEventLoopInMode + 292
        18  HIToolbox                           0x00007fff2c70e7d5 ReceiveNextEventCommon + 584
        19  HIToolbox                           0x00007fff2c70e579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
        20  AppKit                              0x00007fff2ad54039 _DPSNextEvent + 883
        21  AppKit                              0x00007fff2ad52880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
        22  AppKit                              0x00007fff2ad4458e -[NSApplication run] + 658
        23  kryp                                0x0000000109d6bad6 _ZN60_$LT$$LP$$RP$$u20$as$u20$objc..message..MessageArguments$GT$6invoke17he084d8e06d774178E + 70
        24  kryp                                0x0000000109d6b182 _ZN4objc7message8platform15send_unverified17he439ee9a2539bc0fE + 98
        25  kryp                                0x0000000109c15a8f _ZN3tao13platform_impl8platform10event_loop18EventLoop$LT$T$GT$10run_return17h01ba5bbd45b27574E + 1343
        26  kryp                                0x0000000109c16ed7 _ZN3tao13platform_impl8platform10event_loop18EventLoop$LT$T$GT$3run17hb3076cad23dfce2fE + 39
        27  kryp                                0x0000000109c0851d _ZN3tao10event_loop18EventLoop$LT$T$GT$3run17hae9a247e7986d8bcE + 77
        28  kryp                                0x0000000109c054a4 _ZN65_$LT$tauri_runtime_wry..Wry$u20$as$u20$tauri_runtime..Runtime$GT$3run17h5ccd2fb1fad10f95E + 516
        29  kryp                                0x000000010996ed98 _ZN5tauri3app40Builder$LT$E$C$L$C$MID$C$TID$C$A$C$R$GT$3run17h1ecfc22e08538e46E + 3768
        30  kryp                                0x000000010992c2e6 _ZN4kryp4main17hce8b90b5a3415095E + 5462
        31  kryp                                0x00000001098516ee _ZN4core3ops8function6FnOnce9call_once17h7816060c351d45beE + 14
        32  kryp                                0x0000000109a7aa71 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h52ffcebe8f18c518E + 17
        33  kryp                                0x0000000109ace754 _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h44749543fd395c2dE + 20
        34  kryp                                0x000000010a95f3e4 _ZN3std2rt19lang_start_internal17h86f505dc7de50d93E + 644
        35  kryp                                0x0000000109ace731 _ZN3std2rt10lang_start17hecab4e2893e20ac0E + 65
        36  kryp                                0x000000010992c6f2 main + 34
        37  libdyld.dylib                       0x00007fff67b83cc9 start + 1
        38  ???                                 0x0000000000000001 0x0 + 1
@dibadibadiudiu
Copy link

I have the same problem

@nothingismagick
Copy link
Member

Thanks for the report. This is definitely not an issue in Tauri, but in WRY. Am transferring.

@nothingismagick nothingismagick transferred this issue from tauri-apps/tauri May 18, 2021
@wusyong
Copy link
Member

wusyong commented Jun 21, 2021

Duplicate issue of #297

@wusyong wusyong closed this as completed Jun 21, 2021
@probablykasper
Copy link
Member Author

@wusyong I think I'll reopen this because it seems separate. This warning happens the first time you open the devtools, while #297 happens only when you resize the window while the devtools are open.

@braebo
Copy link

braebo commented Mar 19, 2022

I have the same problem- with an additional crash reported in the logs after the warning:

Crash Log
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[15]'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007ff803259f0b __exceptionPreprocess + 242
        1   libobjc.A.dylib                     0x00007ff802fbab9d objc_exception_throw + 48
        2   CoreFoundation                      0x00007ff803315434 _CFThrowFormattedException + 202
        3   CoreFoundation                      0x00007ff80331fca1 -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0
        4   CoreFoundation                      0x00007ff803168f12 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251
        5   CoreFoundation                      0x00007ff803168dfd +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
        6   VisionKitCore                       0x00007ffb129bea31 -[VKAnalyticsAnalyzerEvent coreAnalyticsDictionary] + 1292
        7   VisionKitCore                       0x00007ffb12981fec -[VKAnalyticsProcessor processAndSendEvent:] + 96
        8   VisionKitCore                       0x00007ffb12978426 __69-[VKImageAnalyzer _processRequest:progressHandler:completionHandler:]_block_invoke_2 + 1254
        9   libdispatch.dylib                   0x00007ff802f5fad8 _dispatch_call_block_and_release + 12
        10  libdispatch.dylib                   0x00007ff802f60cc9 _dispatch_client_callout + 8
        11  libdispatch.dylib                   0x00007ff802f66cee _dispatch_lane_serial_drain + 696
        12  libdispatch.dylib                   0x00007ff802f677c8 _dispatch_lane_invoke + 366
        13  libdispatch.dylib                   0x00007ff802f717e1 _dispatch_workloop_worker_thread + 758
        14  libsystem_pthread.dylib             0x00007ff803114074 _pthread_wqthread + 326
        15  libsystem_pthread.dylib             0x00007ff803112ffb start_wqthread + 15
)
libc++abi: terminating with uncaught exception of type NSException

@alexandreLamarre
Copy link

Still hitting this on MacOS Monterey 12.4

spwilson2 pushed a commit to spwilson2/wry that referenced this issue Aug 6, 2022
Previously, we would just inject the webview into the contentView of the
NSWindow. When devtools would inject the subView into this top-level content
view, a warning would be displayed.
@wusyong wusyong closed this as completed in 2eba8c9 Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants