mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Electron.AutoUpdater.CheckForUpdatesAsync() not returning #455
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ipax77 on GitHub (Feb 24, 2020).
Originally assigned to: @GregorBiswanger on GitHub.
I am trying to check for an update (GitHub Release) and let the user decide whether to download and/or install (and maybe show the download progress in my dotnet core app).
var result = await Electron.AutoUpdater.CheckForUpdatesAndNotifyAsync();Is working as expected and installs the new Version after closing the app.
but
never returns
Console output is:
Expected behavior would be to return a result.
electron-builder version=22.3.2
packaging platform=win32 arch=x64 electron=7.1.13
building target=nsis
ElectronNET.API 7.30.2
.NET Core 3.1
npm 6.13.7
GitHub
@GregorBiswanger commented on GitHub (May 10, 2020):
The problem here is that the app must first be packed with electron-builder so that the API works correctly. For this a
dev-app-update.ymlfile is created. For example with the following command:electronize build /target win /electron-params --publish=alwaysIn addition, the settings have to fit in the
electron.manifest.jsonfile under "build".https://www.electron.build/auto-update
Alternatively, you only get a null object or the following exception at debug time:

That doesn't make debugging easy, of course. Definitely try our latest version. I will soon record a YouTube video and show how it works.
@ipax77 commented on GitHub (May 10, 2020):
var result = await Electron.AutoUpdater.CheckForUpdatesAndNotifyAsync();is working as expected (published on GitHub)
but
triggers the Java-Part ("Found version 2.0.0 (url: sc2dsstats.desktop-Setup-2.0.0.exe)") but I don't get a result back in C# (no error, just waiting for ever)
@GregorBiswanger commented on GitHub (May 10, 2020):
Okay, I see.. it must be because the Json serializer is causing problems..
is difficult for me to fix now...
Can you pull the repository here and directly reference the CLI assembly? Manual packages that you need can be found in the WebApp project... then start your app and attach to the running process with visual studio... I think you will be able to see exactly what the problem is with an exception..
@GregorBiswanger commented on GitHub (May 15, 2020):
In this video I show, how you can work with the repository:
https://youtu.be/Po-saU_Z6Ws
@ipax77 commented on GitHub (May 16, 2020):
cool video, ty! <3
You were right I do get an Error in the Json serializer:
in ElectronNET.API/AutoUpdater.cs line 426
return taskCompletionSource.Task;I wasn‘t able to dig deeper because of missing source files for that ..
@ipax77 commented on GitHub (Aug 15, 2021):
I was able to retest it with v13.5.1 and dotnet 6 preview 7 and everything is working, now. Maybe because I am wiser, now.