Я пытаюсь получить токен на js с помощью firebase, но мне выдает ошибку 404
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js">
</head>
<meta charset="utf-8">
</head>
<body>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://push-app-66813.firebaseapp.com/__/firebase/8.0.2/firebase>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://push-app-66813.firebaseapp.com/__/firebase/8.0.2/firebase>
function pernot(){
switch(Notification.permission.toLowerCase())
{
case ("granted"):
subscribe();
break;
case ("denied"):
console.log("denied");
break;
case ("default"):
Notification.requestPermission(function(state){
if (state =="granted")
subscribe();
if (state=="default")
setTimeout("pernot", 3000);
});
break;
}
}
function subscribe(){
var msg = firebase.messaging();
msg.requestPermission().
then(function(){
msg.getToken().then(function(token){
alert(token)}).
catch(function(err){alert("not to accept");});
}).
catch(function(){alert(err);}
);
}
pernot();
В чем может быть проблема?