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

[Desktop] Brave components don't get updated until a browser restart #10271

Closed
bridiver opened this issue Jun 15, 2020 · 1 comment · Fixed by brave/brave-core#5847
Closed

Comments

@bridiver
Copy link
Contributor

bridiver commented Jun 15, 2020

Description

Brave components under brave://components do not get updated/reloaded without browser restart.

Updating works correctly when browser is restarted.

Steps to Reproduce

Tested with SpeedReader component:

  1. Launch the browser. Must be running before step 2. To use dev package version launch browser with --use-dev-goupdater-url flag, for logging --enable-logging=stderr --v=0 --vmodule=brave_component=2
    Log should include approximately (version and timestamps would be different)
[49382:775:0615/130941.415990:ERROR:brave_component.cc(56)] component updated: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "...",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.2"
}
  1. Publish a new component package via crx-packager (to publish dev version use https://ci.brave.com/view/all/job/brave-core-ext-speedreader-data-files-update-publish-dev/ > Build With Parameters > Build)
  2. Under brave://components after a while click “Check for update” for the component. It should pick up the update, update the version number and show good status
  3. New record for the same component with a higher version does not appear in logs

Actual result:

OnComponentReady inherited from BraveComponent does not get called when component gets updated without browser restart.

In the case of Speedreader, rewriting rules do not get updated.

brave://components shows correct component version and status.

Expected result:

OnComponentReady inherited from BraveComponent should get called when component gets updated via brave://components

In the case of Speedreader, rewriting rules should get updated and active without browser restart.

There should be two copies of log records similar to

[49382:775:0615/130941.415990:ERROR:brave_component.cc(56)] component updated: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "...",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.2"
}

without a browser restart and with different version numbers

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.12.14 Chromium: 83.0.4103.97 (Official Build) nightly (64-bit)
Revision 326d148b9655369b86498d9ecca39f63dd2bdd2d-refs/branch-heads/4103@{#657}
OS macOS Version 10.15.4 (Build 19E287)

Version/Channel Information:

  • Can you reproduce this issue with the current release? yes
  • Can you reproduce this issue with the beta channel? yes
  • Can you reproduce this issue with the dev channel? yes
  • Can you reproduce this issue with the nightly channel? yes

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

Miscellaneous Information:

@kjozwiak
Copy link
Member

kjozwiak commented Jul 9, 2020

Verification PASSED on macOS 10.15.5 x64 using the following build:

Brave | 1.11.92 Chromium: 84.0.4147.68 (Official Build) dev (64-bit)
-- | --
Revision | e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS | macOS Version 10.15.5 (Build 19F101)

Launched 1.11.92 CR: 84.0.4147.68 and ensured the following component was downloaded:

[14686:775:0709/005734.924394:VERBOSE2:brave_component.cc(59)] component ready: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "...",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.11"
}

Updated the component via https://ci.brave.com/view/all/job/brave-core-ext-speedreader-data-files-update-publish-dev/11/ and waited ~10min. Went into brave://components and updated Brave SpeedReader Updater as per the following:

[14686:775:0709/013055.661526:VERBOSE2:brave_component.cc(59)] component ready: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "...",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.12"
}

Verification passed on

Brave 1.11.92 Chromium: 84.0.4147.68 (Official Build) dev (64-bit)
Revision e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS Ubuntu 18.04 LTS

Verified test plan from the description

On launch:

[12351:12351:0709/140729.376308:VERBOSE2:brave_component.cc(59)] component ready: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3j/+grwCsrYVA99oDHa+E9z5edPIV3J+lzld3X7K8wfJXbSauGf2DSxW0UEh+MqkkcIK/66Kkd4veuWqnUCAGXUzrHVy/N6kksDkrScOlpKT9zfyIvLc/4nmiyPCSc5c7UrDVUwZnIUBBpEHiwkpiM4pujeJkZSl5783RWIDRN92GDBdHMdD97JH3bPp3SCTmfAAHzzYUAHUSrOAfodD8qWkfWT19VigseIqwK6dH30uFgaZIOwU9uJV2Ts/TDEddNv8eV7XbwQdL1HUEoFj+RXDq1CuQJjvQdc7YRmy0WGV0GIXu0lAFOQ6D/Z/rjtOe//2uc4zIkviMcUlrvHaJwIDAQAB",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.12"
}

