error log:
Failed to check for updates: Error: Command failed: 4294967295
System.AggregateException: ����һ���������� ---> System.Exception: Invalid release entry: A497250E12BF04B6D5E4310C7ECFB21B0948EDAC desktop.xingdouhuoke-1.3.9-full.nupkg 228120536<div id="think_page_trace" style="position: fixed;bottom:0;right:0;font-size:14px;width:100%;z-index: 999999;color:
�� Squirrel.ReleaseEntry.ParseReleaseEntry(String entry)
�� System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
�� System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
�� System.Linq.Buffer`1..ctor(IEnumerable`1 source)
�� System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
�� Squirrel.ReleaseEntry.ParseReleaseFileAndApplyStaging(String fileContents, Nullable`1 userToken)
�� Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Squirrel.Update.Program.<CheckForUpdate>d__8.MoveNext()
--- �ڲ��쳣��ջ���ٵĽ�β ---
�� System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
�� System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
�� System.Threading.Tasks.Task`1.get_Result()
�� Squirrel.Update.Program.executeCommandLine(String[] args)
�� Squirrel.Update.Program.main(String[] args)
�� Squirrel.Update.Program.Main(String[] args)
---> (�ڲ��쳣 #0) System.Exception: Invalid release entry: A497250E12BF04B6D5E4310C7ECFB21B0948EDAC desktop.xingdouhuoke-1.3.9-full.nupkg 228120536<div id="think_page_trace" style="position: fixed;bottom:0;right:0;font-size:14px;width:100%;z-index: 999999;color:
�� Squirrel.ReleaseEntry.ParseReleaseEntry(String entry)
�� System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
�� System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
�� System.Linq.Buffer`1..ctor(IEnumerable`1 source)
�� System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
�� Squirrel.ReleaseEntry.ParseReleaseFileAndApplyStaging(String fileContents, Nullable`1 userToken)
�� Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Squirrel.Update.Program.<CheckForUpdate>d__8.MoveNext()<---
at ChildProcess.<anonymous> (node:electron/js2c/browser_init:2:4550)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
Update related code:
const { app, dialog, autoUpdater } = require("electron");
const log = require("electron-log");
import config from "../../config";
export const update = () => {
autoUpdater.setFeedURL({
url: `${
config.VITE_DESKTOP_ROOT
}/user/updateapplication?version=${app.getVersion()}`,
});
try {
autoUpdater.checkForUpdates();
} catch (error) {
log.error("checkForUpdates Failed to check for updates:", error);
}
autoUpdater.on("error", (error) => {
log.error("Failed to check for updates:", error);
});
autoUpdater.on("checking-for-update", () => {
log.info("checking-for-update");
});
autoUpdater.on("update-available", (info) => {
log.info("update-available");
log.info(info);
});
autoUpdater.on("update-not-available", function (info) {
// update-not-available
log.info(info);
});
autoUpdater.on("update-downloaded", () => {
app.whenReady().then(() => {
const clickId = dialog.showMessageBoxSync({
type: "info",
buttons: ["Update now", "Update later"],
title: "New version found",
message: "New version found",
cancelId: 1,
});
log.info("clickId", clickId, "type", typeof clickId);
if (clickId === 0) {
autoUpdater.quitAndInstall();
app.quit();
}
});
});
};
error log:
Update related code: