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

244
Views
No se pudo establecer el error de conexión al enviar un mensaje desde el script de contenido al script de fondo en la extensión de Google Chrome

Cuando envío un mensaje desde el contenido al fondo, recibo este error en el registro del script de contenido (registro de la consola de Chrome):

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

En el registro del trabajador del servicio, no se registra nada cuando envío un mensaje desde el contenido. A continuación se encuentran mi backgroundScript, contentScript y mi manifest.json. Estoy usando manifiesto v3.

fondoScript.js

 chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) { console.log('request: ', request); });

contentScript.js

 chrome.runtime.sendMessage({ greeting: 'hello' });

manifiesto.json

 { "manifest_version": 3, "name": "Chrome Extension with React & Webpack", "description": "A chrome extension boilerplate built with React 17, Webpack 5, and Webpack Dev Server 4", "options_page": "options.html", "background": { "service_worker": "background.bundle.js" }, "action": { "default_popup": "popup.html", "default_icon": "icon-34.png" }, "chrome_url_overrides": { "newtab": "newtab.html" }, "icons": { "128": "icon-128.png" }, "content_scripts": [ { "matches": ["http://*/*", "https://*/*", "<all_urls>"], "js": ["contentScript.bundle.js"], "css": ["content.styles.css"] } ], "host_permissions": ["http://*/"], "devtools_page": "devtools.html", "web_accessible_resources": [ { "resources": ["content.styles.css", "icon-128.png", "icon-34.png"], "matches": [] } ] }
about 4 years ago · Santiago Gelvez
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!