adblocker icon indicating copy to clipboard operation
adblocker copied to clipboard

[Bug] [Electron] Can't enable blocking in multiple sessions

Open KaKi87 opened this issue 2 weeks ago • 1 comments

Hi,

The enableBlockingInSession method works fine when only having only one Session instance to enable blocking in, but when having multiple, the following error is thrown :

Error: Attempted to register a second handler for '@ghostery/adblocker/inject-cosmetic-filters'
    at IpcMainImpl.handle (node:electron/js2c/browser_init:2:109431)
    at BlockingContext.enable (node_modules/@ghostery/adblocker-electron/dist/commonjs/index.js:95:21)
    at ElectronBlocker.enableBlockingInSession (node_modules/@ghostery/adblocker-electron/dist/commonjs/index.js:237:17)

Thanks

KaKi87 avatar Dec 07 '25 14:12 KaKi87

Having the same issue. I tried to create a new blocker for each window but getting the same error.

Kamiikaze avatar Dec 11 '25 03:12 Kamiikaze