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

185
Views
Error de Firebase Cloud Messing: DOMException: no se pudo ejecutar 'atob' en 'Ventana': la cadena que se decodificará no está codificada correctamente

Hola, estoy usando Firebase con mi proyecto PHP con javascript. Recibo este error cuando intento recuperar el token del dispositivo FCM:

 An error occurred while retrieving token. DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. at https://www.gstatic.com/firebasejs/8.1.0/firebase-messaging.js:1:25342 at https://www.gstatic.com/firebasejs/8.1.0/firebase-messaging.js:1:25426 at https://www.gstatic.com/firebasejs/8.1.0/firebase-messaging.js:1:1982 at Object.next (https://www.gstatic.com/firebasejs/8.1.0/firebase-messaging.js:1:2087) at r (https://www.gstatic.com/firebasejs/8.1.0/firebase-messaging.js:1:833)

Aquí está mi código:

 <script type="module"> import "https://www.gstatic.com/firebasejs/8.1.0/firebase-app.js"; import "https://www.gstatic.com/firebasejs/8.1.0/firebase-messaging.js"; const firebaseConfig = { apiKey: "************", authDomain: "*************", databaseURL: "***********", projectId: "*****bdb20", storageBucket: "*********com", messagingSenderId: "***************", appId: "**************", measurementId: "G-7HS1PXRZMR" }; // Initialize Firebase firebase.initializeApp(firebaseConfig); const messaging = firebase.messaging(); messaging.usePublicVapidKey('**********SjpDQfr4gm6NvOmUvH2UoPCqxthqY'); messaging.getToken().then((currentToken) => { if (currentToken) { console.log(currentToken); } else { // Show permission request UI console.log('No registration token available. Request permission to generate one.'); // ... } }).catch((err) => { console.log('An error occurred while retrieving token. ', err); // ... });

¿Alguien puede resolver esto?

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!