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

1.1K
Views
TypeError no capturado: no se pudo construir 'URL': URL no válida en la extensión de Chrome v3 al usar mensajes

Aquí hay una extensión mínima para Chrome en v3:

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": "Test" } }

botón.js

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

La API parece bastante clara en el documento. Entonces, no entiendo por qué, cuando presiono el botón del complemento, recibo errores extraños:

 extensions.js:4187 Uncaught TypeError: Failed to construct 'URL': Invalid URL at ExtensionsErrorPageElement.onSelectedErrorChanged_ (extensions.js:4187:2827) at Object.runObserverEffect [as fn] (polymer_bundled.min.js:1:37568) at runEffectsForProperty (polymer_bundled.min.js:1:37087) at runEffects (polymer_bundled.min.js:1:36604) at ExtensionsErrorPageElement._propertiesChanged (polymer_bundled.min.js:1:52973) at ExtensionsErrorPageElement._flushProperties (polymer_bundled.min.js:1:26564) at ExtensionsErrorPageElement._flushProperties (polymer_bundled.min.js:1:51737) at ExtensionsErrorPageElement._invalidateProperties (polymer_bundled.min.js:1:51534) at ExtensionsErrorPageElement._setProperty (polymer_bundled.min.js:1:51459) at ExtensionsErrorPageElement.Object.defineProperty.set (polymer_bundled.min.js:1:24863) onSelectedErrorChanged_ @ extensions.js:4187 runObserverEffect @ polymer_bundled.min.js:1 runEffectsForProperty @ polymer_bundled.min.js:1 runEffects @ polymer_bundled.min.js:1 _propertiesChanged @ polymer_bundled.min.js:1 _flushProperties @ polymer_bundled.min.js:1 _flushProperties @ polymer_bundled.min.js:1 _invalidateProperties @ polymer_bundled.min.js:1 _setProperty @ polymer_bundled.min.js:1 Object.defineProperty.set @ polymer_bundled.min.js:1

¿Qué me estoy perdiendo?

Esto está en Chromium Versión 100.0.4896.75 (Build officiel) snap (64 bits)

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Tuve la misma excepción pero con otra razón.

Entonces, veo la posible solución (cómo obtener un mensaje de error real).

Establecí un punto de interrupción en la línea fallida y revisé el mensaje runtimeError.

Puede ser útil para alguien.

ingrese la descripción de la imagen aquí ingrese la descripción de la imagen aquí

about 4 years ago · Santiago Gelvez Report
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!