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

Brave "shortcuts" for PWA crash when used with Mac OS accessibility options #14003

Closed
rightisleft opened this issue Feb 5, 2021 · 5 comments
Closed
Labels

Comments

@rightisleft
Copy link

rightisleft commented Feb 5, 2021

Description

Using Mac OS accessibility tools such as "SizeUp" causes the Brave browser "apps" to crash when running in "installed mode"

Steps to Reproduce

  1. Download Brave for MAC OS X

  2. Install any PWA like code-Server through settings menu. This will create a Mac OS X shortcut that allows you to open it in an application mode. Example

  3. Install an application that uses OS X accessibility options like SizeUp

  4. Grant SizeUp accessibility permissions

  5. Try and move the window using sizeup, the app crashes

Actual result:

error	11:44:15.057616-0500	tccd	{ID: app_mode_loader, PID[3517], auid: 501, euid: 501, binary path: '/Users/jmurphy/Applications/Brave Browser Apps.localized/dev-jack.app/Contents/MacOS/app_mode_loader'} attempted to call TCCAccessRequest without the com.apple.private.tcc.manager.check-by-audit-token entitlement
default	11:44:15.112787-0500	app_mode_loader	-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7f9e798212f0
error	11:44:15.114088-0500	app_mode_loader	An uncaught exception was raised
error	11:44:15.114114-0500	app_mode_loader	-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7f9e798212f0
error	11:44:15.114392-0500	app_mode_loader	(
	0   CoreFoundation                      0x00007fff33276b57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6c0eb5bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff332f5be7 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff331db3bb ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff331dad98 _CF_forwarding_prep_0 + 120
	5   Brave Browser Framework             0x000000010c49d151 ChromeMain + 89526945
	6   AppKit                              0x00007fff3051925a -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff30ad6c29 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805 + 1674
	8   AppKit                              0x00007fff30ad2a74 NSAccessibilityPerformEntryPointObject + 16
	9   AppKit                              0x00007fff30796c01 _NSAccessibilityEntryPointValueForAttribute + 168
	10  AppKit                              0x00007fff308d80b3 -[NSObject(NSAccessibilityInternal) _accessibilityValueForAttribute:clientError:] + 351
	11  AppKit                              0x00007fff308dd1ce CopyAppKitUIElementAttributeValueNoCatch + 98
	12  AppKit                              0x00007fff308da0b2 CopyAttributeValue + 142
	13  HIServices                          0x00007fff314cd3f6 _AXXMIGCopyAttributeValue + 389
	14  HIServices                          0x00007fff314ee4cb _XCopyAttributeValue + 443
	15  HIServices                          0x00007fff314adf64 mshMIGPerform + 174
	16  CoreFoundation                      0x00007fff331fb304 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
	17  CoreFoundation                      0x00007fff331fb250 __CFRunLoopDoSource1 + 541
	18  CoreFoundation                      0x00007fff331f9d79 __CFRunLoopRun + 2270
	19  CoreFoundation                      0x00007fff331f8e3e CFRunLoopRunSpecific + 462
	20  HIToolbox                           0x00007fff31e25abd RunCurrentEventLoopInMode + 292
	21  HIToolbox                           0x00007fff31e257d5 ReceiveNextEventCommon + 584
	22  HIToolbox                           0x00007fff31e25579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	23  AppKit                              0x00007fff3046b039 _DPSNextEvent + 883
	24  AppKit                              0x00007fff30469880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	25  AppKit                              0x00007fff3045b58e -[NSApplication run] + 658
	26  Brave Browser Framework             0x000000010a76488c ChromeMain + 58886620
	27  Brave Browser Framework             0x000000010a763653 ChromeMain + 58881955
	28  Brave Browser Framework             0x000000010a71f3a7 ChromeMain + 58602743
	29  Brave Browser Framework             0x000000010a6f07cd ChromeMain + 58411293
	30  Brave Browser Framework             0x0000000106f3bb6f ChromeAppModeStart_v6 + 2543
	31  app_mode_loader                     0x0000000102c41bfd main + 3389
	32  app_mode_loader                     0x0000000102c40edb main + 27
	33  libdyld.dylib                       0x00007fff6d293cc9 start + 1
)
default	11:44:15.114521-0500	app_mode_loader	*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7f9e798212f0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff33276b57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6c0eb5bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff332f5be7 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff331db3bb ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff331dad98 _CF_forwarding_prep_0 + 120
	5   Brave Browser Framework             0x000000010c49d151 ChromeMain + 89526945
	6   AppKit                              0x00007fff3051925a -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff30ad6c29 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805 + 1674
	<…>
