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

Chrome Extensions issues #66

Closed
raphael10-collab opened this issue Oct 26, 2022 · 3 comments
Closed

Chrome Extensions issues #66

raphael10-collab opened this issue Oct 26, 2022 · 3 comments

Comments

@raphael10-collab
Copy link

I've put this sample Chrome Extension : https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/examples/page-redder in `extension' folder:

raphy@pc:~/electron-browser-shell/extensions$ ls -lah
total 16K
drwxrwxr-x 3 raphy raphy 4,0K ott 26 14:03 .
drwxrwxr-x 8 raphy raphy 4,0K ott 25 18:36 ..
-rw-rw-r-- 1 raphy raphy    0 ott 25 18:36 .gitkeep
drwxrwxr-x 2 raphy raphy 4,0K ott 26 13:03 page-redder
-rw-rw-r-- 1 raphy raphy  101 ott 25 18:36 README.md

and started electron-browser-shell :

I get this error :

$ electron .
Loading extension from /home/raphy/electron-browser-shell/extensions/page-redder
(node:81026) ExtensionLoadWarning: Warnings loading extension at /home/raphy/electron-browser-shell/extensions/page-redder:
  Unrecognized manifest key 'action'.
  Permission 'activeTab' is unknown or URL pattern is malformed.
  Permission 'scripting' is unknown or URL pattern is malformed.

(Use `electron --trace-warnings ...` to show where the warning was created)
'web-contents-created' event [type:window, url:]
'web-contents-created' event [type:browserView, url:]
[81026:1026/140357.402330:ERROR:extensions_browser_client.cc(58)] Extension Error:
  OTR:     false
  Level:   2
  Source:  chrome-extension://mfaooncglafcgpnddpgacibklbopabfl/background.js
  Message: Uncaught TypeError: Cannot read properties of undefined (reading 'onClicked')
  ID:      mfaooncglafcgpnddpgacibklbopabfl
  Type:    RuntimeError
  Context: chrome-extension://mfaooncglafcgpnddpgacibklbopabfl/background.js
  Stack Trace: 
    {
      Line:     5
      Column:   1
      URL:      chrome-extension://mfaooncglafcgpnddpgacibklbopabfl/background.js
      Function: (anonymous function)
    }
[81026:1026/140357.402458:ERROR:extensions_browser_client.cc(58)] Extension Error:
  OTR:     false
  Level:   1
  Source:  manifest.json
  Message: Service worker registration failed
  ID:      mfaooncglafcgpnddpgacibklbopabfl
  Type:    ManifestError

and the extension does not appear:
image

I did the same with Hypothesis Browser Extension : https://github.com/hypothesis/browser-extension :

raphy@pc:~/electron-browser-shell/extensions$ ls -lah
total 20K
drwxrwxr-x 4 raphy raphy 4,0K ott 26 14:08 .
drwxrwxr-x 8 raphy raphy 4,0K ott 25 18:36 ..
drwxrwxr-x 7 raphy raphy 4,0K ott 25 19:34 client
-rw-rw-r-- 1 raphy raphy    0 ott 25 18:36 .gitkeep
drwxrwxr-x 2 raphy raphy 4,0K ott 26 13:03 page-redder
-rw-rw-r-- 1 raphy raphy  101 ott 25 18:36 README.md

This time the icon of the browser extension appears:

image

but the extension does not work, as it should be:

this is with Google Chrome :
image

How to correctly load the Chrome Extensions and make them work?

@Kilian
Copy link
Contributor

Kilian commented Jan 2, 2023

That's a Manifest V3 extension, which aren't supported yet but are on the roadmap: https://github.com/samuelmaddock/electron-browser-shell#-current

@raphael10-collab
Copy link
Author

Thank you @Kilian . Looking forward for this Manifest V3 extension support

@samuelmaddock
Copy link
Owner

Closing since MV3 support is tracked in #38

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

No branches or pull requests

3 participants