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

514
Views
Error no capturado (en promesa): no se pudo establecer la conexión. El extremo receptor no existe

Hay muchas cuestiones abiertas sobre el tema, pero no pude encontrar una explicación en mi caso. Aquí hay un caso de prueba mínimo:

Aquí está mi manifiesto.json

 { "manifest_version": 3, "name": "Test", "version": "1.0", "description": "Test extension", "icons": { "48": "dark.png" }, "background": { "service_worker": "button.js" }, "permissions": [ "activeTab" ], "action": { "default_icon": "dark.png", "default_title": "DarkTheme" }, "content_scripts": [ { "matches": [ "<all_urls>" ], "js": [ "dark.js" ] } ] }

botón.js

 chrome.action.onClicked.addListener(tab => { console.log('clicked') chrome.tabs.sendMessage(tab.id, { value: false }) });

oscuro.js

 chrome.runtime.onMessage.addListener(request => { console.log('received', request) })

Entonces, básicamente, mi oyente está configurado desde el principio, y solo cuando presiono el botón envío un mensaje. ¿Cómo es que puedo recibir este error cuando presiono el botón?

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

Probado en Chromium versión 100.0.4896.75 (compilación oficial) snap (64 bits)

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!