Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
chrome.webRequest not working in chrome extension

I'm working on a chrome extension Manifest.json:

{
  "name": "Managebac Grade Calculator",
  "version": "1.2",
  "manifest_version": 2,
  "content_scripts": [
    {
      "matches": [
        "https://opengate.managebac.com/student/*"
      ],
      "js": [
        "jquery.js",
        "content.js"
      ]
    }
  ],
  "permissions": [
    "storage",
    "<all_urls>",
    "webRequest"
  ],
  "icons": {
    "16": "pfp.jpg",
    "48": "pfp.jpg",
    "128": "pfp.jpg"
  },
  "browser_action": {
    "default_icon": "pfp.jpg",
    "default_popup": "popup.html"
  }
}

content.js:

chrome.webRequest.onSendHeaders.addListener(function(details){
    console.log(details)
},{
    urls:["<all_urls>"],
    types: ["xmlhttprequests"]
},["requestHeaders"])

But for some reason it doesn't work, it throws me this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'onSendHeaders')
    at content.js:1

I think its something very dumb with permission but I have no idea what, please help

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!