Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brave silent setup is not silent #6240

Closed
NZ-HIPS opened this issue Sep 30, 2019 · 33 comments · Fixed by brave/brave-core#8364
Closed

brave silent setup is not silent #6240

NZ-HIPS opened this issue Sep 30, 2019 · 33 comments · Fixed by brave/brave-core#8364

Comments

@NZ-HIPS
Copy link

NZ-HIPS commented Sep 30, 2019

Description

A silent setup is hardly silent as it results in starting the brave browser at the end of the installation process. This hinders some applications, like unattended deployment, as the synchronous installation process can not proceed until a user closes the window.

Steps to Reproduce

  1. Download a silent installer from https://github.com/brave/brave-browser/releases
  2. (Silently) Install
  3. Observe browser being executed at the end of silent installation

Actual result:

bug

(brave silent setup doesn't return to command line)

Expected result:

Would install, then return to the command line.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave | 0.72.60 Chromium: 77.0.3865.90 (Official Build) nightly (64-bit)
Revision | 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS | Windows 10 OS Version 1809 (Build 17763.1)

Version/Channel Information:

Occurs at least in both the release and nightly channels.

  • Can you reproduce this issue with the current release?
    Yes. (v0.68.142)

  • Can you reproduce this issue with the beta channel?
    Didn't try.

  • Can you reproduce this issue with the dev channel?
    Didn't try.

  • Can you reproduce this issue with the nightly channel?
    Yes. (v0.72.60)

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
    N/A
  • Does the issue resolve itself when disabling Brave Rewards?
    N/A
  • Is the issue reproducible on the latest version of Chrome?
    No (using msi with /q switch).
@bsclifton
Copy link
Member

@mbacchi we did have a version that doesn't auto-launch (which we used for the Muon upgrade). We don't still package that though, do we?

@rebron rebron added build priority/P4 Planned work. We expect to get to it "soon". labels Oct 15, 2019
@cascadeth
Copy link

cascadeth commented Mar 11, 2020

Saw a comment on a community post about requesting an MSI installer. +1'ing that.

@runout-at
Copy link

any news on that?

we want to deploy brave with ansible on windows.

@HorNet505
Copy link

HorNet505 commented Apr 9, 2020

google for the "BraveBrowserStandaloneSilentBetaSetup.exe"
But yes, a current MSI installer would be great

@mbacchi
Copy link
Contributor

mbacchi commented Apr 23, 2020

I've opened issue #9418 to provide an MSI package for unattended installation. I'll leave this issue open for the moment, to track the initial request.

@haavarstein
Copy link

Any updates? Looking forward to the MSI file

@kjozwiak
Copy link
Member

kjozwiak commented Jan 5, 2021

CCing @mihaiplesa ☝️

@Apfelwurm
Copy link

Hi, i would deploy all my friends machines with Brave in the future if someday a silent installation is possible! This would be really cool!

@mherrmann
Copy link

mherrmann commented Mar 24, 2021

The problem still occurs with Nightly v1.24.17. That is, BraveBrowserStandaloneSilentNightlySetup.exe launches a browser window.

@mherrmann
Copy link

There also do not seem to be command-line arguments that can be passed to BraveBrowserStandaloneSilentNightlySetup.exe to prevent the browser window from opening. In particular, /silent, /silent /install and --silent all produce errors.

The reason for this seems to be the following: The silent standalone installer passes its command line arguments on to Brave's auto-update framework Omaha. Specifically: Without any arguments, the installer invokes BraveUpdate.exe /silent /install "appguid={Brave's UID}&...". With arguments, it passes those into the command line instead of /silent /install. Additionally, it passes &silent. So /foo invokes BraveUpdate.exe /foo "appguid=...&silent&...". BraveUpdate.exe is Omaha's binary that installs and uninstalls apps and Omaha. I don't see an easy way how this could be used to suppress the opening of a window. My suspicion is that it's not Omaha that opens the window but Brave's own installer.

People looking for a workaround can follow the instructions here. They happen to work at the moment, but are currently not officially supported. Also, this way of installing Brave does not set up Brave's auto-update mechanism.

@bsclifton
Copy link
Member

We have manually worked around this in the past - basically when tagging the installer, we can include the silent attribute. There is a launch after install attribute - maybe @mihaiplesa still has a link to the patch we used. The only use-case we had for this originally was for Muon when migrating to Brave Core (we wanted to install browser without launching; as first launch did the import). I'll dig through notes and see what I can find

Having a proper silent install would be great until we're able to look at MSI (captured with #9418)

@bsclifton
Copy link
Member

@mherrmann found it - here's a PR (example) that we used to prevent it from launching. It would be great if the silent installer was created using this:
https://github.com/brave/omaha/pull/13/files

@mherrmann
Copy link

