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

422
Views
When making chrome extension, I keep getting this error: Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist

When making a chrome extension, I keep getting this error

Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.

Along with

background.js:0 (anonymous function)

Does anyone know how I could resolve this? I literally have like 3 lines in both my files.

This is my background.js file

chrome.tabs.onUpdated.addListener((tabId, tab) => {
  if (tab.url && tab.url.includes("linkedin.com/in")) {
    chrome.tabs.sendMessage(tabId, {type: "MAIN", profile: "test"});
  }
});

and This is my ContentScript.js file

(() => {
    chrome.runtime.onMessage.addListener((obj, sender, response) => {
        //const { type, profile } = obj;
        response = {line1 : "hello"}
    });
})();

Any help would grealy be appreciated :)

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!