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

[Desktop] Crash while executing PWA #9006

Closed
abbasnaqdi opened this issue Apr 3, 2020 · 23 comments
Closed

[Desktop] Crash while executing PWA #9006

abbasnaqdi opened this issue Apr 3, 2020 · 23 comments
Labels
closed/duplicate Issue has already been reported crash feature/pwa OS/Desktop OS/macOS priority/P3 The next thing for us to work on. It'll ride the trains.

Comments

@abbasnaqdi
Copy link

abbasnaqdi commented Apr 3, 2020

OS : macOS 10.15.4
Version : 1.5.15 & 1.5.23

Unfortunately, Brave crashes when running PWA applications.
I was able to log in from app_mode_loader.

Note that this problem exists in all PWAs
Tested PWAs: YouTube music & twitter & clickup

NOTE: Unfortunately, the problem report is not received in brave: // crashes.

Please fix this bug

2020-04-03 13:05:16.096 app_mode_loader[4792:52753] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fa03de2f230'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff34322d07 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6d0475bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff343a1c97 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff3428757b ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff34286f58 _CF_forwarding_prep_0 + 120
	5   Brave Browser Framework             0x0000000117639da1 ChromeMain + 80787809
	6   AppKit                              0x00007fff315d1eba -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff31b8f7c9 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805 + 1674
	8   AppKit                              0x00007fff31b8b614 NSAccessibilityPerformEntryPointObject + 16
	9   AppKit                              0x00007fff3184f7d1 _NSAccessibilityEntryPointValueForAttribute + 168
	10  AppKit                              0x00007fff31990c53 -[NSObject(NSAccessibilityInternal) _accessibilityValueForAttribute:clientError:] + 351
	11  AppKit                              0x00007fff31995d6e CopyAppKitUIElementAttributeValueNoCatch + 98
	12  AppKit                              0x00007fff31992c52 CopyAttributeValue + 142
	13  HIServices                          0x00007fff325853f6 _AXXMIGCopyAttributeValue + 389
	14  HIServices                          0x00007fff325a64bb _XCopyAttributeValue + 443
	15  HIServices                          0x00007fff32565f64 mshMIGPerform + 174
	16  CoreFoundation                      0x00007fff342a74c4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
	17  CoreFoundation                      0x00007fff342a7410 __CFRunLoopDoSource1 + 541
	18  CoreFoundation                      0x00007fff342a5f39 __CFRunLoopRun + 2270
	19  CoreFoundation                      0x00007fff342a4ffe CFRunLoopRunSpecific + 462
	20  HIToolbox                           0x00007fff32ed8abd RunCurrentEventLoopInMode + 292
	21  HIToolbox                           0x00007fff32ed87d5 ReceiveNextEventCommon + 584
	22  HIToolbox                           0x00007fff32ed8579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	23  AppKit                              0x00007fff31523c99 _DPSNextEvent + 883
	24  AppKit                              0x00007fff315224e0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	25  AppKit                              0x00007fff315141ee -[NSApplication run] + 658
	26  Brave Browser Framework             0x000000011598598c ChromeMain + 50689356
	27  Brave Browser Framework             0x00000001159843f2 ChromeMain + 50683826
	28  Brave Browser Framework             0x0000000115930637 ChromeMain + 50340343
	29  Brave Browser Framework             0x0000000115907427 ChromeMain + 50171879
	30  Brave Browser Framework             0x000000011292e086 ChromeAppModeStart_v6 + 2182
	31  app_mode_loader                     0x000000010ff1b84b main + 2443
	32  app_mode_loader                     0x000000010ff1aedb main + 27
	33  libdyld.dylib                       0x00007fff6e1eecc9 start + 1
	34  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[0403/130516.114433:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffedfce6000, 0x2000): (os/kern) invalid address (1)
[0403/130516.270392:WARNING:system_snapshot_mac.cc(42)] sysctlbyname kern.nx: No such file or directory (2)
[1]    4792 abort    
@abbasnaqdi abbasnaqdi changed the title Crash while executing pwa Crash while executing PWA Apr 3, 2020
@abbasnaqdi
Copy link
Author

This problem has existed for a long time and the brave team does not pay any attention to this issue!

