electron-extensions icon indicating copy to clipboard operation
electron-extensions copied to clipboard

Unable to load ublock origin

Open RangerMauve opened this issue 4 years ago • 4 comments

[email protected], [email protected], [email protected]

I'm trying to run ublock origin within my extension. There's no apparent errors while loading, but I'm unable to load the electron-extension:// page for the popupPage, and when I try to invoke extension.backgroundPage.webContents.showDevTools(), it opens up to a blank page navigated to chrome-error://chromewebdata/ without any sources loaded.

I'm downloaded ublock origin's chromium build and extracted a folder locally. I'm pointing to the folder for extensions.loadExtension().

In my app, I'm using persist:web-content for my web content and I passed that down to the extension in the constructor. I'm using the same partition for loading the popup.

What's interesting is that my extension web-palette is working fine, but that might be because it's only relying on content scripts.

Could I maybe be missing a step somewhere? I'm registering custom protocol handlers in my app, could that be interfering with the protocol handlers for electron-extension://?

RangerMauve avatar Jun 24 '20 01:06 RangerMauve

Setting up a minimal extension with a background page seems to be working. Gonna experiment more until I can find where exactly it's breaking.

RangerMauve avatar Jun 24 '20 01:06 RangerMauve

You should use the beta version. 6 may be not compatible with electron 9.

sentialx avatar Jun 24 '20 09:06 sentialx

I tried it out, and although the beta version worked well enough for HTTP pages, it wasn't loading the extension inside custom protocol handlers which is the main reason for my project to exist. 😅

Is there a version of electron that's known to work with version 6?

RangerMauve avatar Jun 24 '20 15:06 RangerMauve

Here's where I'm loading the extensions BTW: https://github.com/RangerMauve/agregore-browser/blob/master/app/extensions/index.js

RangerMauve avatar Jun 24 '20 15:06 RangerMauve