@bsclifton my PRs above fix StandaloneSilentSetup.exe but not SilentSetup.exe. The technique I'm using won't work to fix SilentSetup.exe and I don't see an easy way to fix SilentSetup.exe. I'm wondering if SilentSetup.exe is required at all if StandaloneSilentSetup.exe is available. Can I pose the radical question and ask whether we can simply no longer offer SilentSetup.exe?

Some technical detail: The difference between SilentSetup.exe and StandaloneSilentSetup.exe is that the former is just a small 1 MB online installer that downloads the latest version of Brave from the update server. The reason why my technique won't work is that the update server determines whether the installer launches a browser window. Specifically, the server would have to respond "invoke the internal Brave installer with argument --do-not-launch-chrome". But the update server doesn't know whether the installation is to be performed silently. So it can either never open a browser window (also for normal, non-silent installations), or always. The reason why StandaloneSilentSetup works is that this binary is created by essentially hard-coding a server response. In this hard-coded response, it is possible to supply --do-not-launch-chrome.

I can only think of hacky not-nice workarounds to prevent SilentSetup from opening a browser window. Hence my question whether this installer is really needed :-)

@mherrmann
Copy link

Actually, there might be a way to prevent SilentSetup.exe from opening a browser window: It is possible to encode an installdataindex in SilentSetup.exe that is then sent by Omaha to the server. This lets the server return a master_preferences file, which is supposed to support a property "skip_first_run_ui" : true that suppresses the browser window. I'd be happy to look into this approach, but am still wondering whether it is worth the effort.

@bsclifton
Copy link
Member

bsclifton commented Mar 28, 2021

I think removing SilentSetup.exe would be just fine 😄 Most folks wanting a silent install (ex: MSI) want to distribute / install the package themselves so they can avoid multiple machines fetching the same data / eating up network

I think there are only three install types we need to cover:

  1. Stub installers: convenient because the binary being distributed to client never changes. Fetches "whatever the latest is" from server. I'm aware of some integrations which automate the install using this binary - they're initiated by the user and having the UI open after install is fine. Only available on Windows (wish macOS had a similar way to install)
  2. Standalone installer: will go out of date but installs a specific version without reaching out over network. This is critical for cases where we want to bisect when a bug was introduced... we can install specific versions to to see if problem is present / not present to narrow down the range of the bug / regression. This would be a user-initiated install and having the UI open after install is fine.
  3. Silent installer: what enterprises would likely want to use. Needs to also be a standalone installer since enterprise can qualify the bits and distribute internally without any machine making outbound network calls. No UI present (during install or post launch) to help with automation

@mihaiplesa
Copy link
Contributor

Yes, les's look into a proper silent installer until we have the bandwidth to look into MSI (or till next Omaha protocol version comes out).

@mherrmann
Copy link

Hey @mihaiplesa, I'm afraid I don't understand your comment in the context of this discussion. @bsclifton and I were talking about getting rid of SilentSetup.exe (1 MB online installer, opens a browser window) because after my PR above the existing StandaloneSilentSetup.exe will be truly silent. Do you agree that it's okay to remove SilentSetup.exe because people can use StandaloneSilentSetup.exe instead?

@mihaiplesa
Copy link
Contributor

mihaiplesa commented Apr 1, 2021

Re-reading again now - it makes sense to remove the silent online installer and fix the offline one, thanks.

@sachinmarathe
Copy link

Excuse me, but the installation is not silent yet. tried this on Windows 10 by double clicking 1.22.72.exe, as well as using command line. A new page still pops up at the end. furthermore if it is included in the windows 10 installation iso, the resulting brave installation does not work. it does not launch, and needs to be reinstalled.

@mherrmann
Copy link

@sachinmarathe I think this fix is first included with 1.25.x nightly snapshots. What you wrote seems to indicate you're using 1.22. Or am I missing something?

@sachinmarathe
Copy link

no you are not missing anything. i guess i missed some:) i thought this was merged with the stable version as well. i did try nightly in the meantime. works flawlessly.

@mherrmann
Copy link

Happy to hear it's working! :)

@cahalpin
Copy link

Will the truly silent install be included in a stable release soon? Wanting to deploy Brave silently across my organization but do not want to use a Nightly release in production environment.

@mihaiplesa
Copy link
Contributor

@cahalpin it will be in the next beta and dev releases and naturally uplifted to stable channel in less that 3 weeks.

@cahalpin
Copy link

Great, thanks!

@bsclifton
Copy link
Member

Nice work @mherrmann 😄👍

@mherrmann
Copy link

Thanks @bsclifton! 😄

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented May 24, 2021

Verification passed on

Brave | 1.25.66 Chromium: 91.0.4472.70 (Official Build) (64-bit)
-- | --
Revision | fe095368270a32c92959403754bf6fd357dd9953-refs/branch-heads/4472@{#1172}
OS | Windows 10 OS Version 2004 (Build 19041.985)
Windows 10 x64_Installers Test

Clean profile

Ensured stand-alone installers (BraveBrowserStandaloneSetup.exe) are working as expected
Ensured stand-alone silent installers (BraveBrowserStandaloneSilentSetup.exe) are working as expected
Ensured stub installers (BraveBrowserSetup.exe) are working as expected
Ensured test channel stub installers (BraveBrowserSetup-64-r-test.exe) are working as expected

Upgrade profile

  • Installed 1.24.x stand-alone installer and upgraded profile to 1.25.x stand-alone installer and ensured stand-alone installer is working as expected
  • Installed 1.24.x stand-alone silent installer and upgraded profile to 1.25.x stand-alone silent installer and ensured stand-alone silent installer file is working as expected
  • Installed 1.24.x stand-alone installer/stub installer and upgraded profile to 1.25.x stand-alone installer and ensured stand-alone installer is working as expected
  • Installed 1.24.x stand-alone installer and upgraded profile to 1.25.x test channel stub installer (BraveBrowserSetup-64-r-test.exe) and ensured profile is upgraded to 1.25.x test channel and confirmed test installers are working as expected

Verification PASSED on Win 8.1 x86 using the following build:

Brave | 1.25.68 Chromium: 91.0.4472.77 (Official Build) (64-bit)
--- | --
Revision | 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS | Windows 8.1 (Build 9600.20018)
Win 8.1 x86 verification/results

Clean Installs

Went through the following executables and ensured they were working as expected:

As per #6240, also installed BraveBrowserStandaloneSilentSetup32.exe using:

start /wait /b BraveBrowserStandaloneSilentSetup32.exe

Upgrades

  • Upgraded 1.24.86 Chromium: 90.0.4430.212 --> 1.25.68 Chromium: 91.0.4472.77 using BraveBrowserStandaloneSetup32.exe without any issues
  • Upgraded 1.24.86 Chromium: 90.0.4430.212 --> 1.25.68 Chromium: 91.0.4472.77 using BraveBrowserStandaloneSilentSetup32.exe without any isuses

Verification PASSED on Win 10 x86 using the following build:

Brave	1.25.68 Chromium: 91.0.4472.77 (Official Build) (32-bit)
Revision	1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS	Windows 10 OS Version 2009 (Build 19042.870)
Win 10 x86 verification/results

Clean Installs

Went through the following executables and ensured they were working as expected:

As per #6240, also installed BraveBrowserStandaloneSilentSetup32.exe using:

start /wait /b BraveBrowserStandaloneSilentSetup32.exe

Upgrades

  • Upgraded 1.24.86 Chromium: 90.0.4430.212 --> 1.25.68 Chromium: 91.0.4472.77 using BraveBrowserStandaloneSetup32.exe without any issues
  • Upgraded 1.24.86 Chromium: 90.0.4430.212 --> 1.25.68 Chromium: 91.0.4472.77 using BraveBrowserStandaloneSilentSetup32.exe without any isuses

Verification passed on

Brave 1.25.68 Chromium: 91.0.4472.77 (Official Build) (32-bit)
Revision 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS Windows 7 Service Pack 1 (Build 7601.24544)
Went through the following executables and ensured they were working as expected:

Verified BraveBrowserStandaloneSilentSetup32.exe did not launch the browser after installation

Verification passed on

Brave 1.25.68 Chromium: 91.0.4472.77 (Official Build) (64-bit)
Revision 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS Windows 7 Service Pack 1 (Build 7601.24544)
Went through the following executables and ensured they were working as expected:

Verified BraveBrowserStandaloneSilentSetup.exe did not launch the browser after installation

@AndreusUltimus
Copy link

AndreusUltimus commented Sep 4, 2021

As of today and the latest stable build:
https://github.com/brave/brave-browser/releases/download/v1.29.77/BraveBrowserStandaloneSilentSetup.exe

the silent installer opens Brave at the end of an otherwise silent install.

Win 10 Pro, Brave already installed.

@mherrmann
Copy link

@Andrewww I cannot reproduce this behavior. What I did:

  1. Install Brave 1.29.77 with the standalone silent installer. As expected, Brave is installed silently and I can afterwards launch it on my system.
  2. Run the installer again. As expected, Brave does not open. It's still on my system and I can launch it as usual.

@ghost
Copy link

ghost commented Mar 13, 2022

Please an msi/msix release of brave, that would be awesome.

@Fchen48
Copy link

Fchen48 commented Aug 14, 2023

2023 and still no MSI available???

@BitshapedRob
Copy link

2024 and still no MSI available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment