This document outlines the runtime errors encountered in the GitHub Profile ReadMe Maker (GPRM) application and provides detailed fixes to prevent crashes and improve user experience.
Error: GET https://itsvg.in/api/broadcast 404 (Not Found)
Root Cause:
- The
itsvg.inAPI deployment is paused (Vercel status: DEPLOYMENT_PAUSED) - Axios throws uncaught promise rejection
Impact:
- Console errors
- Potential app instability
Fix:
// In components/broadcast/Broadcast.js
useEffect(() => {
axios.get("https://itsvg.in/api/broadcast")
.then((res) => {
if (res.data.title) {
setTitle(res.data.title);
setLink(res.data.link);
setIsVisible(true);
setTimeout(() => {
setIsVisible(false);
}, 15000);
}
})
.catch((error) => {
console.warn("Broadcast API unavailable:", error.message);
// Silently fail - no crash
});
}, []);Error: Uncaught (in promise) AxiosError {message: 'Request failed with status code 404'}
Root Cause:
- Network requests failing without proper error handling
Impact:
- Uncaught promise rejections crash the app
Fix:
Add .catch() blocks to all Axios requests as shown in Issue #1.
Error: [MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ObservableObject@2.data.stats.theme
Root Cause:
- MobX strict mode enabled (default in MobX 6)
- Direct mutation of observable properties without action wrappers
Impact:
- Console warnings/errors
- Potential state management issues
Fix:
// In components/mobx/gprmStore.js
import { action, observable } from 'mobx';
export function createGPRMStore() {
return observable({
data: {
// ... existing data structure
},
editData: action(function(id, value) {
this.data[id] = value;
}),
updateStats: action(function(updates) {
Object.assign(this.data.stats, updates);
}),
});
}
// In components/slides/GitHubCards.js
useEffect(() => {
gprmStore.updateStats({
theme,
border,
lifetime: includeAll,
prv: includePrivate,
});
}, [theme, border, includeAll, includePrivate]);Error: GET https://github-readme-stats.vercel.app/api/top-langs/... 503 (Service Unavailable)
Root Cause:
github-readme-stats.vercel.appservice outages/down time- External dependency failures
Impact:
- Broken images in UI
- Console errors
Fix:
// In components/slides/GitHubCards.js - Add onError handlers to img tags
<img
src={`https://github-readme-stats.vercel.app/api?username=${gprmStore.data.username}...`}
alt="GitHub Stats"
onError={(e) => {
e.target.style.display = 'none';
console.warn('GitHub stats image failed to load');
}}
/>Error: Form submission canceled because the form is not connected
Root Cause:
- Form elements without proper event handlers or connections
Impact:
- Browser warnings
- Potential UX issues
Fix:
- Inspect form elements in components
- Add
onSubmit={(e) => e.preventDefault()}if forms are not meant to submit - Ensure proper form connections
Runtime Errors: API Failures & MobX Strict Mode Violations Causing App Instability
## 🐛 Bug Report
### Description
The app encounters multiple runtime errors that degrade user experience:
1. **Broadcast API 404/503** - External API failures
2. **Axios Unhandled Errors** - Network failures throw uncaught promises
3. **MobX Strict Mode Violations** - Direct observable mutations
4. **External API 503s** - github-readme-stats service outages
5. **Form Submission Warnings** - Disconnected forms
### Steps to Reproduce
1. Run `npm run dev`
2. Open browser console
3. Navigate through app (especially GitHub stats)
4. Observe errors when external APIs are down
### Expected Behavior
- Graceful handling of external API failures
- No console errors from network issues
- Compliant MobX state updates
### Proposed Solution
Implement comprehensive error handling as documented in ERROR_FIXES.md
### Environment
- Node.js: [version]
- npm: [version]
- Browser: [browser]
- OS: [OS]-
High Priority:
- MobX strict mode fixes (prevents state corruption)
- Axios error handling (prevents crashes)
-
Medium Priority:
- Image onError handlers (improves UX)
- Form submission fixes (cleans up warnings)
-
Low Priority:
- Enhanced logging/error reporting
After implementing fixes:
- Run
npm run buildto ensure no syntax errors - Test with network disconnected to simulate API failures
- Verify console is clean during normal operation
- Test GitHub stats section with invalid usernames
- MobX 6+ (for observable/action)
- Axios (for HTTP requests)
- React (for error boundaries if needed)
- External APIs (
itsvg.in,github-readme-stats) are third-party services - App should be resilient to their failures
- Consider implementing retry logic for critical APIs
- Add loading states for better UX during API calls