adblocker
adblocker copied to clipboard
[Bug] [Electron] Can't enable blocking in multiple sessions
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
Having the same issue. I tried to create a new blocker for each window but getting the same error.