This branch contains modifications to the mozilla:release branch for compiling the Record Replay gecko based browser.
MacOS
If you are using Apple Silicone you should start by making sure you have a Rosetta terminal:
Then you should basically be able to follow the rest of the steps normally (with a couple of caveats called out down below - read carefully).
- Make sure that you are using Python v2.7
cp mozconfig.macsample mozconfig- Download
MacOSX11.1.sdk.tar.xzfrom https://github.com/phracker/MacOSX-SDKs/releases - Untar
MacOSX11.1.sdk.tar.xzin the repo root to create aMacOSX11.1.sdkdirectory - Run
node build- On Apple Silicon, you many need to run
RUSTC_BOOTSTRAP=qcms node buildto build successfully.
- On Apple Silicon, you many need to run
- Run
./mach run
MacOS with Apple Silicone
Linux
cp mozconfig.linuxsample mozconfig- run
./mach bootstrapand select (2) Firefox Desktop - run
node build - run
./mach run
-
If you change your PATH to point to a different version of say Python or Rust you need to rerun
./mach bootstrapto get the build system to pick up the change. -
If you are seeing this error:
ERROR!!!!!! Could not find artifacts for a toolchain build named macosx64-dump-syms
Try cloning the latest mozilla-central (context: https://discord.com/channels/779097926135054346/801228428115312671/938567563644915713):
- Make sure you have mercurial installed (
brew install hg) - Clone mozilla central to sibling directory to this one (
cd .. && hg clone https://hg.mozilla.org/mozilla-central/) - Go into the freshly cloned mozilla-central repo and run
./mach bootstrapwithin it and select(2) Firefox Desktopwhen prompted. Come back to this repo and try building again. - In some cases, even if
./mach bootstrapfails with the above error, the build step might still work, so you can also try building without necessarily getting./mach bootstrapto complete everything successfully.
You can also find some conversation of these steps at #745
- Checkout the
releasebranch, pull from upstreamreleasebranch:
git checkout release
git pull https://github.com/mozilla/gecko-dev.git release
- Switch to a new branch, merge from the
releasebranch.
git checkout webreplay-release
git checkout -b replay-merge
git merge release
- Fix merge conflicts.
- Fix build breaks.
- Make sure the output binary is
replayand notfirefox. - Get e2e tests etc. to pass.
- At this point it is reasonably safe to merge into the
webreplay-releasebranch.
git checkout webreplay-release
git merge replay-merge
git push
- Update User Agent version reported by
CurrentFirefoxVersion()intoolkit/recordreplay/ProcessRecordReplay.cpp - Make sure automatic updates work with the new browser. Run the build/test action on the merge branch, delete the
noupdatefile for the build in S3, then launch the browser, open "About Replay" and see if it updates.
Tips for debugging:
- Look at the update server logs to make sure requests are being processed correctly.
- Set the
app.update.logbrowser config when running, and then check console output. - If there is a line like
*** AUS:SVC readStatusFile - status: failed: 23, path: /path/to/update.status, this is produced by the C++ updater which can be found inUpdateThreadFuncinupdater.cpp. Building a local browser with instrumentation is likely needed to investigate.
- Run live test harness and make sure crash rate is acceptable.
Speeding up oh-my-zsh
git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 1