This is a ‍very, very important and immediate bug.
Please check and fix.

@bsclifton
Copy link
Member

+1 from @bong0 via #9270

When moving a PWA off the screen it was opened on, it disappears.
It disappears as well when moving the window /at all/ or clicking into the window.
(some websites support starting a website in native-looking standalone window)

@rjenkinsjr
Copy link

+1 from @bong0 via #9270

When moving a PWA off the screen it was opened on, it disappears.
It disappears as well when moving the window /at all/ or clicking into the window.
(some websites support starting a website in native-looking standalone window)

Seeing this same behavior with Google Keep and Gmail, except that I am able to click inside the window and do things, including opening links in a new tab.

Not sure if this helps, but I use Moom and I can use its window controls to resize/move the window without it crashing, but as mentioned above, normal dragging results in a crash.

brave://crashes does not seem to capture any crash info, as @oky2abbas also reported.

Brave | 1.7.98 Chromium: 81.0.4044.113 (Official Build) (64-bit)
-- | --
Revision | e3225dafb0475864a1812a374d73a92e391635ac-refs/branch-heads/4044@{#936}
OS | macOS Version 10.15.2 (Build 19C57)
JavaScript | V8 8.1.307.28
Flash | (Disabled)
User Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 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 --sync-url=https://no-thanks.invalid --enable-features=PasswordImport,MixedContentSiteSetting,SimplifyHttpsIndicator,AutoupgradeMixedContent,PassiveMixedContentWarning,WebUIDarkMode,DnsOverHttps --disable-features=AutofillServerCommunication,AllowPopupsDuringPageUnload,LookalikeUrlNavigationSuggestionsUI,VideoPlaybackQuality,TextFragmentAnchor,SmsReceiver,AudioServiceOutOfProcess,NotificationTriggers --flag-switches-begin --flag-switches-end --enable-audio-service-sandbox --disable-webrtc-apm-in-audio-service --disable-sync
Executable Path | /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

@rebron
Copy link
Collaborator

rebron commented May 22, 2020

@oky2abbas Is this still an issue for you on 1.9.72 our current release version from yesterday?

@rjenkinsjr
Copy link

@rebron I just tried 1.9.72 on my Mac and saw no improvement from my previous comment.

@simonhong
Copy link
Member

@rjenkinsjr Sorry for inconvenience.
I tried to reproduce this on my macOS with stable 1.9.72 release with below step.

  1. Delete installed app if existed in Applications/Brave Browser Apps/Twitter
  2. Load Twitter and installs by clicking + in address bar
  3. Twitter PWA launched properly and can't see any crash while using it (ex, window moving)

Can you delete and try again? thanks a lot.

@rmtsrc
Copy link

rmtsrc commented May 23, 2020

Installing and opening a PWA (like Twitter) is still crashing for me on Brave Version 1.9.72 Chromium: 81.0.4044.138 (Official Build) (64-bit):

brave-pwa mov

Logs when launching Brave and then double clicking the Twitter PWA app in my Brave Browser Apps folder:

~ /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser
[52396:775:0523/101113.027443:ERROR:browser_switcher_service.cc(238)] XXX Init()
[52396:86019:0523/101113.540506:ERROR:rewards_service_impl.cc(193)] Failed to read file: /Users/seb/Library/Application Support/BraveSoftware/Brave-Browser/Profile 3/ledger_state
[52405:775:0523/101113.541141:ERROR:ledger_impl.cc(113)] Failed to initialize wallet
[52396:775:0523/101139.971055:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[52396:775:0523/101139.971152:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[52396:775:0523/101140.179775:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot access contents of url "chrome://newtab/". Extension manifest must request permission to access this host.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
2020-05-23 10:11:40.376 Brave Browser[52396:2073247] AppShim: Connection received from pid 52424
2020-05-23 10:11:40.385 Brave Browser[52396:2072963] AppShim: Received OnShimConnected from pid 52424
2020-05-23 10:11:40.417 Brave Browser[52396:2072963] AppShim: Performing OnConnectedToHost for pid 52424
[52396:775:0523/101140.885065:ERROR:app_shim_host_mac.cc(53)] Channel error custom_reason:0 description:
2020-05-23 10:11:40.893 Brave Browser[52396:2072963] AppShim: Closing pid 52424

----- Logs when double clicking the Twitter PWA app in my Brave Browser Apps folder ----- 

2020-05-23 10:11:55.593 Brave Browser[52396:2073813] AppShim: Connection received from pid 52433
2020-05-23 10:11:55.603 Brave Browser[52396:2072963] AppShim: Received OnShimConnected from pid 52433
2020-05-23 10:11:55.653 Brave Browser[52396:2072963] AppShim: Performing OnConnectedToHost for pid 52433
[52396:775:0523/101155.665925:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[52396:775:0523/101155.666061:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[52396:775:0523/101155.667276:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[52396:775:0523/101155.939697:ERROR:app_shim_host_mac.cc(53)] Channel error custom_reason:0 description:
2020-05-23 10:11:55.949 Brave Browser[52396:2072963] AppShim: Closing pid 52433
[52396:775:0523/101155.968302:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: No tab with id: 10.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[52396:775:0523/101155.969582:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[52396:775:0523/101155.969655:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: No tab with id: 10.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[52396:775:0523/101155.969710:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: No tab with id: 10.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[52396:775:0523/101155.969773:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: No tab with id: 10.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[52396:775:0523/101155.969818:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: No tab with id: 10.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)

May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class BaseView is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064898) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc038). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class CommandDispatcher is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x1020648e8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc088). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ConstrainedWindowAnimationBase is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064938) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc0d8). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ConstrainedWindowAnimationShow is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x1020649b0) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc150). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ConstrainedWindowAnimationHide is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064a00) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc1a0). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ConstrainedWindowAnimationPulse is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064a50) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc1f0). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ButtonUtils is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064aa0) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc240). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class TextFieldUtils is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064af0) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc290). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class FindPasteboard is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064b18) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc2b8). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class FlippedView is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064b90) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc330). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class FocusTracker is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064bb8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc358). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class WeakPtrToMenuModelAsNSObject is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064c08) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc3a8). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class MenuControllerCocoa is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064c58) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc3f8). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ResponsiveNSMenuItem is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064c80) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc420). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class ToolTipBaseView is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064cf8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc498). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class CrTrackingAreaOwnerProxy is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064d48) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc4e8). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class CrTrackingArea is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064d98) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc538). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class UnderlayOpenGLHostingWindow is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064de8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc588). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class WeakPtrNSObject is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064e60) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc600). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class CrPasteboardItemWrapper is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064e88) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc628). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class NowPlayingInfoCenterDelegateCocoa is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064ed8) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc678). One of the two will be used. Which one is undefined.
May 23 10:31:20 app_mode_loader[53160]: objc[53160]: Class RemoteCommandCenterDelegateCocoa is implemented in both /Users/seb/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader (0x102064f28) and /Applications/Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions/81.1.9.72/Brave Browser Framework (0x10f6dc6c8). One of the two will be used. Which one is undefined.
May 23 10:31:20 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000001c.app_mode_loader[53160]): Service exited due to SIGABRT

@cocoonkid
Copy link

Same here. I tried following PWA's

Carbon (The github login does not work in a normal tab BUT does work in chrome, might be related)
Crossnote
DevDocs
Twitter
web.dev
webwide

MacOS 10.15.4
Version 1.9.72 Chromium: 81.0.4044.138 (Official Build) (64-bit)

@dustinlocke
Copy link

I have this issue as well. Originally reported here:
https://community.brave.com/t/pwas-crash-immediately/102169

I have since tried re-installing Brave, deleting all PWAs, turning off all extensions, and using a different profile. No dice.

@bsclifton bsclifton added the priority/P3 The next thing for us to work on. It'll ride the trains. label May 29, 2020
@andyjw7
Copy link

andyjw7 commented Jun 6, 2020

I have been experiencing the same issue and quite by chance I have discovered that it only happens when I have a productivity app called Window Tidy running. This is an app I've used for years to organise and resize apps on my desktop. I have never had an issue with it in the past, and I use it all the time - in fact I couldn't live without it.

I doubt all the other users reporting this issue are using the same app, but maybe there is a common theme of apps that manage desktop layout, or something like that?

Window Tidy is still available in the App Store should anyone want to install for debugging purposes. It has actually been superseded by another app by the same developers so I may try the free trial of that and report back on my findings.

