Firebase Cloud Messaging's getToken() pending in Chrome Extension
问题 I want to use Firebase Cloud Messaging to show push notifications in my extension. I followed the official doc and successfully got the permission, but I am unable to get the Firebase token using messaging.getToken() . The method returns a promise but it is neither resolved nor gives an error. When I call it in console directly, all I get is a Promise object with Pending status. I have searched many questions but no solution applied to mine. Here is the initialization code I have written in