You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4.4 KiB
4.4 KiB
Electron Auto-Updates Configuration
Author: Matthew Raymer
Date: 2025-07-12
Status: DISABLED - Manual Updates Only
Overview
TimeSafari's Electron application currently has auto-updates disabled due to hosting on Gitea instead of GitHub. This document explains the current configuration and provides guidance for future update mechanisms.
Current Status
Auto-Updates Disabled
Auto-updates are currently disabled for the following reasons:
- Repository Hosting: The project is hosted on Gitea (
https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa
) rather than GitHub - Provider Limitations:
electron-updater
primarily supports GitHub, S3, and other major cloud providers - 404 Errors: Attempting to use GitHub auto-updates with a Gitea repository causes 404 errors
Configuration Changes Made
- Repository URL Updated: Changed from
https://github.com/trentlarson/crowd-master
to the correct Gitea URL - Publish Configuration Removed: Removed GitHub provider from
electron-builder.config.json
- Auto-Updater Disabled: Commented out auto-updater code in
electron/src/index.ts
Error Resolution
The original error:
HttpError: 404
"method: GET url: https://github.com/trentlarson/crowd-master/releases.atom"
This occurred because:
- The app was trying to check for updates on GitHub
- The repository doesn't exist on GitHub
- The auto-updater was configured for GitHub releases
Future Update Options
Option 1: Manual Distribution
- Build and distribute packages manually
- Users download and install new versions manually
- No automatic update checking
Option 2: Custom Update Server
- Implement a custom update server compatible with
electron-updater
- Host update files on a web server
- Configure custom update endpoints
Option 3: GitHub Migration
- Move repository to GitHub
- Set up GitHub releases
- Re-enable auto-updates
Option 4: Alternative Update Providers
- Use S3 or other supported providers
- Implement custom update mechanism
- Use third-party update services
Current Build Process
Development Builds
npm run build:electron:dev
Production Builds
npm run build:electron:prod
Package Distribution
# Windows
npm run build:electron:windows:prod
# macOS
npm run build:electron:mac:prod
# Linux
npm run build:electron:linux:prod
Manual Update Process
- Build New Version: Use appropriate build script
- Test Package: Verify the built package works correctly
- Distribute: Share the package with users
- User Installation: Users manually download and install
Security Considerations
Disabled Auto-Updates
- No automatic security updates
- Users must manually update for security patches
- Consider implementing update notifications
Package Verification
- Verify package integrity before distribution
- Use code signing for packages
- Implement checksum verification
Monitoring and Maintenance
Version Tracking
- Track application versions manually
- Document changes between versions
- Maintain changelog for users
User Communication
- Notify users of available updates
- Provide clear update instructions
- Document breaking changes
Recommendations
Short Term
- Continue with manual distribution
- Implement update notifications in-app
- Provide clear update instructions
Long Term
- Evaluate hosting platform options
- Consider implementing custom update server
- Plan for automated update mechanism
Configuration Files
electron-builder.config.json
{
"appId": "app.timesafari.desktop",
"productName": "TimeSafari",
// publish configuration removed
}
electron/src/index.ts
// Auto-updater disabled
// import { autoUpdater } from 'electron-updater';
// Auto-updates disabled - not supported on Gitea hosting
// if (!electronIsDev && !process.env.APPIMAGE) {
// try {
// autoUpdater.checkForUpdatesAndNotify();
// } catch (error) {
// console.log('Update check failed (suppressed):', error);
// }
// }
Troubleshooting
Common Issues
- 404 Errors: Ensure repository URL is correct
- Build Failures: Check build configuration
- Package Issues: Verify package contents
Debug Mode
# Enable debug logging
DEBUG=* npm run build:electron:dev
Status: Auto-updates disabled
Last Updated: 2025-07-12
Version: 1.0
Maintainer: Matthew Raymer