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

Stub installer to first run conversion #2784

Closed
bbondy opened this issue Jan 2, 2019 · 5 comments
Closed

Stub installer to first run conversion #2784

bbondy opened this issue Jan 2, 2019 · 5 comments

Comments

@bbondy
Copy link
Member

bbondy commented Jan 2, 2019

Description

We currently have stub installer download vs first run mismatch. This issue is to investigate how to improve that with a ping for stub installer successfully run, base installer downloaded, and installer run.

Test Plan

Tests require running a packet sniffer like Fiddler or coordinating with @aekeus to view server logs. You can set the BRAVE_UPDATE_SERVER environment variable to point to the staging server for testing purposes.

Testing with No Referral Code

  • Download a stub installer with no referral code
  • Run the installer to completion
  • Verify that we successfully sent a startup, download-complete, and installer-run ping to the update server
  • Verify that all 3 pings include ref=none

Testing with Unwhitelisted Referral Code

Referral code whitelist is viewable here: https://github.com/brave/omaha/pull/19/files#diff-ce3476268c7af8bc284a899b3c716e29R187

  • Download a stub installer with a referral code not appearing on our referral code whitelist
  • Run the installer to completion
  • Verify that we successfully sent a startup, download-complete, and installer-run ping to the update server
  • Verify that all 3 pings include ref=none

Testing with Whitelisted Referral Code

  • Download a stub installer with a referral code appearing on our referral code whitelist
  • Run the installer to completion
  • Verify that we successfully sent a startup, download-complete, and installer-run ping to the update server
  • Verify that all 3 pings include ref=XXXYYY, where XXXYYY is a whitelisted referral code

CC @aekeus

@emerick
Copy link
Contributor

emerick commented Jan 7, 2019

@mbacchi Still working on finalizing this change, but wanted to give you a heads up that this is planned for Hotfix 2 and will require a new build of Omaha when it lands.

@btlechowski
Copy link

btlechowski commented Jan 10, 2019

Big thanks to @emerick for helping out with the setup!

Fiddler Setup

In Fiddler go Tools -> Options -> HTTPS
Check Decrypt HTTPS traffic and install all the certificates.

Configuring WinHTTP’s Proxy

On Windows 8/10 x86 x64, Stub Installer 32 and 64 bit:

In cmd.exe with administrative privileges, run

cd C:\Windows\system32
netsh winhttp set proxy 127.0.0.1:8888 "<-loopback>"

On Windows 7 x64, Stub Installer 64 bit; On Windows 7 x86, Stub Installer 32 bit:

In cmd.exe with administrative privileges, run

cd C:\Windows\system32
netsh winhttp set proxy 127.0.0.1:8888 "<-loopback>"

On Windows 7 x64, Stub Installer 32 bit:

In cmd.exe with administrative privileges, run

cd c:\Windows\SysWOW64
netsh winhttp set proxy 127.0.0.1:8888 "<-loopback>"

Important: The server code is not on production yet, it will be 11-01-2019. So all the pings will have 404.
Use env var: BRAVE_UPDATE_SERVER=laptop-updates-pre.brave.com to change server to preproduction

This is how it should look when everything is fine:
fiddler_stub

Notes:

  • There are two types of stub installers(silent: BraveBrowserSilentSetup and regular BraveBrowserSetup). When it comes to pings, both should behave the same according to @emerick
  • Currently the stub installer downloads 0.58.18 version of brave, but this doesn't matter because all the pings are done by stub installer and helper process(braveupdate.exe). Info verified by @emerick .
  • Clean install for silent installer:
    Uninstall Brave though Control Panel
    Delete Download and Install from [user]\AppData\Local\BraveSoftware\Update\
  • Clean install for regular installer:
    Uninstall Brave though Control Panel
    Delete Download and Install from c:\Program Files (x86)\BraveSoftware\Update\

@btlechowski
Copy link

btlechowski commented Jan 11, 2019

Verification Passed for BraveBrowserSilentSetup.exe v0.58.20 on Windows 7 x64.

No referral code - clean install:
image

Unwhitelisted Referral Code (used BAR421) - clean install:
image

Whitelisted Referral Code (used ZTT758) - clean install
image

Whitelisted Referral Code (used ZTT758) - installed over above clean install
image
IMPORTANT: the build is not really downloaded, because it is in updater cache from previous install, yet the download-complete ping is fired.

@btlechowski
Copy link

Verification Passed for BraveBrowserSilentSetup.exe v0.58.20 on Windows 10 x64.

No referral code - clean install:
stub_silent_noref

Unwhitelisted Referral Code (used BLE342) - clean install:
stub_silent_ble342_ref

Whitelisted Referral Code (used MTS962) - clean install
stub_silent_mts962_ref

@kjozwiak
Copy link
Member

Thanks for gathering all the info and going through this issue @btlechowski 👍

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