title: Messaging: This browser doesn't support the API's required to use the Firebase SDK
body: <p>Im building a web chat app with next.js and im trying to implement push notifications with firebase but im getting stuck on this error:</p>
  <p>error - unhandledRejection: FirebaseError: Messaging: This browser doesn't support the API's required to use the Firebase SDK. (messaging/unsupported-browser)</p>
  <p>error - Error: Service messaging is not available.</p>
  <pre><code>import firebase from 'firebase/compat/app';
  import 'firebase/compat/auth';
  import 'firebase/compat/firestore';
  import { getStorage } from &quot;firebase/storage&quot;;
  import { getMessaging } from &quot;firebase/messaging&quot;;
  
  
  const firebaseConfig = {
   ...
  }; 
  
  const app = !firebase.apps.length
  ? firebase.initializeApp(firebaseConfig)
  : firebase.app();
  
  const messaging=getMessaging(app)
  const db =app.firestore();
  const auth=app.auth();
  const provider=new firebase.auth.GoogleAuthProvider();
  export const storage = getStorage(app);
  export{db,auth,provider};
  </code></pre>
  <p>What can i do to solve this problem?</p>