PraxiveSoftware / Samurai

🐉 Build firefox forks with ease. Fork of the gluon project improved for windows.
https://praxive.gitbook.io/samurai
Mozilla Public License 2.0
5 stars 1 forks source link

Bootstrapping issues on Windows 11 #36

Closed leptr closed 1 month ago

leptr commented 1 month ago

I followed the documentation step-by-step on my Windows 11 PC (23H2 22631.3880). I get errors when executing the following commands:

samurai bootstrap
samurai set brand stable
samurai build

samurai bootstrap output

 00:00:00 Bootstrapping Blazing Bunny...
Passing through to |mach bootstrap|
 00:00:01 Error running mach:
 00:00:01
 00:00:01     mach bootstrap --application-choice browser
 00:00:01
 00:00:01 The error occurred in code that was called by the mach command. This is either
 00:00:01 a bug in the called code itself or in the way that mach is calling it.
 00:00:01 You can invoke ``./mach busted`` to check if this issue is already on file. If it
 00:00:01 isn't, please use ``./mach busted file bootstrap`` to report it. If ``./mach busted`` is
 00:00:01 misbehaving, you can also inspect the dependencies of bug 1543241.
 00:00:01
 00:00:01 If filing a bug, please include the full output of mach, including this error
 00:00:01 message.
 00:00:01
 00:00:01 The details of the failure are as follows:
 00:00:01
 00:00:01 FileNotFoundError: [WinError 2] The system cannot find the file specified
 00:00:01
 00:00:01   File "D:\Projects\blazing-bunny\.engine\python\mozboot\mozboot\mach_commands.py", line 50, in bootstrap
 00:00:01     bootstrapper.bootstrap(command_context.settings)
 00:00:01   File "d:\projects\blazing-bunny\.engine\python\mozboot\mozboot\bootstrap.py", line 382, in bootstrap
 00:00:01     check_for_hgrc_state_dir_mismatch(state_dir)
 00:00:01   File "d:\projects\blazing-bunny\.engine\python\mozboot\mozboot\bootstrap.py", line 194, in check_for_hgrc_st te_dir_mismatch
 00:00:01     result = subprocess.run(
 00:00:01              ^^^^^^^^^^^^^^^
 00:00:01   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\s bprocess.py", line 548, in run
 00:00:01     with Popen(*popenargs, **kwargs) as process:
 00:00:01          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:01   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\s bprocess.py", line 1026, in __init__
 00:00:01     self._execute_child(args, executable, preexec_fn, close_fds,
 00:00:01   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\s bprocess.py", line 1538, in _execute_child
 00:00:01     hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
 00:00:01                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

samurai set brand stable output

C:\Users\petar\AppData\Roaming\npm\node_modules\@praxive\samurai\dist\index.js:37
        value: brandConfig.release.displayVersion,
                                   ^

TypeError: Cannot read properties of undefined (reading 'displayVersion')
    at Object.<anonymous> (C:\Users\petar\AppData\Roaming\npm\node_modules\@praxive\samurai\dist\index.js:37:36)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

samurai build output

C:\Users\petar\AppData\Roaming\npm\node_modules\@praxive\samurai\dist\index.js:37
        value: brandConfig.release.displayVersion,
                                   ^

TypeError: Cannot read properties of undefined (reading 'displayVersion')
    at Object.<anonymous> (C:\Users\petar\AppData\Roaming\npm\node_modules\@praxive\samurai\dist\index.js:37:36)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

The results are repeated upon multiple tries, reboots, and reinstalls.

Maybe useful information: installing the samurai npm package gave me a following warning: npm warn deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

binary-blazer commented 1 month ago

Hello @leptr! Please follow the branding documentation!

https://praxive.gitbook.io/samurai/guides/branding

for a full samurai.json config reference, visit: https://praxive.gitbook.io/samurai/reference/config#brands

binary-blazer commented 1 month ago

Also, for the issue with bootstrapping your browser, check your Python installations and follow the Windows Guidelines: https://praxive.gitbook.io/samurai/guides/windows

leptr commented 1 month ago

Hi @binary-blazer . I made sure to follow all of the instructions for setting up samurai on Windows, as well as the Getting Started page. Performing samurai check results in 5/5 tools being found and OK. I checked my Python installation and made sure it works correctly. I have the latest Python version 3.12.4 installed.

Performing samurai bootstrap still results in the same error. I am unable to run the command or build the program. I also made sure to follow the branding guide correctly, and this time there were no errors with that, so that part is resolved, it was human error on my part. The other two issues persist.

binary-blazer commented 1 month ago

@leptr I will look into that as soon as possible! Thank you for helping the project!

binary-blazer commented 1 month ago

Hi @binary-blazer . I made sure to follow all of the instructions for setting up samurai on Windows, as well as the Getting Started page. Performing samurai check results in 5/5 tools being found and OK. I checked my Python installation and made sure it works correctly. I have the latest Python version 3.12.4 installed.

Performing samurai bootstrap still results in the same error. I am unable to run the command or build the program. I also made sure to follow the branding guide correctly, and this time there were no errors with that, so that part is resolved, it was human error on my part. The other two issues persist.

My response! @leptr I'm currently testing some alpha versions addressing this issue! But I might have found the issue on your end! Please run the below command. If it opens the Microsoft Store with Python for Windows, please install it. If not and it ends up successful and OK, please tell me.

samurai download-mb-pip
binary-blazer commented 1 month ago

Or simply search the microsoft store for Python 3.10 and install it. I have seen issues with Python in the past and this Python version from the microsoft store always fixed those. So please try and then retry to run the bootstrap command in a restarted cmd or powershell.

image

leptr commented 1 month ago

hi @binary-blazer , I tried your suggestion and it did end up opening the store, so I installed the version from there, but unfortunately I am still receiving the same error. I made sure that the version from the store was the one used by samurai, so I don't think it's a version issue.

leptr commented 1 month ago

hey @binary-blazer, some progress! so, I figured out that MozillaBuild did not get configured properly when I installed it, so I reinstalled it and added it to the path, then ran the whole process from the start through the MozillaBuild shell. This time, I managed to complete all the steps and get the samurai bootstrap command to work, but I still get errors with the build command, as well as the commit command, here are the outputs

samurai build output:

00:00:00 Applying mozconfig...
 00:00:00 Dynamic config 'brand not set, defaulting to 'unofficial'
 00:00:00 Dynamic config 'buildMode not set, defaulting to 'dev'
 00:00:00 Config for this `windows` build:
 00:00:00       --with-app-name=blazing-bunny-browser
 00:00:00       MOZ_USER_DIR="Blazing Bunny"
 00:00:00       MOZ_APP_VENDOR="Blazing Bunny"
 00:00:00       MOZ_APP_BASENAME=blazing-bunny-browser
 00:00:00       MOZ_APP_PROFILE=blazing-bunny-browser
 00:00:00       MOZ_APP_DISPLAYNAME="Blazing Bunny"
 00:00:00       MOZ_MACBUNDLE_ID=com.leptr.blazingbunny
 00:00:00       MOZ_DISTRIBUTION_ID=com.leptr.blazingbunny
 00:00:00       MOZ_STUB_INSTALLER=1
 00:00:00       MOZ_INCLUDE_SOURCE_INFO=1
 00:00:00       MOZ_SOURCE_REPO=https://github.com/example/example
 00:00:00       MOZ_SOURCE_CHANGESET=470a98c94a0663a6fee1d3376d9751d46c1bf566
 00:00:00       --enable-bootstrap
 00:00:00       --target=x86_64-pc-mingw32
 00:00:00       --enable-js-shell
 00:00:00       --enable-rust-simd
 00:00:00       --enable-crashreporter
 00:00:00       MOZ_TELEMETRY_REPORTING=
 00:00:00       MOZ_DATA_REPORTING=
 00:00:00       --disable-debug
 00:00:00       --disable-geckodriver
 00:00:00       --disable-profiling
 00:00:00       --disable-tests
 00:00:00       --with-branding=browser/branding/unofficial
 00:00:00       --enable-unverified-updates
 00:00:00       --enable-update-channel=unofficial
 00:00:00       MOZ_APPUPDATE_HOST=localhost:7648 # This should not resolve
 00:00:00 Starting build...
 00:00:00 Building for "windows"...
 00:00:00 If you get any dependency errors, try running |samurai bootstrap|.
 00:00:02 W Clobber not needed.
 00:00:02 Using Python 3.11.7 from C:\Users\petar\.mozbuild\srcdirs\.engine-85880bfd97d0\_virtualenvs\build\Scripts\python.exe
 00:00:02 Adding configure options from D:\Projects\blazing-bunny\.engine\mozconfig
 00:00:02   --with-app-name=blazing-bunny-browser
 00:00:02   --enable-bootstrap
 00:00:02   --target=x86_64-pc-mingw32
 00:00:02   --enable-js-shell
 00:00:02   --enable-rust-simd
 00:00:02   --enable-crashreporter
 00:00:02   --disable-debug
 00:00:02   --disable-geckodriver
 00:00:02   --disable-profiling
 00:00:02   --disable-tests
 00:00:02   --with-branding=browser/branding/unofficial
 00:00:02   --enable-unverified-updates
 00:00:02   --enable-update-channel=unofficial
 00:00:02   MOZ_APP_BASENAME=blazing-bunny-browser
 00:00:02   MOZ_APP_PROFILE=blazing-bunny-browser
 00:00:02   MOZ_SOURCE_REPO=https://github.com/example/example
 00:00:02   MOZ_APP_VENDOR=Blazing Bunny
 00:00:02   MOZ_USER_DIR=Blazing Bunny
 00:00:02   MOZ_APPUPDATE_HOST=localhost:7648
 00:00:02   MOZ_STUB_INSTALLER=1
 00:00:02   MOZ_INCLUDE_SOURCE_INFO=1
 00:00:02   MOZ_SOURCE_CHANGESET=470a98c94a0663a6fee1d3376d9751d46c1bf566
 00:00:02   MOZ_DISTRIBUTION_ID=com.leptr.blazingbunny
 00:00:02   MOZ_APP_DISPLAYNAME=Blazing Bunny
 00:00:02   MOZ_MACBUNDLE_ID=com.leptr.blazingbunny
 00:00:02 checking for vcs source checkout... git
 00:00:02 checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe
 00:00:02 checking for host system type... x86_64-pc-windows-msvc
 00:00:02 checking for target system type... x86_64-pc-mingw32
 00:00:02 checking whether cross compiling... yes
 00:00:02 Traceback (most recent call last):
 00:00:02   File "D:\Projects\blazing-bunny\.engine\configure.py", line 351, in <module>
 00:00:02     sys.exit(main(sys.argv))
 00:00:02              ^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\configure.py", line 141, in main
 00:00:02     sandbox.run()
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 522, in run
 00:00:02     self._value_for(option)
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 627, in _value_for
 00:00:02     return self._value_for_option(obj)
 00:00:02            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\util.py", line 916, in method_call
 00:00:02     cache[args] = self.func(instance, *args)
 00:00:02                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 662, in _value_for_option
 00:00:02     value, option_string = self._helper.handle(option)
 00:00:02                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\options.py", line 594, in handle
 00:00:02     ret = option.get_value(arg, origin)
 00:00:02           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\options.py", line 427, in get_value
 00:00:02     raise InvalidOptionError(
 00:00:02 mozbuild.configure.options.InvalidOptionError: MOZ_APP_VENDOR=Blazing Bunny can not be set by mozconfig. Values are accepted from: implied
 00:00:03 W Exception when writing resource usage file: [Errno 2] No such file or directory: 'D:/Projects/blazing-bunny/.engine/obj-x86_64-pc-mingw32\\.mozbuild\\profile_build_resources.json'
 00:00:03  Config object not found by mach.
 00:00:03 *** Fix above errors and then restart with "./mach build"

 00:00:03 Total build time: 3 seconds.

samurai commit output:

 00:00:00 Committing Blazing Bunny...
[main 470a98c] chore: commit
 20 files changed, 132 insertions(+)
 create mode 100644 .vscode/settings.json
 create mode 100644 configs/common/mozconfig
 create mode 100644 configs/linux/mozconfig
 create mode 100644 configs/macos/mozconfig
 create mode 100644 configs/windows/mozconfig
 create mode 100644 samurai.json
 create mode 100644 src/README.md
 create mode 100644 src/browser/themes/custom/linux/linux.inc.css
 create mode 100644 src/browser/themes/custom/macos/macos.inc.css
 create mode 100644 src/browser/themes/custom/shared/shared.inc.css
 create mode 100644 src/browser/themes/custom/windows/windows.inc.css
 create mode 100644 src/browser/themes/linux/browser-css.patch
 create mode 100644 src/browser/themes/linux/jar-mn.patch
 create mode 100644 src/browser/themes/osx/browser-css.patch
 create mode 100644 src/browser/themes/osx/jar-mn.patch
 create mode 100644 src/browser/themes/shared/browser-shared-css.patch
 create mode 100644 src/browser/themes/shared/jar-inc-mn.patch
 create mode 100644 src/browser/themes/windows/browser-css.patch
 create mode 100644 src/browser/themes/windows/jar-mn.patch
git: 'push origin main --set-upstream' is not a git command. See 'git --help'.

   ERROR An error occurred while running command ["commit"]:

         Error: Command failed with exit code 1: git push origin main --set-upstream

         • handlePromise (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\execa@5.1.1\node_modules\execa\index.js:118:26)
         • process.processTicksAndRejections (node:internal/process/task_queues:95:5)
         • async commit (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\commands\commit.js:35:5)

 00:00:00 Exiting due to error.

we are getting closer to figuring this out!

binary-blazer commented 1 month ago

hey @binary-blazer, some progress! so, I figured out that MozillaBuild did not get configured properly when I installed it, so I reinstalled it and added it to the path, then ran the whole process from the start through the MozillaBuild shell. This time, I managed to complete all the steps and get the samurai bootstrap command to work, but I still get errors with the build command, as well as the commit command, here are the outputs

samurai build output:

00:00:00 Applying mozconfig...
 00:00:00 Dynamic config 'brand not set, defaulting to 'unofficial'
 00:00:00 Dynamic config 'buildMode not set, defaulting to 'dev'
 00:00:00 Config for this `windows` build:
 00:00:00       --with-app-name=blazing-bunny-browser
 00:00:00       MOZ_USER_DIR="Blazing Bunny"
 00:00:00       MOZ_APP_VENDOR="Blazing Bunny"
 00:00:00       MOZ_APP_BASENAME=blazing-bunny-browser
 00:00:00       MOZ_APP_PROFILE=blazing-bunny-browser
 00:00:00       MOZ_APP_DISPLAYNAME="Blazing Bunny"
 00:00:00       MOZ_MACBUNDLE_ID=com.leptr.blazingbunny
 00:00:00       MOZ_DISTRIBUTION_ID=com.leptr.blazingbunny
 00:00:00       MOZ_STUB_INSTALLER=1
 00:00:00       MOZ_INCLUDE_SOURCE_INFO=1
 00:00:00       MOZ_SOURCE_REPO=https://github.com/example/example
 00:00:00       MOZ_SOURCE_CHANGESET=470a98c94a0663a6fee1d3376d9751d46c1bf566
 00:00:00       --enable-bootstrap
 00:00:00       --target=x86_64-pc-mingw32
 00:00:00       --enable-js-shell
 00:00:00       --enable-rust-simd
 00:00:00       --enable-crashreporter
 00:00:00       MOZ_TELEMETRY_REPORTING=
 00:00:00       MOZ_DATA_REPORTING=
 00:00:00       --disable-debug
 00:00:00       --disable-geckodriver
 00:00:00       --disable-profiling
 00:00:00       --disable-tests
 00:00:00       --with-branding=browser/branding/unofficial
 00:00:00       --enable-unverified-updates
 00:00:00       --enable-update-channel=unofficial
 00:00:00       MOZ_APPUPDATE_HOST=localhost:7648 # This should not resolve
 00:00:00 Starting build...
 00:00:00 Building for "windows"...
 00:00:00 If you get any dependency errors, try running |samurai bootstrap|.
 00:00:02 W Clobber not needed.
 00:00:02 Using Python 3.11.7 from C:\Users\petar\.mozbuild\srcdirs\.engine-85880bfd97d0\_virtualenvs\build\Scripts\python.exe
 00:00:02 Adding configure options from D:\Projects\blazing-bunny\.engine\mozconfig
 00:00:02   --with-app-name=blazing-bunny-browser
 00:00:02   --enable-bootstrap
 00:00:02   --target=x86_64-pc-mingw32
 00:00:02   --enable-js-shell
 00:00:02   --enable-rust-simd
 00:00:02   --enable-crashreporter
 00:00:02   --disable-debug
 00:00:02   --disable-geckodriver
 00:00:02   --disable-profiling
 00:00:02   --disable-tests
 00:00:02   --with-branding=browser/branding/unofficial
 00:00:02   --enable-unverified-updates
 00:00:02   --enable-update-channel=unofficial
 00:00:02   MOZ_APP_BASENAME=blazing-bunny-browser
 00:00:02   MOZ_APP_PROFILE=blazing-bunny-browser
 00:00:02   MOZ_SOURCE_REPO=https://github.com/example/example
 00:00:02   MOZ_APP_VENDOR=Blazing Bunny
 00:00:02   MOZ_USER_DIR=Blazing Bunny
 00:00:02   MOZ_APPUPDATE_HOST=localhost:7648
 00:00:02   MOZ_STUB_INSTALLER=1
 00:00:02   MOZ_INCLUDE_SOURCE_INFO=1
 00:00:02   MOZ_SOURCE_CHANGESET=470a98c94a0663a6fee1d3376d9751d46c1bf566
 00:00:02   MOZ_DISTRIBUTION_ID=com.leptr.blazingbunny
 00:00:02   MOZ_APP_DISPLAYNAME=Blazing Bunny
 00:00:02   MOZ_MACBUNDLE_ID=com.leptr.blazingbunny
 00:00:02 checking for vcs source checkout... git
 00:00:02 checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe
 00:00:02 checking for host system type... x86_64-pc-windows-msvc
 00:00:02 checking for target system type... x86_64-pc-mingw32
 00:00:02 checking whether cross compiling... yes
 00:00:02 Traceback (most recent call last):
 00:00:02   File "D:\Projects\blazing-bunny\.engine\configure.py", line 351, in <module>
 00:00:02     sys.exit(main(sys.argv))
 00:00:02              ^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\configure.py", line 141, in main
 00:00:02     sandbox.run()
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 522, in run
 00:00:02     self._value_for(option)
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 627, in _value_for
 00:00:02     return self._value_for_option(obj)
 00:00:02            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\util.py", line 916, in method_call
 00:00:02     cache[args] = self.func(instance, *args)
 00:00:02                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 662, in _value_for_option
 00:00:02     value, option_string = self._helper.handle(option)
 00:00:02                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\options.py", line 594, in handle
 00:00:02     ret = option.get_value(arg, origin)
 00:00:02           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\options.py", line 427, in get_value
 00:00:02     raise InvalidOptionError(
 00:00:02 mozbuild.configure.options.InvalidOptionError: MOZ_APP_VENDOR=Blazing Bunny can not be set by mozconfig. Values are accepted from: implied
 00:00:03 W Exception when writing resource usage file: [Errno 2] No such file or directory: 'D:/Projects/blazing-bunny/.engine/obj-x86_64-pc-mingw32\\.mozbuild\\profile_build_resources.json'
 00:00:03  Config object not found by mach.
 00:00:03 *** Fix above errors and then restart with "./mach build"

 00:00:03 Total build time: 3 seconds.

samurai commit output:

 00:00:00 Committing Blazing Bunny...
[main 470a98c] chore: commit
 20 files changed, 132 insertions(+)
 create mode 100644 .vscode/settings.json
 create mode 100644 configs/common/mozconfig
 create mode 100644 configs/linux/mozconfig
 create mode 100644 configs/macos/mozconfig
 create mode 100644 configs/windows/mozconfig
 create mode 100644 samurai.json
 create mode 100644 src/README.md
 create mode 100644 src/browser/themes/custom/linux/linux.inc.css
 create mode 100644 src/browser/themes/custom/macos/macos.inc.css
 create mode 100644 src/browser/themes/custom/shared/shared.inc.css
 create mode 100644 src/browser/themes/custom/windows/windows.inc.css
 create mode 100644 src/browser/themes/linux/browser-css.patch
 create mode 100644 src/browser/themes/linux/jar-mn.patch
 create mode 100644 src/browser/themes/osx/browser-css.patch
 create mode 100644 src/browser/themes/osx/jar-mn.patch
 create mode 100644 src/browser/themes/shared/browser-shared-css.patch
 create mode 100644 src/browser/themes/shared/jar-inc-mn.patch
 create mode 100644 src/browser/themes/windows/browser-css.patch
 create mode 100644 src/browser/themes/windows/jar-mn.patch
git: 'push origin main --set-upstream' is not a git command. See 'git --help'.

   ERROR An error occurred while running command ["commit"]:

         Error: Command failed with exit code 1: git push origin main --set-upstream

         • handlePromise (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\execa@5.1.1\node_modules\execa\index.js:118:26)
         • process.processTicksAndRejections (node:internal/process/task_queues:95:5)
         • async commit (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\commands\commit.js:35:5)

 00:00:00 Exiting due to error.

we are getting closer to figuring this out!

You can savely ignore the output at the commit command. The commit command already ran the commit and branch set for your root project "Blazing Bunny". So, for the build, yeah I discovered an issue with the MOZ_VENDOR on FireFox v129.0. This issue will be fixed in the next version update I will publish later today. You can see the progress here: https://github.com/PraxiveSoftware/Samurai/pull/38 and for your build error output: https://github.com/PraxiveSoftware/Samurai/pull/38/commits/fb14c5136bd01d9c8a4317c6bf577bbbd8ac18bb

binary-blazer commented 1 month ago

hey @binary-blazer, some progress! so, I figured out that MozillaBuild did not get configured properly when I installed it, so I reinstalled it and added it to the path, then ran the whole process from the start through the MozillaBuild shell. This time, I managed to complete all the steps and get the samurai bootstrap command to work, but I still get errors with the build command, as well as the commit command, here are the outputs

samurai build output:

00:00:00 Applying mozconfig...
 00:00:00 Dynamic config 'brand not set, defaulting to 'unofficial'
 00:00:00 Dynamic config 'buildMode not set, defaulting to 'dev'
 00:00:00 Config for this `windows` build:
 00:00:00       --with-app-name=blazing-bunny-browser
 00:00:00       MOZ_USER_DIR="Blazing Bunny"
 00:00:00       MOZ_APP_VENDOR="Blazing Bunny"
 00:00:00       MOZ_APP_BASENAME=blazing-bunny-browser
 00:00:00       MOZ_APP_PROFILE=blazing-bunny-browser
 00:00:00       MOZ_APP_DISPLAYNAME="Blazing Bunny"
 00:00:00       MOZ_MACBUNDLE_ID=com.leptr.blazingbunny
 00:00:00       MOZ_DISTRIBUTION_ID=com.leptr.blazingbunny
 00:00:00       MOZ_STUB_INSTALLER=1
 00:00:00       MOZ_INCLUDE_SOURCE_INFO=1
 00:00:00       MOZ_SOURCE_REPO=https://github.com/example/example
 00:00:00       MOZ_SOURCE_CHANGESET=470a98c94a0663a6fee1d3376d9751d46c1bf566
 00:00:00       --enable-bootstrap
 00:00:00       --target=x86_64-pc-mingw32
 00:00:00       --enable-js-shell
 00:00:00       --enable-rust-simd
 00:00:00       --enable-crashreporter
 00:00:00       MOZ_TELEMETRY_REPORTING=
 00:00:00       MOZ_DATA_REPORTING=
 00:00:00       --disable-debug
 00:00:00       --disable-geckodriver
 00:00:00       --disable-profiling
 00:00:00       --disable-tests
 00:00:00       --with-branding=browser/branding/unofficial
 00:00:00       --enable-unverified-updates
 00:00:00       --enable-update-channel=unofficial
 00:00:00       MOZ_APPUPDATE_HOST=localhost:7648 # This should not resolve
 00:00:00 Starting build...
 00:00:00 Building for "windows"...
 00:00:00 If you get any dependency errors, try running |samurai bootstrap|.
 00:00:02 W Clobber not needed.
 00:00:02 Using Python 3.11.7 from C:\Users\petar\.mozbuild\srcdirs\.engine-85880bfd97d0\_virtualenvs\build\Scripts\python.exe
 00:00:02 Adding configure options from D:\Projects\blazing-bunny\.engine\mozconfig
 00:00:02   --with-app-name=blazing-bunny-browser
 00:00:02   --enable-bootstrap
 00:00:02   --target=x86_64-pc-mingw32
 00:00:02   --enable-js-shell
 00:00:02   --enable-rust-simd
 00:00:02   --enable-crashreporter
 00:00:02   --disable-debug
 00:00:02   --disable-geckodriver
 00:00:02   --disable-profiling
 00:00:02   --disable-tests
 00:00:02   --with-branding=browser/branding/unofficial
 00:00:02   --enable-unverified-updates
 00:00:02   --enable-update-channel=unofficial
 00:00:02   MOZ_APP_BASENAME=blazing-bunny-browser
 00:00:02   MOZ_APP_PROFILE=blazing-bunny-browser
 00:00:02   MOZ_SOURCE_REPO=https://github.com/example/example
 00:00:02   MOZ_APP_VENDOR=Blazing Bunny
 00:00:02   MOZ_USER_DIR=Blazing Bunny
 00:00:02   MOZ_APPUPDATE_HOST=localhost:7648
 00:00:02   MOZ_STUB_INSTALLER=1
 00:00:02   MOZ_INCLUDE_SOURCE_INFO=1
 00:00:02   MOZ_SOURCE_CHANGESET=470a98c94a0663a6fee1d3376d9751d46c1bf566
 00:00:02   MOZ_DISTRIBUTION_ID=com.leptr.blazingbunny
 00:00:02   MOZ_APP_DISPLAYNAME=Blazing Bunny
 00:00:02   MOZ_MACBUNDLE_ID=com.leptr.blazingbunny
 00:00:02 checking for vcs source checkout... git
 00:00:02 checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe
 00:00:02 checking for host system type... x86_64-pc-windows-msvc
 00:00:02 checking for target system type... x86_64-pc-mingw32
 00:00:02 checking whether cross compiling... yes
 00:00:02 Traceback (most recent call last):
 00:00:02   File "D:\Projects\blazing-bunny\.engine\configure.py", line 351, in <module>
 00:00:02     sys.exit(main(sys.argv))
 00:00:02              ^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\configure.py", line 141, in main
 00:00:02     sandbox.run()
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 522, in run
 00:00:02     self._value_for(option)
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 627, in _value_for
 00:00:02     return self._value_for_option(obj)
 00:00:02            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\util.py", line 916, in method_call
 00:00:02     cache[args] = self.func(instance, *args)
 00:00:02                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\__init__.py", line 662, in _value_for_option
 00:00:02     value, option_string = self._helper.handle(option)
 00:00:02                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\options.py", line 594, in handle
 00:00:02     ret = option.get_value(arg, origin)
 00:00:02           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 00:00:02   File "D:\Projects\blazing-bunny\.engine\python\mozbuild\mozbuild\configure\options.py", line 427, in get_value
 00:00:02     raise InvalidOptionError(
 00:00:02 mozbuild.configure.options.InvalidOptionError: MOZ_APP_VENDOR=Blazing Bunny can not be set by mozconfig. Values are accepted from: implied
 00:00:03 W Exception when writing resource usage file: [Errno 2] No such file or directory: 'D:/Projects/blazing-bunny/.engine/obj-x86_64-pc-mingw32\\.mozbuild\\profile_build_resources.json'
 00:00:03  Config object not found by mach.
 00:00:03 *** Fix above errors and then restart with "./mach build"

 00:00:03 Total build time: 3 seconds.

samurai commit output:

 00:00:00 Committing Blazing Bunny...
[main 470a98c] chore: commit
 20 files changed, 132 insertions(+)
 create mode 100644 .vscode/settings.json
 create mode 100644 configs/common/mozconfig
 create mode 100644 configs/linux/mozconfig
 create mode 100644 configs/macos/mozconfig
 create mode 100644 configs/windows/mozconfig
 create mode 100644 samurai.json
 create mode 100644 src/README.md
 create mode 100644 src/browser/themes/custom/linux/linux.inc.css
 create mode 100644 src/browser/themes/custom/macos/macos.inc.css
 create mode 100644 src/browser/themes/custom/shared/shared.inc.css
 create mode 100644 src/browser/themes/custom/windows/windows.inc.css
 create mode 100644 src/browser/themes/linux/browser-css.patch
 create mode 100644 src/browser/themes/linux/jar-mn.patch
 create mode 100644 src/browser/themes/osx/browser-css.patch
 create mode 100644 src/browser/themes/osx/jar-mn.patch
 create mode 100644 src/browser/themes/shared/browser-shared-css.patch
 create mode 100644 src/browser/themes/shared/jar-inc-mn.patch
 create mode 100644 src/browser/themes/windows/browser-css.patch
 create mode 100644 src/browser/themes/windows/jar-mn.patch
git: 'push origin main --set-upstream' is not a git command. See 'git --help'.

   ERROR An error occurred while running command ["commit"]:

         Error: Command failed with exit code 1: git push origin main --set-upstream

         • handlePromise (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\execa@5.1.1\node_modules\execa\index.js:118:26)
         • process.processTicksAndRejections (node:internal/process/task_queues:95:5)
         • async commit (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\commands\commit.js:35:5)

 00:00:00 Exiting due to error.

we are getting closer to figuring this out!

As a temporary workaround, you can open up the file "/configs/common/mozconfig" on your project, remove the below line, and try to restart the build.

export MOZ_APP_VENDOR="${vendor}"
leptr commented 1 month ago

Hey @binary-blazer! That did help and I was able to complete the bootstrap and the build without any issues! However, I ran into a new issue when I ran "samurai set brand stable":

C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\index.js:37
        value: brandConfig.release.displayVersion,
                                   ^

TypeError: Cannot read properties of undefined (reading 'displayVersion')
    at Object.<anonymous> (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\index.js:37:36)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.12.2
leptr commented 1 month ago

Hey @binary-blazer! That did help and I was able to complete the bootstrap and the build without any issues! However, I ran into a new issue when I ran "samurai set brand stable":

C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\index.js:37
        value: brandConfig.release.displayVersion,
                                   ^

TypeError: Cannot read properties of undefined (reading 'displayVersion')
    at Object.<anonymous> (C:\Users\petar\AppData\Local\pnpm\global\5\.pnpm\@praxive+samurai@1.1.2\node_modules\@praxive\samurai\dist\index.js:37:36)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.12.2

And apparently, now this error happens when I run samurai build as well. I was able to bypass this by editing the line in the index.js file and replacing value: brandConfig.release.displayVersion, with value: "1.0.0",, and now I can set the brand and build properly.

binary-blazer commented 1 month ago

@leptr I'm closing this issue for now as the topic issue is fixed. For the new issue, please refer to: https://github.com/PraxiveSoftware/Samurai/issues/47