skip to Main Content

Mongodb – Intermittent Unhandled Promise Rejection – MongoServerSelectionError: connection timed out

I am getting below error randomly. Here is my stack App deployed on vercel is talking to Atlas mongodb (free tier) Nodejs - 18.16.1 nextjs 13 mongodb package version - 5.8.1 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"MongoServerSelectionError: connection timed out","reason":{"errorType":"MongoServerSelectionError","errorMessage":"connection timed…

VIEW QUESTION

Javascript – How to display the current user display name in firebase using react

I'm trying to display the current user's name in my sidebar component in react. I tried this so far. import {auth, dataBase} from '../firebase-config.js'; function Sidebar() { const [firebaseUserInfo, setFirebaseUserInfo] = useState(auth.currentUser); return ( <div className='sidebar-container'> <header> <p>{firebaseUserInfo.displayName}</p> </header> </div>…

VIEW QUESTION
Back To Top
Search