From 1507510db0e36d7e76bc328c36a19abb79df4cad Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Thu, 5 Sep 2024 12:27:24 +0200 Subject: [PATCH] [LW-11428] Un-brick auto-update on devices where it failed in the past --- CHANGELOG.md | 4 ++++ source/renderer/app/stores/AppUpdateStore.ts | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1a75f136..89e1d3c368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## vNext +### Fixes + +- Un-brick auto-update on devices where it failed in the past ([PR 3223](https://github.com/input-output-hk/daedalus/pull/3223)) + ## 6.0.1 ### Fixes diff --git a/source/renderer/app/stores/AppUpdateStore.ts b/source/renderer/app/stores/AppUpdateStore.ts index 07ee1de339..433d73912e 100644 --- a/source/renderer/app/stores/AppUpdateStore.ts +++ b/source/renderer/app/stores/AppUpdateStore.ts @@ -90,6 +90,12 @@ export default class AppUpdateStore extends Store { ); setup() { + // Unset `APP-AUTOMATIC-UPDATE-FAILED` on every application startup to try again if we failed in the past; + // otherwise this computer's auto-update would be bricked forever: + this.unsetAppAutomaticUpdateFailedRequest.execute().then((result) => { + logger.info('Resetting the APP-AUTOMATIC-UPDATE-FAILED flag on startup'); + }); + const actions = this.actions.appUpdate; actions.installUpdate.listen(this._installUpdate); actions.openAppUpdateOverlay.listen(this._openAppUpdateOverlay);