brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.8k stars 2.33k forks source link

Opening PWAs results in a console error and crash #20735

Open lanthias opened 2 years ago

lanthias commented 2 years ago

Notes from @bsclifton

To try and reproduce

  1. Go to music.youtube.com
  2. Add the page as a PWA using the download arrow in the omnibox image
  3. After you add the PWA, it will open. Go ahead and close it
  4. Visit music.youtube.com again
  5. There will be an open button in omnibox (intended to open the PWA) image
  6. Clicking that is causing the crash reported

Description

When I open any PWA on a page (using the PWA button next to the address bar), the current page crashes and disappears.

Example button: image

Steps to Reproduce

  1. Go to music.youtube.com or the Brave apps view
  2. Click any app
  3. The page is removed

Actual result:

If I run from the console, I get the following error:

[80088:37635:0127/120708.753715:ERROR:web_app_shortcut_mac.mm(1058)] Couldn't find an Applications directory to copy app to.

Expected result:

It launches the PWA.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.34.81 Chromium: 97.0.4692.99 (Official Build) (arm64) Revision d740da257583289dbebd2eb37e8668928fac5ead-refs/branch-heads/4692@{#1461} OS macOS Version 11.1 (Build 20C69)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

This is not recent (it has never worked). I've tried reinstalling brave, disabling extensions, and disabling Mac accessibility apps (which was mentioned as a potential cause).

jsjoeio commented 2 years ago

This is happening to me as well. It was working yesterday and now it's not today. Could this be a result of upgrading to V1.35.104?

bsclifton commented 2 years ago

Thanks for the report folks - we have a fix which we've verified 😄 We should have this released in the next few days

Closing as a duplicate of https://github.com/brave/brave-browser/issues/21302

lanthias commented 2 years ago

Thanks for this @bsclifton - I'm on 1.36.109 which I believe should have the fix on #21302, yet I can still reproduce.

With this in mind, this may not be a dup and might be a distinct issue. Appreciate the help.

bsclifton commented 2 years ago

OK thanks @lanthias - this is a bit different; I'm going to reopen actually and add some notes

This seems to work fine on Windows; I'm curious if this is isolated to macOS (and maybe related to accessibility as you had guessed in original post)

bsclifton commented 2 years ago

@lanthias something you can try:

  1. Visit brave://apps
  2. Remove the YouTube Music PWA
  3. Try to re-add the YouTube PWA

This may resolve the issue if there was a problem with the directory used for the app. Definitely worth a shot

lanthias commented 2 years ago

Hey @bsclifton, thanks for the note - still the same, and it's the same across all PWAs.