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

252
Views
Resolviendo "runtime.lastError no verificado: no se pudo establecer la conexión. El extremo receptor no existe". al escribir Google Chrome Extension

Estoy tratando de enviar un mensaje desde mi secuencia de comandos de fondo a mi secuencia de comandos de contenido. Cada vez que cargo la extensión, recibo inmediatamente estos dos errores en Service Worker:

 Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.

seguido por

 Error handling response: TypeError: Cannot read properties of undefined (reading 'farewell') at chrome-extension://kglmnphkfjhfplfdmjfhegdedeochkmc/background.js:3:28

Aquí está mi código, copiado de estas guías para desarrolladores de Google Chrome Extension:

https://developer.chrome.com/docs/extensions/mv3/getstarted/

https://developer.chrome.com/docs/extensions/mv3/messaging/

manifiesto.json

 { "name": "Getting Started Example", "description": "Build an Extension!", "version": "1.0", "manifest_version": 3, "background": { "service_worker": "background.js" }, "permissions": ["storage"], "content_scripts": [ { "matches": ["<all_urls>"], "run_at" : "document_end", "js" : ["contentscript.js"] } ] }

fondo.js

 chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello"}, function(response) { console.log(response.farewell); }); });

contentscript.js

 chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { console.log(sender.tab ? "from a content script:" + sender.tab.url : "from the extension"); if (request.greeting === "hello") sendResponse({farewell: "goodbye"}); } );

He intentado deshabilitar todas mis otras extensiones de Chrome y el problema persiste.

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!