T
T
Ternick2021-06-06 22:33:08
JavaScript
Ternick, 2021-06-06 22:33:08

Why does "incognito": "split" in manifest.json crash chrome?

Good day !
Here are the inputs for the chrome extension:

manifest.json

{
  "name": "Proxy",
  "description": "Build an Extension!",
  "version": "1.0.122",
  "manifest_version": 3,
  /*"incognito": "split",*/
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["contentScript.js"]
    }
  ],
  "background": {
    "service_worker": "background.js"
  },
  "permissions": [
    "proxy",
    "tabs",
    "webRequest"
  ]
}



background.js

function setProxy(ip, port, username, password){
  var config = {
    mode: "fixed_servers",
    rules: {
      singleProxy: {
        scheme: "http",
        host: ip,
        port: port
      },
      bypassList: ["localhost"]
    }
  };

  chrome.proxy.settings.set({value: config, scope: "incognito_session_only"}, function() {});
}


chrome.tabs.onCreated.addListener((tab) => {
  console.log("ok");
/*	if (tab.incognito){
    setProxy("195.201.61.51", 8000, "", "");
    console.log("Proxy set !");
  }*/

});



Everything is imported well, but with the uncommented incognito parameter in manifest.json, when opening incognito, the browser crashes, what is the reason?

I'm using the latest version of chrome => 91.0.4472.77.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question