## What was done: ✅ Fixed Firebase Admin initialization to use default credentials for Firebase Functions ✅ Updated frontend to use correct Firebase Functions URL (was using Cloud Run URL) ✅ Added comprehensive debugging to authentication middleware ✅ Added debugging to file upload middleware and CORS handling ✅ Added debug buttons to frontend for troubleshooting authentication ✅ Enhanced error handling and logging throughout the stack ## Current issues: ❌ Document upload still returns 400 Bad Request despite authentication working ❌ GET requests work fine (200 OK) but POST upload requests fail ❌ Frontend authentication is working correctly (valid JWT tokens) ❌ Backend authentication middleware is working (rejects invalid tokens) ❌ CORS is configured correctly and allowing requests ## Root cause analysis: - Authentication is NOT the issue (tokens are valid, GET requests work) - The problem appears to be in the file upload handling or multer configuration - Request reaches the server but fails during upload processing - Need to identify exactly where in the upload pipeline the failure occurs ## TODO next steps: 1. 🔍 Check Firebase Functions logs after next upload attempt to see debugging output 2. 🔍 Verify if request reaches upload middleware (look for '�� Upload middleware called' logs) 3. 🔍 Check if file validation is triggered (look for '🔍 File filter called' logs) 4. 🔍 Identify specific error in upload pipeline (multer, file processing, etc.) 5. 🔍 Test with smaller file or different file type to isolate issue 6. 🔍 Check if issue is with Firebase Functions file size limits or timeout 7. 🔍 Verify multer configuration and file handling in Firebase Functions environment ## Technical details: - Frontend: https://cim-summarizer.web.app - Backend: https://us-central1-cim-summarizer.cloudfunctions.net/api - Authentication: Firebase Auth with JWT tokens (working correctly) - File upload: Multer with memory storage for immediate GCS upload - Debug buttons available in production frontend for troubleshooting
50 lines
1.5 KiB
JSON
50 lines
1.5 KiB
JSON
{
|
|
"name": "cim-processor-frontend",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
"preview": "vite preview",
|
|
"test": "vitest --run",
|
|
"test:watch": "vitest",
|
|
"deploy:firebase": "npm run build && firebase deploy --only hosting",
|
|
"deploy:preview": "npm run build && firebase hosting:channel:deploy preview",
|
|
"emulator": "firebase emulators:start --only hosting",
|
|
"emulator:ui": "firebase emulators:start --only hosting --ui"
|
|
},
|
|
"dependencies": {
|
|
"axios": "^1.6.2",
|
|
"clsx": "^2.0.0",
|
|
"firebase": "^12.0.0",
|
|
"lucide-react": "^0.294.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-dropzone": "^14.3.8",
|
|
"react-router-dom": "^6.20.1",
|
|
"tailwind-merge": "^2.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/jest-dom": "^6.1.4",
|
|
"@testing-library/react": "^13.4.0",
|
|
"@testing-library/user-event": "^14.5.1",
|
|
"@types/react": "^18.2.37",
|
|
"@types/react-dom": "^18.2.15",
|
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
"@typescript-eslint/parser": "^6.10.0",
|
|
"@vitejs/plugin-react": "^4.1.1",
|
|
"autoprefixer": "^10.4.16",
|
|
"eslint": "^8.53.0",
|
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
"eslint-plugin-react-refresh": "^0.4.4",
|
|
"jsdom": "^26.1.0",
|
|
"postcss": "^8.4.31",
|
|
"tailwindcss": "^3.3.5",
|
|
"typescript": "^5.2.2",
|
|
"vite": "^4.5.0",
|
|
"vitest": "^0.34.6"
|
|
}
|
|
}
|