@rmtsrc
Copy link

rmtsrc commented Jun 8, 2020

I had the same issue, but with a window management tool called Slate. Quitting Slate and launching a PWA app worked correctly. Interestingly, this issue doesn't appear to affect Chrome.

I've since switched to Hammerspoon migrating my window management shortcuts and PWAs now work correctly in Brave.

@rjenkinsjr
Copy link

I think @andyjw7 and @sebflipper are onto something. Based on their findings, I narrowed my issue down to the the window snapping feature of BetterTouchTool - when I disable this feature, the problem goes away.

I also use Moom which has a similar feature. I just tried it and it seems to work fine with PWAs, which is an acceptable solution for me.

@ThatsJustCheesy
Copy link

I use both BetterSnapTool, which I assume is a stripped-down BetterTouchTool, and AltTab, which is open-source.

BetterSnapTool makes PWAs crash when I move their windows around; AltTab makes them crash immediately on startup. Quitting both apps resolves all issues. Seems like some disagreement with the accessibility APIs…

@dustinlocke
Copy link

After reading these comments, I resolved the issue by disabling a bunch of plugins that had accessibility permissions. I've since enabled all of them again and can still run my PWA's. So there's that...

@ThatsJustCheesy
Copy link

FWIW I've also experienced consistent crashes of the main Brave app immediately upon enabling the on-screen accessiblity keyboard. Dunno if it's related at all.

@palashkaria
Copy link

@sebflipper @ThatsJustCheesy @rjenkinsjr thank a lot, this helped me narrow down the problem. I use amethyst as a window manager, & on disabling that, the brave PWA stopped crashing. BetterTouchTool snapping also causes the issue - but on moving it around. Maybe I should look at hammerspoon after all

@lukebrb
Copy link

lukebrb commented Aug 10, 2020

It's not the WM's fault, though? Chrome PWAs don't crash when I use amethyst, and neither do Edge's.

@palashkaria
Copy link

@lukebrb Edge PWAs crash on using yabai though

There's something about PWAs and window managers not working together. According to yabai dev, this could be a chromium issue koekeishiya/yabai#204

@ofilipowicz
Copy link

Same issue for me and Amethyst. Disabling it fixes PWAs.

@TrevorSayre
Copy link

TrevorSayre commented Aug 24, 2020

OS: macOS 10.15.6 (19G73)
Brave: Version 1.12.114 Chromium: 84.0.4147.135 (Official Build) (64-bit)

I have no special window managers other than Moom. I quit Moom and am still getting PWAs that immediately close after opening. If I launch the PWA and activate a different application, e.g. tab out, the PWA stays open. But as soon as I activate the PWA window, it crashes.

It does seem like it might be related to:

attempted to call TCCAccessRequest without the com.apple.private.tcc.manager.check-by-audit-token entitlement

and

