Skip to content

fix: prevent white screen on missing Firebase config, remove duplicate CSS imports, document missing TWO_FACTOR_ENCRYPTION_KEY - #1817

Merged
aryandas2911 merged 2 commits into
aryandas2911:mainfrom
iamsiddhant9:fix/firebase-init-and-css-imports
Jul 17, 2026
Merged

fix: prevent white screen on missing Firebase config, remove duplicate CSS imports, document missing TWO_FACTOR_ENCRYPTION_KEY#1817
aryandas2911 merged 2 commits into
aryandas2911:mainfrom
iamsiddhant9:fix/firebase-init-and-css-imports

Conversation

@iamsiddhant9

Copy link
Copy Markdown
Contributor

📌 Description

Fixed a white screen crash that occurred when new contributors ran the frontend without a .env file configured. Also removed duplicate CSS @import blocks that were causing PostCSS build warnings and incorrect dark mode font rendering. Additionally added the missing TWO_FACTOR_ENCRYPTION_KEY to backend/.env.example so contributors know it is required to start the backend.

🛠 Changes Made

-frontend/src/utils/firebase.js — Wrapped Firebase initializeApp() in a try/catch block so the app loads gracefully instead of showing a white screen when Firebase API keys are missing from .env

-frontend/src/index.css — Removed two duplicate copies of the entire stylesheet that were causing @import must precede all other statements PostCSS errors and dark mode font color issues

-backend/.env.example — Added missing TWO_FACTOR_ENCRYPTION_KEY entry so new contributors know this required variable exists and how to generate it

✅ Checklist

  • [Y] Code runs locally
  • [Y] Followed project structure
  • [Y] No console errors
  • [Y] Properly tested changes
  • Linked the issue

🚀 Notes for Reviewers

These fixes primarily improve the developer experience for new contributors. Before these changes, cloning the repo and running it locally without a .env file resulted in a blank white screen with no guidance. Now the app loads gracefully and logs clear error messages pointing contributors to the .env setup.

@iamsiddhant9

Copy link
Copy Markdown
Contributor Author

Hello @aryandas2911, I have fixed #1817 kindly review it . "fix: prevent white screen on missing Firebase config, remove duplicate CSS imports, document missing TWO_FACTOR_ENCRYPTION_KEY"

@aryandas2911
aryandas2911 merged commit 787a146 into aryandas2911:main Jul 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants