I'm trying to send a notification to an android device by sending it from a web app.

I tried to do it this way, but I get this error. I looked at many other questions but could not find an answer. I updated everything but it doesn't work anyway.

what am I doing wrong?

my code:

```
   const messaging = firebase.messaging();

    var message = {
       data: {
         score: '850',
           time: '2:45'
          },
       token: registrationToken
   };

messaging.send(message)
   .then((response) => {
     // Response is a message ID string.
      console.log('Successfully sent message:', response);
   })
   .catch((error) => {
       console.log('Error sending message:', error);
   });

```