diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index a093faaa8..97e375dee 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -270,6 +270,9 @@ jobs: - name: "Install sentry-cli" if: matrix.package != 'skip' && needs.configure.outputs.tag != null + # Downloads from Sentry's release registry: a Sentry outage or a broken install under + # Git Bash must not take down the release assets below. + continue-on-error: true shell: bash env: SENTRY_CLI_VERSION: '3.8.0' @@ -621,6 +624,9 @@ jobs: - name: "Install sentry-cli" if: needs.configure.outputs.tag != null && matrix.make_package == '1' + # Same as the Linux leg above: the install downloads from Sentry's registry, so a + # failure here must not block the release upload below. + continue-on-error: true shell: bash env: SENTRY_CLI_VERSION: '3.8.0' diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index a973d0364..3647303b9 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -1539,9 +1539,13 @@ ${If} $PortableMode = 0 ; Older installers did register cockatrice.exe above (and the removed ; MiniDumpWithFullMemory writer filled that folder), and that key survives this ; install, so WER would keep writing full dumps. Remove it, and clear the - ; legacy dumps nothing consumes anymore. + ; legacy dumps nothing consumes anymore. $LOCALAPPDATA resolves per shell context: + ; under "all" it points at ProgramData, so switch to "current" for the per-user + ; dumps folder and back afterwards; the registry delete works in either context. DeleteRegKey HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" + SetShellVarContext current RMDir /r "$LOCALAPPDATA\CrashDumps\Cockatrice" + SetShellVarContext all WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice" @@ -1644,9 +1648,12 @@ Section "un.Application" UnSecApplication ; Leftover WER LocalDumps key from pre-Sentry installers (see the installer note ; above): removing it here covers machines that uninstall without reinstalling. - ; The legacy full-memory dumps go with it; nothing consumes them anymore. + ; The legacy full-memory dumps go with it; nothing consumes them anymore. Same shell + ; context note as the installer: the per-user dumps folder needs "current". DeleteRegKey HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" + SetShellVarContext current RMDir /r "$LOCALAPPDATA\CrashDumps\Cockatrice" + SetShellVarContext all ; Only remove the file/protocol associations if we registered them (i.e. the ; install was not portable) and .cod is still owned by Cockatrice, so we don't diff --git a/cockatrice/src/client/crash/crash_reporter.cpp b/cockatrice/src/client/crash/crash_reporter.cpp index 2a6c1a750..07a0389c7 100644 --- a/cockatrice/src/client/crash/crash_reporter.cpp +++ b/cockatrice/src/client/crash/crash_reporter.cpp @@ -270,9 +270,12 @@ void CrashReporter::init(const QString &dsn, // crash envelope in /cache instead of dropping it at init, so the Ask dialog // decides its fate: giveConsent() flushes it via the transport retry, revokeConsent() // deletes it below. This also covers the first crash after switching to AlwaysSend, - // which giveConsent() (running after init) would otherwise miss. + // which giveConsent() (running after init) would otherwise miss. http_retry is required + // for the flush: without it the held envelope is written with a plain filename the retry + // scanner skips, and giveConsent()'s sentry_transport_retry() sends nothing. sentry_options_set_require_user_consent(options, 1); sentry_options_set_cache_keep(options, SENTRY_CACHE_KEEP_OFFLINE); + sentry_options_set_http_retry(options, 1); sentry_options_set_before_send(options, scrubEventBeforeSend, nullptr); ready = (sentry_init(options) == 0); #else