I am trying to implement Firebase web cloud messaging on node-webkit (NWJS) application, but when I try to get a token its returning a error: "Registration failed - push service error". Here is the code snippet I am using to get the token after authentication.
messaging.requestPermission()
.then(function() {
console.log("have Permission");
return messaging.getToken();
})
.then(function(token) {
console.log(token);
})
.catch(function(err) {
console.log("Error occured");
console.log(err);
});