You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are attempting to use the channels feature that was added to electron-updater in #6505. However, there is an issue where if our channel is set to beta or alpha, (v1.4.3-beta on the beta channel for example) autoUpdater does not see the latest release (v1.5.0 for example).
After looking at GitHubProvider.ts, it seems that isCustomChannel is incorrectly being set to true when the release it is checking is latest. const isCustomChannel = !["alpha", "beta"].includes(String(hrefChannel))
Because of this, all of our latest/stable releases are treated as custom channels and are not downloaded when beta or alpha attempts to look for them and the following error is logged:
autoUpdater error: Error: No published versions on GitHub
at newError (C:\Program Files (x86)\Datalogic\Scan2Deploy Studio\resources\app.asar\node_modules\electron-updater\node_modules\builder-util-runtime\out\index.js:47:19)
at GitHubProvider.getLatestVersion (C:\Program Files (x86)\Datalogic\Scan2Deploy Studio\resources\app.asar\node_modules\electron-updater\out\providers\GitHubProvider.js:94:55)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async NsisUpdater.getUpdateInfoAndProvider (C:\Program Files (x86)\Datalogic\Scan2Deploy Studio\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:319:19)
at async NsisUpdater.doCheckForUpdates (C:\Program Files (x86)\Datalogic\Scan2Deploy Studio\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:333:24)
I believe this can be fixed by adding a check for null when assigning a value to isCustomChannel, since that is what hrefChannel will equal when looking at latest/stable releases. const isCustomChannel = hrefChannel !== null && !["alpha", "beta"].includes(String(hrefChannel));
Please let me know if there's anything I may have misread or left out, and thanks for your time.
The text was updated successfully, but these errors were encountered:
Electron Version: 23.2.1
Electron Type (current, beta, nightly): current
We are attempting to use the channels feature that was added to electron-updater in #6505. However, there is an issue where if our channel is set to beta or alpha, (v1.4.3-beta on the beta channel for example) autoUpdater does not see the latest release (v1.5.0 for example).
After looking at GitHubProvider.ts, it seems that
isCustomChannel
is incorrectly being set to true when the release it is checking is latest.const isCustomChannel = !["alpha", "beta"].includes(String(hrefChannel))
Because of this, all of our latest/stable releases are treated as custom channels and are not downloaded when beta or alpha attempts to look for them and the following error is logged:
I believe this can be fixed by adding a check for
null
when assigning a value toisCustomChannel
, since that is whathrefChannel
will equal when looking at latest/stable releases.const isCustomChannel = hrefChannel !== null && !["alpha", "beta"].includes(String(hrefChannel));
Please let me know if there's anything I may have misread or left out, and thanks for your time.
The text was updated successfully, but these errors were encountered: