Chrome Extension Page - "This page has been blocked by Chrome"

2,313 views
Skip to first unread message

Alexander H

unread,
Mar 10, 2022, 5:28:48 PM3/10/22
to Chromium Extensions
Hi guys, 

I doing a simple test redirect using declarativeNetRequest.
This is the rule:

var redirectFile = chrome.runtime.getURL("./helper.html");
chrome.declarativeNetRequest.updateDynamicRules(
    {
        addRules:
            [
                {
                    "id": 10,
                    "priority": 1,
                    "action": {
                        "type": "redirect",
                        "redirect": {
                            "regexSubstitution": redirectFile + "?url=\\0"
                           }
                    },
                    "condition": {
                        "regexFilter": "^https://www.test.de/",
                        "resourceTypes": [
                            "main_frame"
                        ]
                    }
                }
        ],
        removeRuleIds: [10]
    }
);

So I navigate to google.de and search for test.de. When I click und the page the redirect is executed to  
"chrome-extension://bnjeoegloggbgonnhkakgbeekjmpboid/helper.html?url=https://www.test.de/"

But the page is blocked:
Unbenannt.png

I created a new chrome user and made sure that the is no other extension active.

If I reload the page it is shown. But if its redirected via a click on a page it doesnt work. If I type in "www.test.de" in the url field it also works. 

Do you have any idea what this is caused by? Or is it an error from chrome?

BR Alex

Alexander H

unread,
Mar 10, 2022, 5:29:31 PM3/10/22
to Chromium Extensions, Alexander H
Maybe important I'm using Chrome Version 99.0.4844.51 (Official Build) (64-bit)

Alexander H

unread,
Mar 10, 2022, 5:47:21 PM3/10/22
to Chromium Extensions, Alexander H
Reply all
Reply to author
Forward
0 new messages