Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
Web Push notification payload ist null when sending ArrayBuffer

I am trying to send binary data from a Node.js server to a JavaScript service worker using the Web Push API.

On the Node.js side I use the web-push library and send the message with

webpush.sendNotification(subscription, buffer)

I get a status 201 and I receive the push message on the browser side. When I look at the Push Messaging log in the DevTools, I can even see the binary payload (encoded as UTF-8), and it says that the message was encrypted.

But when I try to get the ArrayBuffer in the service worker like this, event.data is null:

self.addEventListener('push', function (event) {
    console.log(event.data);
})

I don't understand how the data can be null if it was received by the client side.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda