fix: resolve Electron auto-updater 404 errors

- Update repository URL to correct Gitea location
- Disable auto-updates due to Gitea hosting limitations
- Remove GitHub provider configuration from electron-builder
- Add comprehensive documentation for future update strategies
- Fixes HttpError 404 when checking for GitHub releases

The app was trying to check for updates on GitHub but the repository
is hosted on Gitea. Auto-updates are now disabled with manual
distribution as the current update mechanism.
This commit is contained in:
Matthew Raymer
2025-07-11 23:16:26 -07:00
parent bdef67cbe4
commit 2a9b6a6444
4 changed files with 189 additions and 16 deletions

View File

@@ -4,7 +4,7 @@ import type { MenuItemConstructorOptions } from 'electron';
import { app, MenuItem, ipcMain, dialog } from 'electron';
import electronIsDev from 'electron-is-dev';
import unhandled from 'electron-unhandled';
import { autoUpdater } from 'electron-updater';
// import { autoUpdater } from 'electron-updater';
import { promises as fs } from 'fs';
import { join } from 'path';
@@ -73,10 +73,11 @@ if (electronIsDev) {
}
// Configure auto-updater
autoUpdater.on('error', (error) => {
console.log('Auto-updater error (suppressed):', error.message);
// Don't show error dialogs for update check failures
});
// DISABLED: Auto-updates not supported on Gitea hosting
// autoUpdater.on('error', (error) => {
// console.log('Auto-updater error (suppressed):', error.message);
// // Don't show error dialogs for update check failures
// });
// Run Application
(async () => {
@@ -112,14 +113,15 @@ autoUpdater.on('error', (error) => {
}
});
// Auto-updates disabled - not supported on Gitea hosting
// Only check for updates in production builds, not in development or AppImage
if (!electronIsDev && !process.env.APPIMAGE) {
try {
autoUpdater.checkForUpdatesAndNotify();
} catch (error) {
console.log('Update check failed (suppressed):', error);
}
}
// if (!electronIsDev && !process.env.APPIMAGE) {
// try {
// autoUpdater.checkForUpdatesAndNotify();
// } catch (error) {
// console.log('Update check failed (suppressed):', error);
// }
// }
})();
// Handle when all of our windows are close (platforms have their own expectations).