Electron: can you use chrome extension with electron?

Created on 27 Apr 2015  ·  19Comments  ·  Source: electron/electron

nw.js is slowly supporting chrome extension api like cookies, storage, etc.

can you do the same with electron?

statuwontfix 🚫

Most helpful comment

chrome usb is super important :( Other usb libs have a lot of crossplatform issues

All 19 comments

@whatsdis Could you elaborate a bit? As far as I know, nw.js doesn't support chrome extension APIs, though they do have some similar APIs.

That being said, electron doesn't support chrome extensions out of the box, though it might be possible write a semi-compatible environment and API set.

We don't have any plan to support Chrome extension APIs.

What about APIs like chrome.sockets, chrome.serial, chrome.bluetooth?

@ungerik You can do most of these things via node modules, though the API is probably a bit different

Seems to be possible now via BrowserWindow.addDevToolsExtension

See:
BrowserWindow.addDevToolsExtension
Using Augury chrome extension inside of your Electron Apps

Yeah as @thomasdarimont pointed out it's possible. I wrote that dedicated article in addition to the official electron docs right here because you've to ensure that you're using the path to the folder containing the mainfest.json file.

It's also important to know that this will only work if the used extension is installed on the system actually running the app

Isn't there a difference between DevTools extensions and Chrome Extensions?

@Tribex it depends. For the extension I've mentioned above, Augury. It's an regular Chrome Extensions integrating into the chrome dev tools. for regular extensions integrating in the app to empower the user, I dont know at the moment. Don't think this is possible because chromium comes without direct access to Chrome Web Store. So my article was covering the developer side.

@ThorstenHans
I followed the guide, and electron opens correctly but the tab is not there. I can't see any errors, or indications that something wrong happened. I followed everything exactly. Downloaded directly from chrome, added path correctly. I'm using electron 0.37.6

I'm using electron 0.37.6

That is far too old to use most Chrome DevTools Extensions. You probably need to update to at least 1.2.x+

@marshallofsound thanks for the reply. I assumed there was a chance for it to work since the API call is there. But good to know. I'll have to wait to update electron version then

This is still an issue in 2016. I have a website at www.SkyRooms.IO that uses an extension to do screen capturing with WebRTC. This feature is not available to my desktop users now. What should I do?

What about Google Input Tools (ie: handwriting support for asian languages ?...)

chrome usb is super important :( Other usb libs have a lot of crossplatform issues

I listed there all the Electron related blockers I faced so far trying to load 2 popular Chrome extensions (Mailtracker and Grammarly) in Electron. I added references to electron's issue or PR.

@alexstrat I checked that list of blockers you made and it looks like most of them are fixed...

So is the Grammarly plugin working right now in your electron app? If so can you point me in the right direction of how I can add it to my app? It seems rather complication....

@AndyNormore Have you fixed the issue? I meet the same one.

The error information is as below:
E:\project\Electron\electron-v1.8.3-win32-x64>electron.exe
Installed chrome extensions:
{ 'Screen Capturing': { name: 'Screen Capturing', version: '3.4' } }
[14064:0307/185014.973:ERROR:CONSOLE(7278)] "Skipping extension with invalid URL: chrome-extension://screen-capturing",
source: chrome-devtools://devtools/bundled/inspector.js (7278)

@bianxg Have you fixed the issue?

@liguanpei I give up to use chrome extension. I use desktop-capture api instead to desktop share.
https://electronjs.org/docs/api/desktop-capturer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cniaulin picture cniaulin  ·  3Comments

tenry92 picture tenry92  ·  3Comments

reggi picture reggi  ·  3Comments

maxogden picture maxogden  ·  3Comments

christiangenco picture christiangenco  ·  3Comments