How to add extension using Electron API?


Not sure is it issue or feature. I am trying to add an extension (not DevTool, but a metamask extension) to the electron application using Electron API (BrowserWindow.addExtension(path)) and always get a error

Skipping extension with invalid URL

Before calling of addExtension (on app ready event) I downloading an extension .crx file and unziping it into subfolder in userData directory.

So, is it possible to add extension using Electron API?


What URL are you using?


I cannot define this URL by myself. I can provide a path to the extension directory only (according to documentation). I providing a path to the directory and then electron API do build an URL like: chrome-extension://[extension-name]. Extension name is defined in the manifest.json


Did you find a solution to this problem? i’m having the same problem currently.


I’m facing the same problem. Any news on that matter ?


Any one added custom extension to chromium please reply!