[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector

Here are crash logs when I try to use the messges.google.com PWA:

Crash Report

error	14:47:19.627089-0400	tccd	{ID: app_mode_loader, PID[15299], auid: 501, euid: 501, binary path: '/Users/<user>/Applications/Brave Browser Apps.localized/Messages.app/Contents/MacOS/app_mode_loader'} attempted to call TCCAccessRequest without the com.apple.private.tcc.manager.check-by-audit-token entitlement
error	14:47:19.645870-0400	app_mode_loader	An uncaught exception was raised
error	14:47:19.645898-0400	app_mode_loader	-[NSAccessibilityRemoteUIElement accessibilityTitle]: unrecognized selector sent to instance 0x7fe40da24af0
error	14:47:19.646224-0400	app_mode_loader	(
	0   CoreFoundation                      0x00007fff30ba2b57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff698505bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff30c21be7 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff30b073bb ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff30b06d98 _CF_forwarding_prep_0 + 120
	5   Brave Browser Framework             0x00000001093b2011 ChromeMain + 84192545
	6   AppKit                              0x00007fff2de4525a -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:] + 58
	7   AppKit                              0x00007fff2e402c29 ___NSAccessibilityEntryPointValueForAttribute_block_invoke.805 + 1674
	8   AppKit                              0x00007fff2e3fea74 NSAccessibilityPerformEntryPointObject + 16
	9   AppKit                              0x00007fff2e0c2c01 _NSAccessibilityEntryPointValueForAttribute + 168
	10  AppKit                              0x00007fff2e2040b3 -[NSObject(NSAccessibilityInternal) _accessibilityValueForAttribute:clientError:] + 351
	11  AppKit                              0x00007fff2e2091ce CopyAppKitUIElementAttributeValueNoCatch + 98
	12  AppKit                              0x00007fff2e2060b2 CopyAttributeValue + 142
	13  HIServices                          0x00007fff2edf93f6 _AXXMIGCopyAttributeValue + 389
	14  HIServices                          0x00007fff2ee1a4cb _XCopyAttributeValue + 443
	15  HIServices                          0x00007fff2edd9f64 mshMIGPerform + 174
	16  CoreFoundation                      0x00007fff30b27304 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
	17  CoreFoundation                      0x00007fff30b27250 __CFRunLoopDoSource1 + 541
	18  CoreFoundation                      0x00007fff30b25d79 __CFRunLoopRun + 2270
	19  CoreFoundation                      0x00007fff30b24e3e CFRunLoopRunSpecific + 462
	20  HIToolbox                           0x00007fff2f751abd RunCurrentEventLoopInMode + 292
	21  HIToolbox                           0x00007fff2f7517d5 ReceiveNextEventCommon + 584
	22  HIToolbox                           0x00007fff2f751579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	23  AppKit                              0x00007fff2dd97039 _DPSNextEvent + 883
	24  AppKit                              0x00007fff2dd95880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	25  AppKit                              0x00007fff2dd8758e -[NSApplication run] + 658
	26  Brave Browser Framework             0x0000000107824d8c ChromeMain + 55302812
	27  Brave Browser Framework             0x00000001078237f2 ChromeMain + 55297282
	28  Brave Browser Framework             0x00000001077ca9f3 ChromeMain + 54933251
	29  Brave Browser Framework             0x00000001077a0ba3 ChromeMain + 54761651
	30  Brave Browser Framework             0x0000000104366f78 ChromeAppModeStart_v6 + 2296
	31  app_mode_loader                     0x00000001000e73b8 main + 2872
	32  app_mode_loader                     0x00000001000e689b main + 27
	33  libdyld.dylib                       0x00007fff6a9f8cc9 start + 1
)
error	14:47:19.764520-0400	ContextStoreAgent	Unhandled notification: <private>

@TrevorSayre
Copy link

Please also see the discussion in this bug report for BetterSnapTool:
https://community.folivora.ai/t/bettersnaptool-and-bettertouchtool-cause-brave-web-browser-apps-to-crash/12299

unfortunately that’s a bug in Brave Browser where it doesn’t seem to implement a specific functionality of the standard macOS accessibility API (or is forwarding the request to some wrong object) . This can’t be fixed in BetterSnapTool 😦

The specific selector that should be available, but unfortunately isn’t is „accessibilityTitle“

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).

While it may be people in this thread discussing issues with window managers, this hints at a greater accessibility issue which could be affecting users with other assistive technology when trying to use Brave with PWAs. That would make this rather a serious issue.

Chromium seems to be handling this fine:
https://github.com/chromium/chromium/search?q=accessibilityTitle&unscoped_q=accessibilityTitle

@srirambv srirambv changed the title Crash while executing PWA [Desktop] Crash while executing PWA Sep 9, 2020
@KeithGillette
Copy link

I experienced the same crash while dragging a Brave PWA window when running BetterTouchTool for window snapping. Interestingly, Brave seems to work fine with window snapping when using Parallels Toolbox new Window Manager tool.

@bsclifton
Copy link
Member

Closing as duplicate of #7205

@bsclifton bsclifton added the closed/duplicate Issue has already been reported label Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/duplicate Issue has already been reported crash feature/pwa OS/Desktop OS/macOS priority/P3 The next thing for us to work on. It'll ride the trains.
Projects
None yet
Development

No branches or pull requests