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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: chrome.action API registration #40500

Merged
merged 2 commits into from Nov 13, 2023
Merged

fix: chrome.action API registration #40500

merged 2 commits into from Nov 13, 2023

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Nov 10, 2023

Description of Change

Closes #36545

Fixes an issue with correct uncompiled source registration:

[12932:1013/112709.120:ERROR:extensions_browser_client.cc(69)] Extension Error:
  OTR:     false
  Level:   2
  Source:
  Message: Error handling response: TypeError: Cannot read properties of undefined (reading 'setIcon')
    at setExtensionIconAndPopup (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/background.js:1:1614)
    at checkAndHandleRestrictedPageIfSo (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/background.js:1:2090)
    at Array.forEach (<anonymous>)
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/background.js:1:2146
  ID:      fmkadmapgofadopljbjfkapdkoienihi
  Type:    RuntimeError
  Context:
  Stack Trace:
    {
      Line:     0
      Column:   1
      URL:
      Function: (anonymous function)
    }

This was happening because action.json is a different type of extension impl format, and we need to register functions from the sources. This fixes the issue, which means that React DevTools finally loads without errors 馃コ

Also adds some tests to prevent this regressing.

Checklist

Release Notes

Notes: Fixed a unexpectedly thrown error in some unsupported chrome extensions.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. labels Nov 10, 2023
@electron-cation electron-cation bot added the new-pr 馃尡 PR opened in the last 24 hours label Nov 10, 2023
@electron-cation electron-cation bot removed the new-pr 馃尡 PR opened in the last 24 hours label Nov 11, 2023
@codebytere codebytere merged commit 7981d95 into main Nov 13, 2023
17 checks passed
@codebytere codebytere deleted the fixup-set-icon branch November 13, 2023 07:27
Copy link

release-clerk bot commented Nov 13, 2023

Release Notes Persisted

Fixed a unexpectedly thrown error in some unsupported chrome extensions.

@trop
Copy link
Contributor

trop bot commented Nov 13, 2023

I have automatically backported this PR to "26-x-y", please check out #40512

@trop trop bot added in-flight/26-x-y and removed target/26-x-y PR should also be added to the "26-x-y" branch. labels Nov 13, 2023
@trop
Copy link
Contributor

trop bot commented Nov 13, 2023

I have automatically backported this PR to "27-x-y", please check out #40513

@trop
Copy link
Contributor

trop bot commented Nov 13, 2023

I have automatically backported this PR to "28-x-y", please check out #40514

@trop trop bot added in-flight/27-x-y in-flight/28-x-y merged/28-x-y PR was merged to the "28-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. and removed target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. in-flight/28-x-y in-flight/26-x-y labels Nov 13, 2023
@trop trop bot removed the in-flight/27-x-y label Nov 13, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Failed to load React Devtools
2 participants