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

First run dialog is unskippable on windows #24082

Closed
ubergeek42 opened this issue Jul 15, 2022 · 6 comments
Closed

First run dialog is unskippable on windows #24082

ubergeek42 opened this issue Jul 15, 2022 · 6 comments

Comments

@ubergeek42
Copy link

Description

There is no way to skip/hide the first run dialog on windows. The dialog only offers to set brave as the default browser, but if it is already the default browser the window is shown anyway.

image

Steps to Reproduce

  1. Install brave, open it, set it as the default browser
  2. Delete the brave profile settings (%LOCALAPPDATA%/BraveSoftware)
  3. Launch brave, observe the first run dialog

Actual result:

The dialog is always shown, even if brave is already the default browser

Expected result:

The first run dialog to be skipped if brave is the default browser (or a preference/policy to skip this first run dialog. For chrome on linux/mac, that's the MetricsReportingEnabled policy, but there's no equivalent in brave for windows).

Reproduces how often:

Every time.

Brave version (brave://version info)

image

Version/Channel Information:

Didn't try, but looking at the source code on master it seems likely to still be an issue in all channels.

Other Additional Information:

N/A

Miscellaneous Information:

I use brave in a virtual machine for testing, and wipe the profile/reprovision the machine frequently. I have scripts to set Brave as the default browser after installing it, but it still nags me which interrupts my testing workflow.

The --no-first-run flag is not sufficient, as while it suppresses the first run dialog, it also skips processing the initial_preferences/master_preferences file, which I use to configure a few things.

This PR seems to be where this was added: brave/brave-core#12482
Probably a check if brave is already the default browser could be added here: https://github.com/brave/brave-core/blob/6103fb3d7a7ee200a1b4b9f4bdf399db117e030d/chromium_src/chrome/browser/first_run/first_run_internal_win.cc#L11-L17

That'd be similar to how chrome does it when checking for the MetricsReportingEnabled policy on other platforms (see: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/first_run/first_run_internal_posix.cc;l=56-62;bpv=0;bpt=1)

@bsclifton
Copy link
Member

@ubergeek42 thanks for the report - I can definitely see how this could break you if you're using Selenium or something like that

Do you have more information about your setup?

@ubergeek42
Copy link
Author

Exactly, my test harness doesn't expect the dialog to be there, so it causes some issues I have to annoyingly work around. My current workaround is to launch Brave, the nag appears, so I sleep for a bit to make sure the profile is fully initialized, then kill brave and launch it again. The second run skips the nag because the profile directory was created by the first run. I frequently wipe the profile directory to clear everything out and this extra step feels very unclean/slows things down.

@shvchk
Copy link

shvchk commented Nov 22, 2023

You can use PromotionalTabsEnabled policy set to false to skip welcome screen.

If you want to disable telemetry, you can use MetricsReportingEnabled (controls sending diagnostic reports) and UrlKeyedAnonymizedDataCollectionEnabled (not sure if does anything in Brave) policies, and pre-create Local State file (on Windows it should be in %LocalAppData%/BraveSoftware/Brave-Browser/User Data) with the following contents:

{"brave":{"p3a":{"enabled":false},"stats":{"reporting_enabled":false}}}

— this will disable P3A and usage pings. No other content in %LocalAppData%/BraveSoftware/Brave-Browser/User Data needed.

@bsclifton
Copy link
Member

cc: @simonhong - do you know if there's a way to skip this?

I believe we do have logic about if Brave is already default (even if another channel), don't offer it. But I can't remember

@simonhong
Copy link
Member

We don't use first run dialog anymore as we have it in welcome flow. brave/brave-core#16282

@bsclifton
Copy link
Member

Oh yeah, that's right! Thanks @simonhong 😄
Closing as fixed

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

No branches or pull requests

4 participants