Building Brave sometimes white screens. Tried solutions from docs


#1

OS: Ubuntu 16.04,
Brave: v0.19.9beta, or master in git

I’m interested in contributing to brave in my free time when I get home from work, but I keep running into a recurring issue. The first time I followed the install instructions on the github repo, there was no problem. However, after ‘git pull origin master’, brave runs with a white screen. Initial solution was to remove the folder and rerun the build instructions. That worked. But I 'git pull origin master’d again, and now that solution has not worked since.

Other solutions I have tried:
-Passing the --disable-gpu flags per the docs (I have intel, so this shouldn’t apply)
-npm run clean (deleting .electron dir)
-reading git docs
-git fetch instead of git pull origin master
-rollback npm version

For whatever reason, I am determined to contribute something, so would someone please point me in the right direction for a solution? :slight_smile:

Thanks!

–Nick


#2

hi, would you mind displaying the browser level devtool with shift+f8 to see what is logged on the Console tab? thanks!


#3

Thanks for replying,

It successfully ran when i built it this morning, but here is the console output:

log.js:23 [HMR] Waiting for update signal from WDS…
log.js:23 [HMR] Waiting for update signal from WDS…
events.js:138 (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
EventEmitter.addListener @ events.js:138
events.js:144 console.trace
EventEmitter.addListener @ events.js:144
events.js:138 (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
EventEmitter.addListener @ events.js:138
events.js:144 console.trace
EventEmitter.addListener @ events.js:144
client?cd17:64 [WDS] Hot Module Replacement enabled.
client?cd17:64 [WDS] Hot Module Replacement enabled.

For reference, the PC i’m building it on has only ~4GB of physical memory.

edit: when it breaks, I normally don’t have access to the dev console, but it prints something similar to the terminal


#4

did you set the official repo as upstream remote? if not, please try this

git checkout master
git remote add upstream https://github.com/brave/browser-laptop
git fetch upstream
git rebase upstream/master

and run npm run watch and npm start.

When you’ll have the same white screen, it is always worth trying rm -rf ~/.electron && rm -rf node_modules && npm install to install Brave freshly by fetching the updated resources.

Please let me know the commands above work, thanks!


#5

I set it up as upstream remote, and it works fine now after rebuilding, with the same console errors however. Thanks a lot for your help. One more question though, why do I have to set the official repo as upstream remote when I cloned it from the same URL? Does origin on my machine not reference the same remote that I cloned it from? That’s the impression I seem to get from this:

https://stackoverflow.com/questions/8948803/what-does-git-remote-add-upstream-help-achieve

I’m 100% new to working with repos that are not my own, so sorry if this is a dopey question.


#6

Cloning the official repository makes the copy of it at the time when you do so, and your cloned repo is a forked one and different from the upstream. So you have to set it up as another remote explicitly, which you already did.

The reason why you had to do so is to keep your forked branch updated by rebasing your branch to the upstream master (git rebase upstream/master) where the team members are usually working on enhancement/fix/etc… By doing so, your local repository is kept updated.

And if you are committing the change, your commit needs to be updated to the upstream repo, or your change will be outdated and cannot be merged because of change conflicts.

Rebasing your repo to the master branch of the upstream repo ensures that your change will not conflict with others, and can be safely merged when it is accepted via Pull Request.

Say you and I are working on the same part of a file at the same time. If my change is merged to upstream’s master earlier than yours, you have to edit yours again, merging mine. Unless you do so, your change cannot be merged.

So, when I am not sure if other team members are working on the same stuff I’m working, I fetch upstream’s change and rebase my branch to upstream’s master before I push my change to my remote repo on GitHub. By doing so, I know that my work does not conflict with others’ and it is the latest change against the upstream repo, and I’m sure I can create a Push Request with my change.

Does it make the thing clear to you?


#7

Those errors are known and not critical. You can safely ignore them.


#8

Very clear. Previously I had used git on my own projects (no other contributors), so I was unfamiliar with how git handled this concept. Thanks for the detailed explanation! :slight_smile:


#9