brave / brave-browser

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

Blank, black screen when trying to view the `Top Sites` panel in `Customization` on the new-tab page (NTP) #37631

Closed stephendonner closed 4 months ago

stephendonner commented 5 months ago

edit: this affects Universal builds on Intel macOS only, due to the way we create the Universal app and replace the Intel resources with the arm64 resources where the file names are a little different due to build paths. https://github.com/brave/brave-browser/issues/38437

Description

Blank, black screen when trying to view the Top Sites panel in Customization on the new-tab page (NTP)

Found while testing https://github.com/brave/brave-browser/issues/37110

Steps to Reproduce

  1. install 1.66.80 - has to be Universal app build on an intel mac
  2. launch Brave
  3. open a new-tab page
  4. click on Customize at the bottom (but don't yet enable Brave News)
  5. now, click Top Sites

Actual result:

Blank, black screen

screenshot in dev tools' console
Screen Shot 2024-04-16 at 3 30 46 PM Screen Shot 2024-04-16 at 3 24 34 PM

Expected result:

Customize Dashboard remains, focused on the chosen panel, Top Sites

Screen Shot 2024-04-16 at 3 38 35 PM

Reproduces how often:

100%

Brave version (brave://version info)

Brave   1.66.80 Chromium: 124.0.6367.29 (Official Build) beta (x86_64) 
Revision    2d822a1940c9159c1f307cd1c0a8f58fcfb50fe0
OS  macOS Version 11.7.10 (Build 20G1427)

Version/Channel Information:

cc @fallaciousreasoning @petemill @rebron @brave/qa-team

fallaciousreasoning commented 5 months ago

So this doesn't repro for me in 1.66.80 in Linux. However, we've been seeing a few of these ChunkLoadErrors which is worrying me a bit. I wonder what's causing them.

fallaciousreasoning commented 5 months ago

It seems like it could be a caching error, but I'm not sure. Does it repro in another profile?

stephendonner commented 5 months ago

It seems like it could be a caching error, but I'm not sure. Does it repro in another profile?

Reproduces 100% in a clean profile, for me.

sangwoo108 commented 5 months ago

On my mac, both beta and nightly works well.

fallaciousreasoning commented 5 months ago

I'm worried it's a build/installer problem. Does reinstalling the same version change anything @stephendonner?

stephendonner commented 5 months ago

I'm worried it's a build/installer problem. Does reinstalling the same version change anything @stephendonner?

I think it's using Morpheon Dark: https://chromewebstore.google.com/detail/morpheon-dark/mafbdhjdkjnoafhfelkjpchpaepjknad (now that I've retraced my steps); can you and @sangwoo108 try installing that, and see if the new-page page/Customize dialogs are broken/

fallaciousreasoning commented 5 months ago

Hmmm, still works for me - that would've been a neat solution though. Does it work for you when you remove it?

image

It'd be weird though, 'cause I don't think extensions can run on chrome:// urls

fallaciousreasoning commented 5 months ago

I wonder if this could be related to the React 18 upgrade

sangwoo108 commented 5 months ago

Yeah, it works for me with the theme(Nightly)

sangwoo108 commented 5 months ago

@stephendonner I'm cuirous what you see when you type "chrome://newtab/314.chunk.js" to the location bar? And also curios if you're uising intel mac or arm

stephendonner commented 5 months ago

@sangwoo108 here you go, thanks for asking!

@stephendonner I'm cuirous what you see when you type "chrome://newtab/314.chunk.js" to the location bar? And also curios if you're uising intel mac or arm

Screenshot 2024-04-18 at 5 29 44 PM

Intel macOS-x64, Big Sur:

Brave | 1.66.82 Chromium: 124.0.6367.60 (Official Build) beta (x86_64)
-- | --
Revision | 5dc8a11fe47f7e764f9108c665f3276805497669
OS | macOS Version 14.5 (Build 23F5059e)
sangwoo108 commented 5 months ago

Interesting, I'm not sure it should be same but my beta returns different source for the address. I've checked using my arm machine. I'll try checking using intel mac and let you know

sangwoo108 commented 5 months ago

Gotcha! On my intel machine, it was reproducible. I suspect something was wrong while rolling out the beta. Maybe webpack dependency? But not sure who can look into this. (Niglty works fine)

image
fallaciousreasoning commented 5 months ago

Going to be interesting to see what happens when the new Beta comes out. Hopefully this just disappears?

stephendonner commented 5 months ago

Going to be interesting to see what happens when the new Beta comes out. Hopefully this just disappears?

Happens with the latest nightly

Brave   1.67.23 Chromium: 124.0.6367.60 (Official Build) nightly (x86_64) 
Revision    2574e866fb941a93ad6414bb02563c9ecb9fa9d5
OS  macOS Version 11.7.10 (Build 20G1427) 

too 😢

fallaciousreasoning commented 5 months ago

@sangwoo108 does this happen in Dev for you on your Intel mac?

sangwoo108 commented 5 months ago

I checked but my dev version was okay. We're asking folks about the build machine here https://bravesoftware.slack.com/archives/C01EVLWS8R5/p1713744910635809

LaurenWags commented 4 months ago

Discussed this issue with @stephendonner @MadhaviSeelam and added release/blocking and put it in the 1.66.x milestone as this doesn't reproduce on 1.65.x. We should resolve prior to releasing 1.66.x. cc @rebron @kjozwiak for visibility and in case you feel differently - we can adjust labels/milestone 👍🏻

fallaciousreasoning commented 4 months ago

@stephendonner not sure but can we get a build artifact from https://ci.brave.com/job/test-brave-browser-build-macos-x64/1189/ and see if it repros?

(built on the same machine)

stephendonner commented 4 months ago

@stephendonner not sure but can we get a build artifact from https://ci.brave.com/job/test-brave-browser-build-macos-x64/1189/ and see if it repros?

(built on the same machine)

Asked in https://bravesoftware.slack.com/archives/C61QQMWS3/p1714498857856599

stephendonner commented 4 months ago

@fallaciousreasoning Tested using https://build-artifacts.brave.com/test-brave-browser-build-macos-x64/1189/Brave-Browser-Nightly-x64.dmg

Cannot reproduce using:

Big Sur 11.7.10

Brave 1.67.29 Chromium: 124.0.6367.60 (Official Build) nightly (x86_64)
Revision 87978a973dbc82c83fc1f20ab9ec943862c388ed
OS macOS Version 11.7.10 (Build 20G1427)

Sonoma 14.5

Brave 1.67.29 Chromium: 124.0.6367.60 (Official Build) nightly (x86_64)
Revision 87978a973dbc82c83fc1f20ab9ec943862c388ed
OS macOS Version 14.5 (Build 23F5064f)
stephendonner commented 4 months ago

Sadly, still reproduces though using

Brave | 1.66.105 Chromium: 125.0.6422.41 (Official Build) (x86_64)
-- | --
Revision | ba88d7bb175a55287d14014823d5da31fe9c8a47
OS | macOS Version 11.7.10 (Build 20G1427)
Screen Shot 2024-05-14 at 9 51 58 AM
stephendonner commented 4 months ago

Trying again with

Brave | 1.66.107 Chromium: 125.0.6422.41 (Official Build) (x86_64)
-- | --
Revision | 188213f024297511fc5e37efe56eabde5992b300
OS | macOS Version 11.7.10 (Build 20G1427)

Perhaps this was related to a few of the Brave News pref-service-initialization issues, which was resolved in 1.66.x 🤞

MadhaviSeelam commented 4 months ago

Couldn't reproduce in Win 11 verified with 1.66.80, 1.68.12 & 1.66.105

image

MadhaviSeelam commented 4 months ago

Also couldn't reproduce in macOS

Screenshot 2024-05-14 at 10 41 31 AM
stephendonner commented 4 months ago

This is looking good again using the following builds:

Brave 1.66.107 Chromium: 125.0.6422.41 (Official Build) (x86_64)
Revision 188213f024297511fc5e37efe56eabde5992b300
OS macOS Version 11.7.10 (Build 20G1427)
Screen Shot 2024-05-14 at 1 10 40 PM
Brave 1.66.107 Chromium: 125.0.6422.41 (Official Build) (x86_64)
Revision 188213f024297511fc5e37efe56eabde5992b300
OS macOS Version 14.5 (Build 23F79)
Screenshot 2024-05-14 at 1 06 20 PM
fallaciousreasoning commented 4 months ago

Okay, I don't trust this at all @stephendonner - I'm going to start another thread in DevOps

chutneyio commented 4 months ago

Blank page when select Customize -> Brave News:

Screenshot 2024-05-20 at 06 40 37

Version 1.66.110 Chromium: 125.0.6422.60 (Official Build) (x86_64)

fallaciousreasoning commented 4 months ago

@petemill looks like it's happening in the wild :fearful: - we should get that fix you were talking about ASAP

petemill commented 4 months ago

This is caused by https://github.com/brave/brave-browser/issues/38435 but mainly https://github.com/brave/brave-browser/issues/38437. Not sure if you want to keep this open for verification test plan or close as duplicate. I'll put the test plan on 38435

kjozwiak commented 4 months ago

Closing as the above should be fixed by https://github.com/brave/brave-core/pull/23753.

kjozwiak commented 4 months ago

@brave/qa-team can also use the STR/Cases that were mentioned/outlined via https://github.com/brave/brave-browser/issues/38437#issue-2307404139 and can use https://github.com/brave/brave-core/pull/23753#issuecomment-2123942399 as a template. Please make sure that we're using the Universal installer for the above 👍

The above requires 1.66.113 or higher for 1.66.x verification 👍

LaurenWags commented 4 months ago

Verified with

Brave | 1.66.113 Chromium: 125.0.6422.76 (Official Build) (x86_64)
-- | --
Revision | b1864a9a0152d4f1631121c6b13a7426f50cf336
OS | macOS Version 13.6.7 (Build 22G720)

Reproduced both cases from https://github.com/brave/brave-browser/issues/38437#issue-2307404139 using 1.66.105 Chromium: 125.0.6422.41:

Case 1:

  1. Open the universal .app on an intel mac
  2. Visit NTP
  3. Click Customize
  4. Switch to "Brave News"
  5. NTP goes blank due to JS error

Case 2:

  1. Open the universal .app on an intel mac
  2. In chrome://flags enable "Brave Search on NTP"
  3. Restart browser
  4. Visit NTP
  5. NTP goes blank due to JS error
Case 1 Case 2
1 2

Using same cases as above and 1.66.113 Chromium: 125.0.6422.76, confirmed the NTP no longer displays blank with JS error in these cases. Also confirmed selecting each option on the "Customize Dashboard" left navigation menu did not result in the NTP going blank with JS error.

Case 1 Case 2
1 2
stephendonner commented 4 months ago

Verification PASSED using

Brave | 1.66.113 Chromium: 125.0.6422.76 (Official Build) (x86_64)
-- | --
Revision | b1864a9a0152d4f1631121c6b13a7426f50cf336
OS | macOS Version 14.5 (Build 23F79)

Followed my original steps to reproduce, for both new and existing profiles

Existing profile

Screenshot 2024-05-22 at 8 44 52 AM

New profile

Screenshot 2024-05-22 at 8 49 59 AM

Confirmed I could no longer reproduce the JS error; new-tab pages opened the Customize dashboard without issue