Updating to 1.35.104 breaks all PWAs

Description of the issue:
On Mac. After updating to 1.35.104 all existing PWAs installed fail to open. The apps simply double bounce in the dock and stop. Removing the apps and installing again has no effect. Restarting, clearing cache, and all of the usual tricks have no effect.

Example apps: Twitter, Soundcloud, Spotify, Overseerr

Steps to Reproduce (add as many as necessary): 1. 2. 3.
Launch a PWA installed using Brave either from the icon in the browser address bar or the app icon itself.

Actual Result (gifs and screenshots are welcome!):
Home  Twitter (Brave Browser) 2022-02-24 at 16.38.13

CleanShot (CleanShot) 2022-02-24 at 16.40.06

Expected result:
PWAs open as normal

Reproduces how often:
Every time

Operating System and Brave Version(See the About Brave page in the main menu):
macOS Monterey 12.1
Brave V1.35.104

Additional Information:
It only happened after updating to the latest version

It seems like it may be related to this old issue: https://github.com/brave/brave-browser/issues/7205

2 Likes

Can confirm this is happening to me as well. M1 Macbook on newest stable release of Brave. Does not happen on Chrome.

If I run the command “/Applications/Brave Browser.app/Contents/MacOS/Brave Browser” --user-data-dir=test

To try and create a new user profile and move data to a new folder, as suggested in an old thread, I get some debugging logs.

This is the Terminal after I try to launch a PWA or a Windowed Shortcut

2022-02-24 12:41:00.601 Brave Browser[68264:3709698] AppShim: Connection received from pid 70021
2022-02-24 12:41:00.607 Brave Browser[68264:3698101] AppShim: Received OnShimConnected from pid 70021
[68264:259:0224/124100.607252:ERROR:app_shim_manager_mac.cc(708)] The attaching app shim's code signature is invalid.
2022-02-24 12:41:00.607 Brave Browser[68264:3698101] AppShim: Performing OnFailedToConnectToHost result 6 for pid 70021
2022-02-24 12:41:00.607 Brave Browser[68264:3698101] AppShim: Closing pid 70021
[68264:259:0224/124100.770338:ERROR:web_app_shortcut_mac.mm(143)] Application has already been terminated.
2022-02-24 12:41:01.275 Brave Browser[68264:3709404] AppShim: Connection received from pid 70025
2022-02-24 12:41:01.281 Brave Browser[68264:3698101] AppShim: Received OnShimConnected from pid 70025
[68264:259:0224/124101.281119:ERROR:app_shim_manager_mac.cc(708)] The attaching app shim's code signature is invalid.
2022-02-24 12:41:01.281 Brave Browser[68264:3698101] AppShim: Performing OnFailedToConnectToHost result 6 for pid 70025
2022-02-24 12:41:01.281 Brave Browser[68264:3698101] AppShim: Closing pid 70025
2022-02-24 12:41:03.935 Brave Browser[68264:3709698] AppShim: Connection received from pid 70041
2022-02-24 12:41:03.943 Brave Browser[68264:3698101] AppShim: Received OnShimConnected from pid 70041
[68264:259:0224/124103.959274:ERROR:app_shim_manager_mac.cc(708)] The attaching app shim's code signature is invalid.
2022-02-24 12:41:03.959 Brave Browser[68264:3698101] AppShim: Performing OnFailedToConnectToHost result 6 for pid 70041
2022-02-24 12:41:03.959 Brave Browser[68264:3698101] AppShim: Closing pid 70041
[68264:259:0224/124103.962018:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data for tabId: 13.  Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[68264:259:0224/124103.962356:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data for tabId: 13.  Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
2022-02-24 12:41:04.232 Brave Browser[68264:3709698] AppShim: Connection received from pid 70045
2022-02-24 12:41:04.238 Brave Browser[68264:3698101] AppShim: Received OnShimConnected from pid 70045
[68264:259:0224/124104.238702:ERROR:app_shim_manager_mac.cc(708)] The attaching app shim's code signature is invalid.
2022-02-24 12:41:04.238 Brave Browser[68264:3698101] AppShim: Performing OnFailedToConnectToHost result 6 for pid 70045
2022-02-24 12:41:04.238 Brave Browser[68264:3698101] AppShim: Closing pid 70045
[68264:259:0224/124104.322899:ERROR:web_app_shortcut_mac.mm(143)] Application has already been terminated.
2022-02-24 12:41:04.701 Brave Browser[68264:3709698] AppShim: Connection received from pid 70048
2022-02-24 12:41:04.707 Brave Browser[68264:3698101] AppShim: Received OnShimConnected from pid 70048
[68264:259:0224/124104.707494:ERROR:app_shim_manager_mac.cc(708)] The attaching app shim's code signature is invalid.
2022-02-24 12:41:04.707 Brave Browser[68264:3698101] AppShim: Performing OnFailedToConnectToHost result 6 for pid 70048
2022-02-24 12:41:04.707 Brave Browser[68264:3698101] AppShim: Closing pid 70048

This is from the Mac Console when opening the install dialog, installing, and trying to open the installed app:

error	17:45:39.637301+0000	kernel	Sandbox: mdworker_shared(7777) deny(1) file-read-data /Users/craigmdennis/Applications/Brave Browser Apps.localized/.localized ()
error	17:45:39.642031+0000	mdworker_shared	Error (non-fatal) enumerating <private>: Error Domain=NSCocoaErrorDomain Code=257 "The file “.localized” couldn’t be opened because you don’t have permission to view it." UserInfo={NSURL=file:///Users/craigmdennis/Applications/Brave%20Browser%20Apps.localized/.localized, NSFilePath=/Users/craigmdennis/Applications/Brave Browser Apps.localized/.localized, NSUnderlyingError=0x157724780 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
error	17:45:39.703677+0000	mdworker_shared	Error (non-fatal) enumerating <private>: Error Domain=NSCocoaErrorDomain Code=257 "The file “.localized” couldn’t be opened because you don’t have permission to view it." UserInfo={NSURL=file:///Users/craigmdennis/Applications/Brave%20Browser%20Apps.localized/.localized, NSFilePath=/Users/craigmdennis/Applications/Brave Browser Apps.localized/.localized, NSUnderlyingError=0x152e21820 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
error	17:45:40.179830+0000	tccd	failed to get text offset for /Users/craigmdennis/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader[7778]: (#3) No such process
error	17:45:40.687342+0000	kernel	1 duplicate report for Sandbox: mdworker_shared(7777) deny(1) file-read-data /Users/craigmdennis/Applications/Brave Browser Apps.localized/.localized ()
error	17:45:40.758764+0000	tccd	failed to get text offset for /Users/craigmdennis/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader[7783]: (#3) No such process
error	17:45:43.861502+0000	tccd	Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for accessing={<TCCDProcess: identifier=app_mode_loader, pid=7787, auid=501, euid=501, binary_path=/Users/craigmdennis/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader>}, requesting={<TCCDProcess: identifier=com.apple.appleeventsd, pid=505, auid=55, euid=55, binary_path=/System/Library/CoreServices/appleeventsd>},
error	17:45:43.994489+0000	runningboardd	RBSStateCapture remove item called for untracked item 396-375-4410 (target:[app<application.com.brave.Browser.app.jgeocpdicgmkeemopbanhokmhcgcflmi.8979265.8979274(501)>:7787])
error	17:45:43.994535+0000	runningboardd	RBSStateCapture remove item called for untracked item 396-346-4411 (target:[app<application.com.brave.Browser.app.jgeocpdicgmkeemopbanhokmhcgcflmi.8979265.8979274(501)>:7787])
error	17:45:43.994573+0000	runningboardd	RBSStateCapture remove item called for untracked item 396-346-4409 (target:[app<application.com.brave.Browser.app.jgeocpdicgmkeemopbanhokmhcgcflmi.8979265.8979274(501)>:7787])
error	17:45:44.003897+0000	kernel	Sandbox: gamed(2853) deny(1) file-read-data /Users/craigmdennis/Applications/Brave Browser Apps.localized/Twitter.app
error	17:45:44.286789+0000	tccd	failed to get text offset for /Users/craigmdennis/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader[7793]: (#3) No such process
error	17:45:44.288223+0000	runningboardd	RBSStateCapture remove item called for untracked item 396-346-4417 (target:[app<application.com.brave.Browser.app.jgeocpdicgmkeemopbanhokmhcgcflmi.8979265.8979274(501)>:7793])
error	17:45:44.288264+0000	runningboardd	RBSStateCapture remove item called for untracked item 396-568-4415 (target:app<application.com.brave.Browser.app.jgeocpdicgmkeemopbanhokmhcgcflmi.8979265.8979274(501)>)
error	17:45:46.067034+0000	tccd	failed to get text offset for /Users/craigmdennis/Applications/Brave Browser Apps.localized/Twitter.app/Contents/MacOS/app_mode_loader[7805]: (#3) No such process

I have also created a new issue: https://github.com/brave/brave-browser/issues/21302

2 Likes

Thank you all for the reports. If you have crashes in brave://crashes/ that could be submitted, it would be greatly appreciated. Once you click “send” next to a crash entry, restarting the browser will cause it to send even faster. Once sent, a new Upload ID will be generated; please share the IDs of 2 or 3 correlated crashes. We’ll investigate ASAP!

Hi @sampson

I’ve uploaded some of the crash reports, which gave me the following ID’s:

Uploaded crash report ID: b9e30000-4796-cc07-0000-000000000000
Upload time: Thursday, 24 February 2022 at 19:11:07
Uploaded crash report ID: e0e40000-4796-cc07-0000-000000000000
Upload time: Thursday, 24 February 2022 at 19:19:00

Nothing appears in brave://crashes for me when this happens. Not when installing. Not when launching.

I have completely removed Brave and installed fresh and the issue still happens.

Thank you for the Crash IDs, @dennise. I have shared those with the team, and expect to have some insights to share very soon.

2 Likes

Is anybody here able to check if this same behavior is observed with PWAs installed from Chrome? Confirmation either way would be much appreciated. cc @craigmdennis @dennise

Tried to create a shortcut with the option “Open as window” in Chrome and it works as expected - zero crashes. Not sure if this “extension window” is the same as a PWA.

1 Like

Thanks! Which version of Chrome did you test, @dennise?

@sampson Tested on Version 98.0.4758.109 (Official Build) (arm64)
If you need more information about the version (chrome://version) let me know.

1 Like

This is perfect, thank you. Could you also try installing a PWA to see if that also works without issue in Chrome? @craigmdennis shared a few in the initial post at the top.

@sampson thanks, I Installed Twitter for example. When opening, it shows the dock icon and instantly freezes. Trying to force quit doesn’t work and after a few minutes of trying to quit the app, it quits. <= this same behaviour is with extensions - not killing the process.

Even restarting the mac doesn’t work because of the frozen app.

Edit: I didn’t get any crash reports about PWA’s

@dennise, are you referring to Chrome here?

We’re making progress on our end; about to update https://github.com/brave/brave-browser/issues/21302 with some additional information. Thank you all again for your help in tracking down this buggy behavior.

2 Likes

@sampson no still Brave, in Chrome everything works (Extensions, PWA’s).

With PWA’s and Extensions I got exactly the same behaviour as in the screencast of @craigmdennis

1 Like

@sampson thanks for the quick support. Hope this issue is fixed soon.

1 Like

Just dropping this here — seems like the same issue/fix

I am able to run PWAs in Chrome 98.0.4758.109 but not in Brave 1.35.104. I have also submitted my logs in case that will help.