After component was updated:

[12351:12351:0709/142543.634680:VERBOSE2:brave_component.cc(59)] component ready: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3j/+grwCsrYVA99oDHa+E9z5edPIV3J+lzld3X7K8wfJXbSauGf2DSxW0UEh+MqkkcIK/66Kkd4veuWqnUCAGXUzrHVy/N6kksDkrScOlpKT9zfyIvLc/4nmiyPCSc5c7UrDVUwZnIUBBpEHiwkpiM4pujeJkZSl5783RWIDRN92GDBdHMdD97JH3bPp3SCTmfAAHzzYUAHUSrOAfodD8qWkfWT19VigseIqwK6dH30uFgaZIOwU9uJV2Ts/TDEddNv8eV7XbwQdL1HUEoFj+RXDq1CuQJjvQdc7YRmy0WGV0GIXu0lAFOQ6D/Z/rjtOe//2uc4zIkviMcUlrvHaJwIDAQAB",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.13"
}

image


Verification passed on


Brave | 1.11.92 Chromium: 84.0.4147.68 (Official Build) dev (64-bit)
-- | --
Revision | e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS | Windows 10 OS Version 1903 (Build 18362.900)


Verified test plan from the description

On launch:

[9744:16028:0709/202725.881:VERBOSE2:brave_component.cc(59)] component ready: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3j/+grwCsrYVA99oDHa+E9z5edPIV3J+lzld3X7K8wfJXbSauGf2DSxW0UEh+MqkkcIK/66Kkd4veuWqnUCAGXUzrHVy/N6kksDkrScOlpKT9zfyIvLc/4nmiyPCSc5c7UrDVUwZnIUBBpEHiwkpiM4pujeJkZSl5783RWIDRN92GDBdHMdD97JH3bPp3SCTmfAAHzzYUAHUSrOAfodD8qWkfWT19VigseIqwK6dH30uFgaZIOwU9uJV2Ts/TDEddNv8eV7XbwQdL1HUEoFj+RXDq1CuQJjvQdc7YRmy0WGV0GIXu0lAFOQ6D/Z/rjtOe//2uc4zIkviMcUlrvHaJwIDAQAB",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.4"
}

After component was updated:

[18664:12548:0709/181939.645:VERBOSE2:brave_component.cc(59)] component ready: {
   "data_file_version": "1",
   "description": "Brave SpeedReader Updater extension",
   "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3j/+grwCsrYVA99oDHa+E9z5edPIV3J+lzld3X7K8wfJXbSauGf2DSxW0UEh+MqkkcIK/66Kkd4veuWqnUCAGXUzrHVy/N6kksDkrScOlpKT9zfyIvLc/4nmiyPCSc5c7UrDVUwZnIUBBpEHiwkpiM4pujeJkZSl5783RWIDRN92GDBdHMdD97JH3bPp3SCTmfAAHzzYUAHUSrOAfodD8qWkfWT19VigseIqwK6dH30uFgaZIOwU9uJV2Ts/TDEddNv8eV7XbwQdL1HUEoFj+RXDq1CuQJjvQdc7YRmy0WGV0GIXu0lAFOQ6D/Z/rjtOe//2uc4zIkviMcUlrvHaJwIDAQAB",
   "manifest_version": 2,
   "name": "Brave SpeedReader Updater",
   "version": "1.0.13"
}

@rebron rebron changed the title Brave components don't actually update until restart [Desktop] Brave components don't get updated until a browser restart Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment