The UserProfile forms now have comprehensive error logging and display. Here's how to troubleshoot form save issues:
Open your browser's Developer Tools (F12) and look at the Console tab. You should now see detailed logs like:
π Starting profile save for user: user@example.com
Profile data: FirstName='John', LastName='Doe'
π Checking if user exists: user@example.com
π₯ Loading user data for: user@example.com
Base URL: http://localhost:8080/
Full URL: http://localhost:8080/users/user@example.com
Response status: NotFound
π€ User doesn't exist, creating...
π Creating new user: user@example.com
Request data: {"EmailAddress":"user@example.com","FirstName":"John","LastName":"Doe"}
Response status: Created
β
User creation successful
π Updating user profile for: user@example.com
Request data: {"EmailAddress":"user@example.com","FirstName":"John","LastName":"Doe","PhoneNumber":"555-1234","ProfilePictureUrl":""}
Response status: OK
β
Profile update successful
Problem: EventServer is not running Solution: Start the EventServer:
cd src/EventServer
dotnet run
# OR
dotnet watchThe EventServer should be running on http://localhost:8080
Problem: User doesn't exist in the system Solution: The forms now automatically create users, but if this fails:
- Check EventServer logs for validation errors
- Ensure email address is valid
- Check that EventServer database is accessible
Problem: Data validation failed on the server Solution: Check the detailed error message in the console for specific validation issues
Problem: Server-side error Solution:
- Check EventServer logs for detailed error information
- Verify database connection is working
- Check that all required services are running
- EventServer running on http://localhost:8080
- PostgreSQL database accessible to EventServer
- User authentication working (for userEmail to be populated)
# Terminal 1: Start EventServer
cd src/EventServer
dotnet watch
# Terminal 2: Start Blazor app
cd src/FxExpert.Blazor/FxExpert.Blazor
dotnet watch- Navigate to
/profilein your Blazor app - Open browser Developer Tools (F12) β Console tab
- Fill out a form and click "Save Changes"
- Watch the console for detailed logs
- Check the notification snackbar for user-friendly messages
If automatic user creation fails, you can manually create a user:
curl -X POST http://localhost:8080/users \
-H "Content-Type: application/json" \
-d '{
"EmailAddress": "your-email@example.com",
"FirstName": "Your",
"LastName": "Name"
}'The UserProfile forms make these API calls:
GET /users/{email}- Get user profilePOST /users- Create user (auto-created if missing)POST /users/profile/{email}- Update profilePOST /users/address/{email}- Update addressPOST /users/preferences/{email}- Update preferences
All endpoints expect the EventServer to be running on http://localhost:8080
If you're still experiencing issues after checking the above:
- Share the console logs from the browser
- Share any EventServer logs/errors
- Confirm which services are running and on which ports