default	11:44:15.122405-0500	chrome_crashpad_handler	[0205/114415.122229:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffeecfc1000, 0x2000): (os/kern) invalid address (1)

Expected result:

Brave should not crash...

Reproduces how often:

100% of actions using the accessibiltiy options terminate the "App". This does not impact the primary browser.

Brave version (brave://version info)

Version 1.19.88 Chromium: 88.0.4324.96 (Official Build) (x86_64)

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the nightly channel?

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. In fact, im trying to ditch Chrome in favor of Brave. This is the final step for me to ditch chrome.

Miscellaneous Information:

Mac OS 10.15.6

@rightisleft
Copy link
Author

I tested a second PWA located at www.di.fm (Example) and was able to verify the same behavior with accessibility options.

Result: same error

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7f9e798212f0'
*** First throw call stack:

@rightisleft rightisleft changed the title Brave "App" shortcuts crash when used with Mac OS accessibility options Brave "shortcuts" for PWA crash when used with Mac OS accessibility options Feb 5, 2021
@rightisleft
Copy link
Author

rightisleft commented Feb 5, 2021

Possibly related, but with different log outputs:
#13802
#13837
#13778

@rightisleft
Copy link
Author

rightisleft commented Feb 5, 2021

Tested on Brave Nightly Version 1.22.2 Chromium: 88.0.4324.146 (Official Build) nightly (x86_64)

Still failing:

default	13:40:11.872077-0500	app_mode_loader	SetFrontProcess: asn=0x0-0xac0ac options=1
default	13:40:11.878434-0500	Brave Browser Nightly	_LSLaunch('<private>')
error	13:40:16.330595-0500	tccd	{ID: app_mode_loader, PID[6122], auid: 501, euid: 501, binary path: '/Users/jmurphy/Applications/Brave Browser Nightly Apps.localized/dev-jack.app/Contents/MacOS/app_mode_loader'} attempted to call TCCAccessRequest without the com.apple.private.tcc.manager.check-by-audit-token entitlement
default	13:40:16.387358-0500	app_mode_loader	-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fc9b3f271d0
error	13:40:16.388809-0500	app_mode_loader	An uncaught exception was raised
error	13:40:16.388839-0500	app_mode_loader	-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fc9b3f271d0
error	13:40:16.389175-0500	app_mode_loader	(
	0   CoreFoundation                      0x00007fff33276b57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6c0eb5bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff332f5be7 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff331db3bb ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff331dad98 _CF_forwarding_prep_0 + 120
	5   Brave Browser Nightly Framework     0x000000011c3b6e01 ChromeMain + 89707985
	6   AppKit                              0x00007fff3051925a -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff30ad6c29 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805 + 1674
	8   AppKit                              0x00007fff30ad2a74 NSAccessibilityPerformEntryPointObject + 16
	9   AppKit                              0x00007fff30796c01 _NSAccessibilityEntryPointValueForAttribute + 168
	10  AppKit                              0x00007fff308d80b3 -[NSObject(NSAccessibilityInternal) _accessibilityValueForAttribute:clientError:] + 351
	11  AppKit                              0x00007fff308dd1ce CopyAppKitUIElementAttributeValueNoCatch + 98
	12  AppKit                              0x00007fff308da0b2 CopyAttributeValue + 142
	13  HIServices                          0x00007fff314cd3f6 _AXXMIGCopyAttributeValue + 389
	14  HIServices                          0x00007fff314ee4cb _XCopyAttributeValue + 443
	15  HIServices                          0x00007fff314adf64 mshMIGPerform + 174
	16  CoreFoundation                      0x00007fff331fb304 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
	17  CoreFoundation                      0x00007fff331fb250 __CFRunLoopDoSource1 + 541
	18  CoreFoundation                      0x00007fff331f9d79 __CFRunLoopRun + 2270
	19  CoreFoundation                      0x00007fff331f8e3e CFRunLoopRunSpecific + 462
	20  HIToolbox                           0x00007fff31e25abd RunCurrentEventLoopInMode + 292
	21  HIToolbox                           0x00007fff31e257d5 ReceiveNextEventCommon + 584
	22  HIToolbox                           0x00007fff31e25579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	23  AppKit                              0x00007fff3046b039 _DPSNextEvent + 883
	24  AppKit                              0x00007fff30469880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	25  AppKit                              0x00007fff3045b58e -[NSApplication run] + 658
	26  Brave Browser Nightly Framework     0x000000011a67c98c ChromeMain + 59060572
	27  Brave Browser Nightly Framework     0x000000011a67b753 ChromeMain + 59055907
	28  Brave Browser Nightly Framework     0x000000011a6374a7 ChromeMain + 58776695
	29  Brave Browser Nightly Framework     0x000000011a6088cd ChromeMain + 58585245
	30  Brave Browser Nightly Framework     0x0000000116e294ef ChromeAppModeStart_v6 + 2543
	31  app_mode_loader                     0x000000010b640bbd main + 3389
	32  app_mode_loader                     0x000000010b63fe9b main + 27
	33  libdyld.dylib                       0x00007fff6d293cc9 start + 1
	34  ???                                 0x0000000000000001 0x0 + 1
)
default	13:40:16.389321-0500	app_mode_loader	*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fc9b3f271d0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff33276b57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6c0eb5bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff332f5be7 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff331db3bb ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff331dad98 _CF_forwarding_prep_0 + 120
	5   Brave Browser Nightly Framework     0x000000011c3b6e01 ChromeMain + 89707985
	6   AppKit                              0x00007fff3051925a -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff30ad6c29 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805 + 1674
	<…>
default	13:40:16.394692-0500	chrome_crashpad_handler	[0205/134016.394518:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffee45c2000, 0x2000): (os/kern) invalid address (1)
default	13:40:16.519850-0500	runningboardd	Acquiring assertion targeting executable<Brave Browser Nightly(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:178] with description <RBSAssertionDescriptor; frontmost:6078; ID: 317-178-576; target: 6078> attributes = {
    <RBSDomainAttribute: 0x7fecd0006860; domain: com.apple.launchservicesd; name: RoleUserInteractiveFocal; sourceEnvironment: 0x0>;
}
default	13:40:16.520159-0500	runningboardd	Assertion 317-178-576 (target:executable<Brave Browser Nightly(501)>) will be created as active
default	13:40:16.524435-0500	runningboardd	[executable<Brave Browser Nightly(501)>:6078] Ignoring jetsam update because this process is not memory-managed
default	13:40:16.526674-0500	runningboardd	[executable<Brave Browser Nightly(501)>:6078] Set darwin role to: UserInteractiveFocal
default	13:40:16.527116-0500	runningboardd	Finished acquiring assertion 317-178-576 (target:executable<Brave Browser Nightly(501)>)
default	13:40:16.527219-0500	runningboardd	[executable<Brave Browser Nightly(501)>:6078] Ignoring GPU update because this process is not GPU managed
default	13:40:16.537338-0500	Brave Browser Nightly	AppShim: Closing pid 6122

@rebron rebron added the crash label Feb 5, 2021
@rebron
Copy link
Collaborator

rebron commented Feb 5, 2021

cc: @iefremov another one related to macOS accessibility.

@rebron rebron added the OS/macOS label Feb 5, 2021
@iefremov
Copy link
Contributor

iefremov commented Feb 6, 2021

duplicate #7205

@iefremov iefremov closed this as completed Feb 6, 2021
@iefremov iefremov added the closed/duplicate Issue has already been reported label Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants