Skip to content

[Bug]: Broken logic for blocking spotify auto-updates, with an unintended side effect #15471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
prasanthcakewalk opened this issue May 16, 2025 · 2 comments · May be fixed by #15486
Open
3 tasks done

[Bug]: Broken logic for blocking spotify auto-updates, with an unintended side effect #15471

prasanthcakewalk opened this issue May 16, 2025 · 2 comments · May be fixed by #15486
Labels

Comments

@prasanthcakewalk
Copy link

prasanthcakewalk commented May 16, 2025

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

spotify

Expected/Current Behaviour

The current logic for blocking auto-updates in the spotify package is as follows:

During installation:

  1. Delete the "\%LOCALAPPDATA%\Spotify\Update\" directory (with the -Recurse parameter, because it is a directory).
  2. Create a file at "\%LOCALAPPDATA%\Spotify\Update", and mark it as a read-only, system file.

During uninstallation:

  1. Force-delete the file at "\%LOCALAPPDATA%\Spotify\Update\" (without the -Recurse parameter, because it is supposed to be a file not a directory).

The file deletion step was added in PR #12737 to fix Bug #10841.

Intended/expected behavior: Spotify will not be able to recreate the Update folder, because it is being blocked by a file marked read-only and system.

Current, actual behavior: The first time Spotify is started after an install or an upgrade, it force-deletes the Update file. The next time an update is available, the Update directory gets recreated. So, the auto-update doesn't get blocked anymore. This was reported in Bug #12429.

Unintended side effect: When spotify is updated through scoop, during the uninstall step, the deletion command is run without the recurse parameter (because Update is expected to be a file). This causes the update process to pause for user-input with the following message:

The item at C:\Users<username>\AppData\Local\Spotify\update has children and the Recurse parameter was not specified. If you continue, all children will be removed with the item. Are you sure you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):

This is the issue I'm reporting here.

Expected behavior: Spotify update via scoop proceeds without pausing for user-input.

Steps to Reproduce

1. Install spotify: `scoop install extras/spotify`.
2. Wait until a spotify update is available.
3. `scoop update` followed by `scoop update spotify`.

Possible Solution

Possible quick fix to remove the unintended user prompt:

  • One could add the -Recurse parameter to the deletion step in the uninstaller.
  • A cleaner approach would be to get rid of all the steps related to blocking auto-updates, because this logic doesn't work anymore anyway.

Tackling the auto-update issue:

These may both be beyond the scoop of scoop installer, but maybe an installer note could be added as suggested in #12429 (comment).

Scoop and Buckets Version

> scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)

'main' bucket:
038e14767 (HEAD -> master, origin/master, origin/HEAD) oxlint: Update to version 0.16.11

'extras' bucket:
0cc3a06afc (HEAD -> master, origin/master, origin/HEAD) yasb: Update to version 1.7.3

'nonportable' bucket:
417c956f (HEAD -> master, origin/master, origin/HEAD) grammarly-np: Update to version 1.2.159.1665

Scoop Config

> scoop config

last_update                       scoop_branch scoop_repo                              use_isolated_path
-----------                       ------------ ----------                              -----------------
2025-05-16T08:04:05.8594676-05:00 master       https://github.com/ScoopInstaller/Scoop              True

PowerShell Version

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.4391
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.4391
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

No response

@HUMORCE
Copy link
Member

HUMORCE commented May 16, 2025

Could you make a PR for this?

@prasanthcakewalk
Copy link
Author

Yup, I can submit a PR within the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants