question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PWAs do not launch after upgrading to V1.35.104

See original GitHub issue

Test plan

  1. Fresh profile
  2. Visit https://twitter.com
  3. Go to hamburger menu; pick More tools > Create shortcut...
  4. When window pops up, check the box Open in new window

Added several other cases via https://github.com/brave/brave-core/pull/12418#issuecomment-1054989483.

Expected result

PWA should work; you can use it (sign into Twitter, etc).

Actual result

Twitter PWA will crash immediately

Description

Here is an associated community post: https://community.brave.com/t/updating-to-1-35-104-breaks-all-pwas/346680

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

_Originally posted by @craigmdennis in https://github.com/brave/brave-browser/issues/7205#issuecomment-1050105821_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:24
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
LaurenWagscommented, Mar 1, 2022

Verified with

Brave | 1.36.108 Chromium: 99.0.4844.51 (Official Build) (x86_64)
-- | --
Revision | d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}
OS | macOS Version 12.2.1 (Build 21D62)
Case 1 - confirming shortcut does not crash on launch - PASSED

Verified steps from https://github.com/brave/brave-browser/issues/21302#issuecomment-1050189531

  1. Visited site (brave.com)
  2. Open hamburger menu
  3. Select More Tools > Create Shortcut
  4. Select “Open as window” > Create
  5. Shortcut opens and does not crash
  6. Close shortcut window, leave browser open
  7. Open from created shortcut under /Users/username/Applications/Brave Browser Apps
  8. Shortcut opens and does not crash
  9. Close browser and shortcut window
  10. Open from created shortcut under /Users/username/Applications/Brave Browser Apps
  11. Browser and shortcut window open and do not crash
  12. Close browser
  13. Put shortcut in dock
  14. Open shortcut from dock
  15. Browser and shortcut open and do not crash
Case 2 - confirmed able to login to Twitter on shortcut - PASSED

Verified steps from https://github.com/brave/brave-browser/issues/21302#issue-1149576399

  1. Visited site (twitter.com)
  2. Open hamburger menu
  3. Select More Tools > Create Shortcut
  4. Select “Open as window” > Create
  5. Shortcut opens and does not crash
  6. Confirm able to login to twitter and navigate around
  7. Close shortcut window, leave browser open
  8. Open from created shortcut under /Users/username/Applications/Brave Browser Apps
  9. Shortcut opens and does not crash
  10. Confirm able to navigate around twitter in shortcut window
  11. Close browser and shortcut window
  12. Open from created shortcut under /Users/username/Applications/Brave Browser Apps
  13. Browser and shortcut window open and do not crash
  14. Confirm able to navigate around twitter in shortcut window
  15. Close browser
  16. Put shortcut in dock
  17. Open shortcut from dock
  18. Browser and shortcut open and do not crash
  19. Confirm able to navigate around twitter in shortcut window

Additional tests from https://github.com/brave/brave-core/pull/12418#issuecomment-1054989483:

Test Case 3 - uninstalling PWA - PASSED
  1. visit https://www.cnn.com
  2. create a PWA via Hamburger Menu -> More Tools -> Create Shortcut... (Open as window selected)
  3. ensured that CNN is launched in a separate window once the PWA is created
  4. ensured that you can uninstall the PWA via the Hamburger Menu (need to be within the PWA window)
Test Case 4 - "Open as window" not selected - PASSED w/ note
  1. visit https://www.cnn.com
  2. create a PWA via Hamburger Menu -> More Tools -> Create Shortcut... (Open as window not selected)
  3. ensured that clicking on the PWA shortcut opens a https://www.cnn.com tab within a new window
  4. ensured that you can move around the PWA shortcut to different locations and it still works as expected

Note, step 3 seems to work differently for me than some others. However, step 3 is also consistent with how this works on Chrome for me. Could be specific to some configuration on my machine.

Test Case 5 - Upgrade - PASSED
  1. Install 1.35.103 and create PWA (with “Open as window” selected). Confirm PWA works as expected.
  2. Update to 1.35.104, see PWA is broken
  3. Update to 1.36.x RC
  4. click on the previously created PWA shortcut and a PWA window should launch with site created in step 1.

Verified with

Brave	1.36.108 Chromium: 99.0.4844.51 (Official Build) (arm64) 
Revision	d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}
OS	macOS Version 12.2.1 (Build 21D62)

Verified tests from https://github.com/brave/brave-core/pull/12418#issuecomment-1054989483:

Test Case 1 - "Open as window" selected - PASSED
  • visit https://www.cnn.com
  • create a PWA via Hamburger Menu -> More Tools -> Create Shortcut... (Open as window selected)
  • ensured that CNN is launched in a separate window once the PWA is created
  • ensured that launching the PWA via the shortcut works without issues when Brave is opened & closed
  • ensured that you can move around the PWA shortcut to different locations and it still works as expected
  • ensured that you can uninstall the PWA via the Hamburger Menu (need to be within the PWA window)
Test Case 2- "Open as window" not selected - PASSED
  • visit https://www.cnn.com
  • create a PWA via Hamburger Menu -> More Tools -> Create Shortcut... (Open as window not selected)
  • ensured that clicking on the PWA shortcut opens a https://www.cnn.com tab within an existing window
  • ensured that you can move around the PWA shortcut to different locations and it still works as expected
Test Case 3 - Upgrade Case - PASSED
  • download/install 1.35.104 (PWA via Open as window broken on this build)
  • visit https://www.cnn.com and create a PWA using Open as window (you’ll notice it’s broken)
  • upgrade to 1.36.108
  • click on the previously created PWA shortcut and a PWA window should launch with CNN opened
7reactions
kjozwiakcommented, Feb 24, 2022

Appreciate the report/information 👍 Quickly went through the following and looks like PWA regressed across the board on macOS including 1.36.x which we’re planning on releasing Tuesday as per https://github.com/brave/brave-browser/wiki/Brave-Release-Schedule#release-channel-dates.

STR/Cases to reproduce issue:

  • visit any website and create a shortcut (ensure that Open as window is selected)
  • notice that the window doesn’t launch (crashes)
  • double click on the shortcut that was created (same result, crashes)

Results:

macOS El Captain 10.11.6 x64

  • 1.35.104 Chromium: 98.0.4758.109 - Reproduced (crashes/doesn’t open the website within the window)
  • 1.35.103 Chromium: 98.0.4758.102 - PASSED

macOS Sierra 10.12.6 x64

  • 1.35.104 Chromium: 98.0.4758.109 - Reproduced (crashes/doesn’t open the website within the window)
  • 1.35.103 Chromium: 98.0.4758.102 - PASSED

macOS Monterey 12.2.1 x64

  • 1.35.104 Chromium: 98.0.4758.109 - Reproduced (crashes/doesn’t open the website within the window)
  • 1.35.103 Chromium: 98.0.4758.102 - PASSED

Links to the stack traces via BackTrace for the dev that takes the above:

https://brave.sp.backtrace.io/p/brave/triage?filters=(_rxid%3D"4aee0000-4796-cc07-0000-000000000000")&aggregations=((fingerprint%3Bissues%3Binvariants%2Chead)%2C(fingerprint%3Bissues%3Btags%2Chead)%2C(fingerprint%3Bissues%3Bticket%2Chead)%2C(fingerprint%3Bissues%3Bassignee%2Chead)%2C(fingerprint%3Bissues%3Bstate%2Chead)%2C(fingerprint%3Bfirst_seen%2Chead)%2C(callstack%2Chead)%2C(timestamp%2Cbin%2C32)%2C(timestamp%2Crange)%2C(uname.sysname%2Cdistribution%2C3)%2C(ver%2Cmax)%2C(ver%2Cmin)%2C(guid%2Cunique)%2C(classifiers%2Chead))&similarity=false

Some other ID’s form user and myself:

  • 56ee0000-4796-cc07-0000-000000000000
  • b9e30000-4796-cc07-0000-000000000000
  • e0e40000-4796-cc07-0000-000000000000
Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating to 1.35.104 breaks all PWAs - Brave Community
Launch a PWA installed using Brave either from the icon in the browser address bar or the app icon itself.
Read more >
Release Channel 1.35.104 for Mac : r/brave_browser
Release Notes V1.35.104 for Mac (Feb 23, 2022). Upgraded ... I was opening my apps for the past days, and even this morning....
Read more >
Manage Projects
This example request with the payload below will create a new project. curl \ --request POST \ --header "Content-Type: application/ ...
Read more >
Nondiscrimination in Health Programs and Activities
Section 1557 of the ACA provides that an individual shall not, ... shall be 60 days after the publication of the final rule...
Read more >
VENTURA PORT DISTRICT
E) Authorize the General Manager to Execute a Funding Agreement with ... and impacts to parking for staging), the project was not started....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found