Overview
This guide covers the most frequently encountered issues when using the Resume Generator application and their solutions.Authentication Issues
JWT error: secretOrPrivateKey must have a value
JWT error: secretOrPrivateKey must have a value
This error occurs when the
JWT_SECRET environment variable is missing or empty.Error Location: backend/src/controllers/auth.controller.js:39-43, backend/src/middlewares/auth.middleware.js:27Solution:- Create or edit
backend/.envfile - Add the following line:
- Generate a secure secret using:
- Restart the backend server
Token not provided
Token not provided
Error Message:
"Token not provided."Cause: The authentication token cookie is missing from the request.Error Location: backend/src/middlewares/auth.middleware.js:10-14Solutions:- Ensure you’re logged in before accessing protected routes
- Check that cookies are enabled in your browser
- Verify CORS settings allow credentials:
- Clear browser cache and login again
Invalid token
Invalid token
Error Message:
"Invalid token."Cause: The JWT token is malformed, expired, or signed with a different secret.Error Location: backend/src/middlewares/auth.middleware.js:33-37Solutions:- Login again to get a fresh token (tokens expire after 1 day)
- Verify
JWT_SECREThasn’t changed in.env - Clear cookies and re-authenticate
Token is invalid (blacklisted)
Token is invalid (blacklisted)
Error Message:
"token is invalid"Cause: The token has been blacklisted after logout.Error Location: backend/src/middlewares/auth.middleware.js:16-24Solution:- This is expected behavior after logout
- Simply login again to get a new valid token
Registration & Login Issues
Missing registration fields
Missing registration fields
Error Message:
"Please provide username, email and password"Cause: One or more required fields are missing in the registration request.Error Location: backend/src/controllers/auth.controller.js:15-19Solution:
Ensure all three fields are provided in the request body:Account already exists
Account already exists
Error Message:
"Account already exists with this email address or username"Cause: A user with the same email or username already exists in the database.Error Location: backend/src/controllers/auth.controller.js:21-29Solutions:- Use a different email address or username
- If you forgot your password, use the login endpoint with correct credentials
- Check for typos in email/username
Invalid email or password
Invalid email or password
Error Message:
"Invalid email or password"Cause: Either the email doesn’t exist or the password is incorrect.Error Location: backend/src/controllers/auth.controller.js:71-74, 79-82Solutions:- Verify your email is correctly spelled
- Check your password (case-sensitive)
- If you’re a new user, register first
- Ensure you’re using the email (not username) to login
Interview Report Generation Issues
Job description is required
Job description is required
Error Message:
"Job description is required (send as 'jobDescription')."Cause: The jobDescription field is missing or empty.Error Location: backend/src/controllers/interview.controller.js:16-21Solution:
Always include a non-empty jobDescription field in your request:Either resume file or selfDescription is required
Either resume file or selfDescription is required
Error Message:
"Either a resume file (field 'resume') or 'selfDescription' is required."Cause: Neither a resume file nor a self-description was provided.Error Location: backend/src/controllers/interview.controller.js:25-29Solution:
Provide at least one of the following:- Upload a resume file (PDF or DOCX)
- Include a
selfDescriptiontext field - Or provide both for best results
AI service failed to generate report
AI service failed to generate report
Error Message:
"AI service failed to generate interview report. Please try again."Cause: The Google Gemini API returned an error or timed out.Error Location: backend/src/controllers/interview.controller.js:101-105Solutions:- Verify
GOOGLE_GENAI_API_KEYis set inbackend/.env - Check your API key is valid and not expired
- Ensure you have available quota in your Google AI account
- Check your internet connection
- Try again after a few moments (temporary API issues)
- Reduce the size of your job description or resume if they’re very large
Interview report not found
Interview report not found
Error Message:
"Interview report not found."Cause: The requested interview report doesn’t exist or doesn’t belong to your user.Error Location: backend/src/controllers/interview.controller.js:143-147, 177-181Solutions:- Verify the interview report ID is correct
- Ensure you’re logged in as the user who created the report
- Check that the report wasn’t deleted
- Use
GET /api/interview/to list all your reports
Validation errors
Validation errors
Error Message: Varies based on missing field (e.g.,
"Job description is required", "Job title is required")Cause: The AI-generated report is missing required fields for database storage.Error Location: backend/src/controllers/interview.controller.js:119-123Solutions:- This is usually an internal error; try generating the report again
- Ensure your job description is clear and well-formatted
- Contact support if the issue persists
File Upload Issues
File size exceeds limit
File size exceeds limit
Error: Upload fails silently or returns an errorCause: The uploaded file exceeds the 5MB limit.Limit Location:
backend/src/middlewares/file.middleware.js:6-8Solution:- Compress your PDF or DOCX file to under 5MB
- Remove unnecessary images or formatting
- Use PDF compression tools
- Convert to a simpler format if possible
Maximum file size: 5MB (5 * 1024 * 1024 bytes)
Unsupported resume file type
Unsupported resume file type
Error Message:
"Unsupported resume file type. Please upload a PDF or DOCX."Cause: The uploaded file is not a PDF or DOCX format.Error Location: backend/src/controllers/interview.controller.js:62-66Detection Logic: The application checks:- Magic bytes (file signature):
%PDFfor PDF,PK..for DOCX - MIME type from the browser
- File extension
- PDF (
.pdf) - Microsoft Word (
.docx)
- Convert your resume to PDF or DOCX format
- Avoid uploading
.doc(old Word format),.txt, or image files - Use “Save As” or “Export to PDF” from your word processor
Server Connection Issues
Cannot connect to backend
Cannot connect to backend
Symptoms:
- Frontend shows connection errors
- API requests fail with network errors
-
Verify backend is running:
Should show:
"Server is running on port 3000" -
Check backend URL in frontend configuration
- Default:
http://localhost:3000
- Default:
- Verify ports are not blocked by firewall
- Check for port conflicts (another service using port 3000)
-
Review CORS configuration in
backend/src/app.js:9-12
Next Steps
MongoDB Connection Issues
Resolve MongoDB Atlas connection and authentication problems
Resume Parsing Errors
Fix issues with PDF/DOCX parsing and file format problems