Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
Receiving end does not exist : sendMessage Background To popup

I searched for 1 hour my answer but nothing that fits my issue. I apolagize if it was a common problem. So I have one popup script that have to wait a message from the Background. But I always get this error

Error : Could not establish connection. Receiving end does not exist.

here is my popup

$( document ).ready(function()
{   
    chrome.extension.getBackgroundPage().download(true, "test");
    chrome.runtime.onMessage.addListener(function(request, sender, sendResponse){
       console.log(request, sender, sendResponse);
    });    
});

and here is my background which is a part of my http request

if(this.readyState ==3 && this.status ==200)
    {            
        chrome.tabs.query({active: true, currentWindow: true},function(tabs) {
            chrome.tabs.sendMessage(tabs[0].id, "Loading", function(response) {
                console.log(response);
            });
          });
    }

and here is my manifest

 `{

    
"name": "My extension axel",
"version": "1.0",
"description": "first extension",

"icons":{
    "16":"/images/ytDownloader_image_16.png",
    "48":"/images/ytDownloader_image_48.png",
    "128":"/images/ytDownloader_image_128.png"
},

"permissions": [
    "activeTab",
    "tabs",
    "webRequest",
    "webNavigation",
    "management",
    "http://*/*",
    "https://*/*",
    "*://*.google.com/"
],
"browser_action": {
    "default_popup" :"popup.html"
  },


"background":{
    "scripts":["/js/jquery-3.5.1.min.js","background.js"],
    "persistent": true
},
"manifest_version": 2
}`

Please help me :)

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda