brave-browser: Shortcuts / apps on macOS throws exception 'NSInvalidArgumentException' instantly

Description

When creating an ‘app’ on macOS 10.15.1 it immediately throws the following error:

2019-12-04 17:30:20.202 app_mode_loader[32295:1717699] -[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fe76de4e7d0
2019-12-04 17:30:20.204 app_mode_loader[32295:1717699] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fe76de4e7d0'

Steps to Reproduce

  1. Go to fastmail.com (or another site like community.brave.com)
  2. Select More Tools > Create Shortcut and create the shortcut with ‘Open as window’ selected
  3. Launch the shortcut

Actual result:

Briefly shows website in separate window, crashes right after. Shows the error above. Full error when launching app_mode_loader separately:

objc[32404]: Class BaseView is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083a98) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472cf8). One of the two will be used. Which one is undefined.
objc[32404]: Class CommandDispatcher is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083ae8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472d48). One of the two will be used. Which one is undefined.
objc[32404]: Class ConstrainedWindowAnimationBase is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083b38) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472d98). One of the two will be used. Which one is undefined.
objc[32404]: Class ConstrainedWindowAnimationShow is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083bb0) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472e10). One of the two will be used. Which one is undefined.
objc[32404]: Class ConstrainedWindowAnimationHide is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083c00) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472e60). One of the two will be used. Which one is undefined.
objc[32404]: Class ConstrainedWindowAnimationPulse is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083c50) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472eb0). One of the two will be used. Which one is undefined.
objc[32404]: Class ButtonUtils is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083ca0) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472f00). One of the two will be used. Which one is undefined.
objc[32404]: Class TextFieldUtils is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083cf0) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472f50). One of the two will be used. Which one is undefined.
objc[32404]: Class FindPasteboard is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083d18) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472f78). One of the two will be used. Which one is undefined.
objc[32404]: Class FlippedView is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083d90) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c472ff0). One of the two will be used. Which one is undefined.
objc[32404]: Class FocusTracker is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083db8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473018). One of the two will be used. Which one is undefined.
objc[32404]: Class MenuControllerCocoa is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083e08) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473068). One of the two will be used. Which one is undefined.
objc[32404]: Class ResponsiveNSMenuItem is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083e30) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473090). One of the two will be used. Which one is undefined.
objc[32404]: Class ToolTipBaseView is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083ea8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473108). One of the two will be used. Which one is undefined.
objc[32404]: Class CrTrackingAreaOwnerProxy is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083ef8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473158). One of the two will be used. Which one is undefined.
objc[32404]: Class CrTrackingArea is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083f48) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c4731a8). One of the two will be used. Which one is undefined.
objc[32404]: Class UnderlayOpenGLHostingWindow is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c083f98) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c4731f8). One of the two will be used. Which one is undefined.
objc[32404]: Class WeakPtrNSObject is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c084010) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473270). One of the two will be used. Which one is undefined.
objc[32404]: Class CrPasteboardItemWrapper is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c084038) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473298). One of the two will be used. Which one is undefined.
objc[32404]: Class NowPlayingInfoCenterDelegateCocoa is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c084088) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c4732e8). One of the two will be used. Which one is undefined.
objc[32404]: Class RemoteCommandCenterDelegateNS is implemented in both /Users/mdbraber/Applications/Brave Browser Apps.localized/Fastmail.app/Fastmail.app/Contents/MacOS/./app_mode_loader (0x10c0840d8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/78.1.0.1/Brave Browser Framework (0x11c473338). One of the two will be used. Which one is undefined.
2019-12-04 17:37:53.041 app_mode_loader[32404:1724145] -[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fedc9825aa0
2019-12-04 17:37:53.043 app_mode_loader[32404:1724145] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fedc9825aa0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2fdd2f53 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff65e98835 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff2fe5d106 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff2fd796cb ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff2fd790a8 _CF_forwarding_prep_0 + 120
	5   Brave Browser Framework             0x000000011842c9b1 ChromeMain + 78342513
	6   AppKit                              0x00007fff2cff58e2 -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff2d57ef02 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805.llvm.7288867694539378565 + 1674
	8   AppKit                              0x00007fff2d57ac29 NSAccessibilityPerformEntryPointObject.llvm.7288867694539378565 + 16
	9   AppKit                              0x00007fff2d57ad6a _NSAccessibilityEntryPointValueForAttribute.llvm.7288867694539378565 + 168
	10  AppKit                              0x00007fff2d36c59a -[NSObject(NSAccessibilityInternal) _accessibilityValueForAttribute:clientError:] + 351
	11  AppKit                              0x00007fff2d371736 CopyAppKitUIElementAttributeValueNoCatch + 98
	12  AppKit                              0x00007fff2d36e619 CopyAttributeValue + 142
	13  HIServices                          0x00007fff2dfb0b9d _AXXMIGCopyAttributeValue + 389
	14  HIServices                          0x00007fff2dfd252b _XCopyAttributeValue + 443
	15  HIServices                          0x00007fff2df90553 mshMIGPerform + 205
	16  CoreFoundation                      0x00007fff2fd39d9f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
	17  CoreFoundation                      0x00007fff2fd39cef __CFRunLoopDoSource1 + 541
	18  CoreFoundation                      0x00007fff2fd21c9c __CFRunLoopRun + 2612
	19  CoreFoundation                      0x00007fff2fd20fe3 CFRunLoopRunSpecific + 499
	20  HIToolbox                           0x00007fff2e8a867d RunCurrentEventLoopInMode + 292
	21  HIToolbox                           0x00007fff2e8a83bd ReceiveNextEventCommon + 600
	22  HIToolbox                           0x00007fff2e8a8147 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	23  AppKit                              0x00007fff2cf2d864 _DPSNextEvent + 990
	24  AppKit                              0x00007fff2cf2c5d4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	25  AppKit                              0x00007fff2cf26d76 -[NSApplication run] + 658
	26  Brave Browser Framework             0x000000011687e5bc ChromeMain + 49317244
	27  Brave Browser Framework             0x000000011687d0e8 ChromeMain + 49311912
	28  Brave Browser Framework             0x00000001168cf408 ChromeMain + 49648584
	29  Brave Browser Framework             0x00000001168a3137 ChromeMain + 49467639
	30  Brave Browser Framework             0x0000000113975cae ChromeAppModeStart_v6 + 2094
	31  app_mode_loader                     0x000000010bb9d8d1 main + 2449
	32  app_mode_loader                     0x000000010bb9cf5b main + 27
	33  libdyld.dylib                       0x00007fff671fb2e5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1204/173753.182120:WARNING:system_snapshot_mac.cc(42)] sysctlbyname kern.nx: No such file or directory (2)

Expected result:

Display a separate window with the specific website and not crash 😉

Reproduces how often:

Always reproducible

Brave version (brave://version info)

Brave 1.0.1 Chromium: 78.0.3904.108 (Official Build) (64-bit)
Revision 4b26898a39ee037623a72fcfb77279fce0e7d648-refs/branch-heads/3904@{#889}
OS macOS Version 10.15.1 (Build 19B88)
JavaScript V8 7.8.279.23
Flash (Disabled)
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Command Line /Applications/Brave Browser.app/Contents/MacOS/Brave Browser --enable-dom-distiller --disable-domain-reliability --no-pings --extension-content-verification=enforce_strict --extensions-install-verification=enforce --enable-oop-rasterization=Enabled --sync-url=https://no-thanks.invalid --enable-features=NewExtensionUpdaterService,PasswordImport,WebUIDarkMode,SimplifyHttpsIndicator --disable-features=SmsReceiver,AudioServiceOutOfProcess,NotificationTriggers,AutofillServerCommunication,LookalikeUrlNavigationSuggestionsUI,UnifiedConsent,SyncUSSBookmarks --flag-switches-begin --flag-switches-end
Executable Path /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
Profile Path /Users/mdbraber/Library/Application Support/BraveSoftware/Brave-Browser/Default

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes

  • Can you reproduce this issue with the beta channel? Yes

  • Can you reproduce this issue with the dev channel? Did not try

  • Can you reproduce this issue with the nightly channel? Did not try

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No

  • Does the issue resolve itself when disabling Brave Rewards? No

  • Is the issue reproducible on the latest version of Chrome? No - tried latest version of Chromium (Version 77.0.3865.90 (Official Build) (64-bit)) and this works fine

Similar reports

This issue has already been reported in the community forums thrice by others:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 10
  • Comments: 53 (8 by maintainers)

Most upvoted comments

@rebron @bsclifton I’m working on this

I’m looking in to this, it’s been affecting me this whole time

Probably @bsclifton, @petemill or @Brave-Matt could bump the priority on this

After some digging I’ve found that BetterSnapTool (https://folivora.ai/bettersnaptool) seems to be causing the problems. I’ll try and see if I can find what exactly is causing this and why it’s actually causing Brave to crash (and not BetterSnapTool)

Hi folks - this may be fixed with Chromium 92 which will be in product version 1.27 which we’re aiming to release soon.

When this new version pops up, please let us know if the issue is resolved 😄 If you’re using Beta or Nightly, you should already have the update

Still happening for me on the latest prod build.

Same problem with Timing app. This is a big deal. Please prioritize this.

Just to notice, also happening with Cinch.

It works with Tiles tho, in case you wanna check it out, and it’s free.

@ctwhome FYI, if Cinch is the only app you use that causes Brave PWAs to crash, you might want to consider an alternative window manager like Rectangle (I have zero affiliation with Rectangle btw). As far as I know, Rectangle doesn’t cause Brave PWAs to crash unlike the other window managers like BetterSnapTool etc.

So excited! Once this ticket is approved I can finally delete chrome!

Can confirm my issue related to better touch tool functionality seems to be resolved as well!

I have created a new issue: #21302

@phao5814 I use Rectangle, and it doesn’t work for me if “Open as window” option is checked.

Hmmm strange. I have a feeling you might have another app / extension you use that is interfering with Brave. For me, AltTab is the thing that interferes. I just tried quitting AltTab and leaving Rectangle open and my Brave browser apps which “Open as window” opened with no issues.

Btw my version of Rectangle is Version 0.44 (49).

Try disabling some other apps that require MacOS Accessibility permissions to find the culprit.

Yea, I think it might be with apps that require accessibility permissions. Started happening for me with a few other apps. Unfortunately, as much as loved this app, I was forced to switch back to Chrome w/Adblock because of this issue (plus some more rare slowdowns/crashes)

Assuming priority/P4 label means this won’t be done any time soon?

@craigmdennis that’s the way to go 👍🏻. Now it gets the attention is needs.

@craigmdennis Please make a new issue, the error is way too generic, it probably has a different stack trace.

I can confirm this issue has been resolved for me in version 1.27.

@ron-wolf It’s still happening for me with the latest production build 😅

Any updates on this?

Reproduced easily:

  1. install BetterTouchTool and grant it a accessibility permission in Privacy section
  2. install starbucks PWA
  3. Launch PWA and try moving the window

+1 - I do not use BetterSnap or BetterTouch, however seeing the same problem. Apps work fine with Chrome, but crashes on Brave.

Thanks for looking into this @petemill !

@mdbraber @melMass @digitalmaster can you all please try the Nightly build of Brave? https://brave.com/download-nightly/

Try to create a shortcut and see if you run into the same problem. There’s a good chance (with Chromium 83, which is on master and will be on Beta soon) it will be fixed

If that does fix it, we have a release coming next week 😄

@Brave-Matt great if you could get some developer eyes on this!

@bsclifton no, I don’t use the digital keyboard, but BetterSnapTool does use many of the accessibility features, so I could be calling the same methods which make Brave crash

Did some more digging and it seems this is a bug in Brave, rather than BetterSnapTool. The accessibilityTitle property called should exist. I’m not sure what patches Brave uses that change this, because it does exist in the original Chrome source code (and e.g. Chromium doesn’t crash from the same problem): https://github.com/chromium/chromium/search?q=accessibilityTitle&unscoped_q=accessibilityTitle

I’ve asked the BetterSnapTool developer about his knowledge about this particular type of crash: “Maybe Brave uses a different kind of custom window for more customisability or something like that. In that case they should either disable Accessibility support completely for that window or implement all the required methods (or at least add stubs so it won’t crash when macOS calls them).” (https://community.folivora.ai/t/bettersnaptool-and-bettertouchtool-cause-brave-web-browser-apps-to-crash/12299/5)

@bsclifton would you be able to elaborate? Also, it seems this should be tagged as a bug rather than a feature?