Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.87k stars 10.69k forks source link

Spotify endless loop "cannot be verified" #161665

Open matkoch opened 10 months ago

matkoch commented 10 months ago

Verification

Description of issue

I've updated Spotify about 2 weeks ago. I'm not sure I restarted my system since then, but once I did today, I'm in an endless loop of this dialog:

2023-12-05-CleanShot-CleanShot-001443

It doesn't matter what option I choose, after 10 seconds, the dialog appears again (and steals focus).

I tried brew uninstall (with force), but it kept happening.

I noticed that after disabling Spotify from login items, it stops happening.

2023-12-05-System Settings-Login Items-001445

Command that failed

brew uninstall --cask spotify --force

Output of command with --verbose --debug

...

Output of brew doctor and brew config

HOMEBREW_VERSION: 4.1.23
ORIGIN: https://github.com/Homebrew/brew
HEAD: fc259153591a309e2b6fee6f971eb61b16a3b6c0
Last commit: 12 hours ago
Core tap JSON: 05 Dec 07:01 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.40.0 => /opt/homebrew/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.0-arm64
CLT: N/A
Xcode: 15.0.1
Rosetta 2: false

Output of brew tap

1password/tap
adoptopenjdk/openjdk
azure/functions
homebrew/bundle
homebrew/cask-drivers
homebrew/cask-fonts
homebrew/cask-versions
iina/mpv-iina
jetbrains/utils
oven-sh/bun
powershell/tap
romkatv/powerlevel10k
sidneys/homebrew
teamookla/speedtest
yt-dlp/taps
bevanjkay commented 10 months ago

Can you please include the details from brew config as it helps to diagnose the issue knowing which software / hardware your system utilises.

matkoch commented 10 months ago
HOMEBREW_VERSION: 4.1.23
ORIGIN: https://github.com/Homebrew/brew
HEAD: fc259153591a309e2b6fee6f971eb61b16a3b6c0
Last commit: 12 hours ago
Core tap JSON: 05 Dec 07:01 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.40.0 => /opt/homebrew/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.0-arm64
CLT: N/A
Xcode: 15.0.1
Rosetta 2: false
bevanjkay commented 10 months ago

@matkoch I can replicate this issue, I'm not sure of the issue but it seems to be do with Quarantine. I'll look into it further tomorrow.

krehel commented 10 months ago

Is this issue with the most up to date version of Spotify? Looks like the software was updated on 24-Nov, which is after the date of download in the original screenshot. If not, can you update and see if this is replicated?

I also assume this is the Apple Silicon native version of Spotify, and not the Intel version with Rosetta?

I wasn't able to replicate this, unfortunately. (I know, not helpful.) I don't use Spotify anymore; I installed on a machine that has never had it. But no issues with brew install and launching.

bevanjkay commented 10 months ago

Interestingly I have seen this issue before, but got around it with a quarantine method that I will not recommend. But it seems that after uninstalling, and doing a full clean install the issue does not persist.

krehel commented 10 months ago

Yeah, I wasn't going to post as I didn't think it would be helpful, but thought a data point from never having it installed and being successful might point to something wrong for an upgrade workflow.

matkoch commented 10 months ago

@krehel the screenshots are from yesterday. I also did a brew uninstall and brew install right before. Idk why the screenshots still mention Nov 20.

ringods commented 10 months ago

I encounter this today as well with the very latest version on my Intel MBP.

Screenshot 2023-12-06 at 19 56 16

But it is not the first time I have this with Spotify. I have had this with some of the previous version too. In such case, I open System Settings and go to Privacy & Security. After the previous dialog, you should see the following:

Screenshot 2023-12-06 at 19 59 32

After clicking Open Anyway, you get the macOS cannot verify... dialog again. If you click on Open there, Spotify launches.

All in all, Spotify should be verified company. The steps above don't feel safe & shouldn't be needed

matkoch commented 10 months ago

FYI, the "Open Anyway" did NOT fix it for me. I should've included that in the OP.

jarne commented 9 months ago

Had the same issue here on an M1 Mac. uninstall and then install again fixed it for me (reinstall didn't).

tuxpeople commented 9 months ago

Had the same issue here on an M1 Mac. uninstall and then install again fixed it for me (reinstall didn't).

Same problem here, but on an Intel Mac. uninstall and install fixed it for me as well:

 tdeutsch at thor in ~
$ brew uninstall spotify
==> Uninstalling Cask spotify
==> Removing launchctl service com.spotify.webhelper
Password:
==> Backing App 'Spotify.app' up to '/usr/local/Caskroom/spotify/1.2.26.1187,36b
==> Removing App '/Applications/Spotify.app'
==> Purging files for version 1.2.26.1187,36b715a1,270 of Cask spotify

 tdeutsch at thor in ~
$ brew install spotify
Running `brew update --auto-update`...
Installing from the API is now the default behaviour!
You can save space and time by running:
  brew untap homebrew/core
  brew untap homebrew/cask
==> Auto-updated Homebrew!
Updated 4 taps (aquasecurity/trivy, homebrew/cask-versions, homebrew/cask-fonts and homebrew/cask).
==> New Casks
font-playwrite-co          font-playwrite-fr-trad     sakura

You have 4 outdated formulae installed.

==> Downloading https://download.scdn.co/Spotify.dmg
###################################################################################################################################################################### 100.0%
Warning: No checksum defined for cask 'spotify', skipping verification.
==> Installing Cask spotify
==> Moving App 'Spotify.app' to '/Applications/Spotify.app'
🍺  spotify was successfully installed!

MacOS only asked if I really want to open this app downloaded by cask from the internet. This was a one time only dialog, next start of Spotify was without any dialogs.

ringods commented 9 months ago

Today, this cannot be verified error started to happen for cask warp on my M1 MacBook Pro also. An uninstall, cleanup and install (not reinstall) worked to resolve it, but it is quite annoying having to do this.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

ulgens commented 8 months ago

This is definitely not stale. I'm having this issue once in every two weeks.

p-linnane commented 8 months ago

Apologies for the issue going stale, and we appreciate everyone's patience. We are looking into this and believe we have a lead on why it's happening. More to come.

ringods commented 7 months ago

Looking forward to the direction you are investigating, @p-linnane. Bumped into this problem again today and would really see this fixed. It is so annoying.

bevanjkay commented 7 months ago

Did you do anything specific before it happened again? Trying to establish how to replicate the issue consistently

ringods commented 7 months ago

From time to time, I upgrade all my casks using brew-cask-upgrade. When I run brew cu --all, I see which ones need an update. A few days ago, I picked up this new release of Spotify.

Current output from brew cu --all for Spotify:

26/33  spotify                     1.2.30.1135                   1.2.30.1135                    Y   [   OK   ]

Since then, my Spotify setup is broken again with the cannot be verified error again. A brew reinstall --cask spotify doesn't help.

bevanjkay commented 7 months ago

Thanks for the info. You can fix it temporarily by running brew uninstall spotify and then brew install spotify

ulgens commented 7 months ago

Thanks for the info. You can fix it temporarily by running brew uninstall spotify and then brew install spotify

This doesn't surpass the problem for me. I also had to clean the cache and restart the device to get rid of that error.

a1rwulf commented 7 months ago

This is a super annoying issue. I uninstalled the app and ran brew cleanup but that still doesn't get rid of the message loop. How can you get this message for an app that doesn't even exist on the system!?

ihor-sviziev commented 6 months ago

Same issue with spotify happened to me today. brew uninstall --cask spotify, brew cleanup, and brew install --cask spotify helped, but it's annoying. This definitely should be fixed. It looks like the issue started happening after upgrading MacOS from 14.4 to 14.4.1. Maybe some system files that were modified by Brew get overridden during the update?

razvanazamfirei commented 6 months ago

Thanks for your patience, everyone! We're pushing a change that hopefully fixes the issue. If people are still having an issue, please let me know. Please also provide the output of:

launchctl list | grep spotify

as well as any Spotify-related Console logs.

ihor-sviziev commented 6 months ago

@razvanazamfirei, unfortunately, today got a new update, and the same issue happened.

image

➜  ~ launchctl list | grep spotify                                            ✔

26255   0   application.com.spotify.client.138935288.141593500
Logs ``` default 12:26:10.810897+0300 Spotlight Requested application com.spotify.client has policy OK, associated categories:DH1003 associated sites:open.spotify.com,www.open.spotify.com,m.open.spotify.com,mobile.open.spotify.com,play.spotify.com,www.play.spotify.com,m.play.spotify.com,mobile.play.spotify.com equivalent bundle identifiers:com.spotify.client,com.spotify.client.watchkitapp default 12:26:10.953073+0300 lsd com.spotify.client/Unknown Persona:5:5:1:1:Building bundle record for app default 12:26:10.953207+0300 lsd com.spotify.client/Unknown Persona:5:5:2:1:Built bundle record for app default 12:26:10.963915+0300 lsd com.spotify.client/Unknown Persona:5:4:2:1:_LSServerRegisterItemInfo result = 0 default 12:26:10.986938+0300 runningboardd Assertion 420-845-140826 (target:app) will be created as active default 12:26:10.987128+0300 runningboardd Executing launch request for app (LS launch com.spotify.client) default 12:26:10.987143+0300 runningboardd Checking PreventLaunch: global:0 exPath:/Applications/Spotify.app/Contents/MacOS/Spotify predicates:(null) allow:(null) default 12:26:10.987168+0300 runningboardd Creating and launching job for: app default 12:26:10.987179+0300 runningboardd _mutateContextIfNeeded called for com.spotify.client default 12:26:10.987418+0300 runningboardd app: -[RBPersonaManager personaForIdentity:context:personaUID:personaUniqueString:] required 0.000000 ms (wallclock); resolved to {4294967295, (null)} default 12:26:10.988197+0300 runningboardd 'app' Constructed job description: { count = 23, transaction: 0, voucher = 0x0, contents = "Platform" => : 1 "ProcessType" => { length = 3, contents = "App" } "EnableTransactions" => : false "_ManagedBy" => { length = 22, contents = "com.apple.runningboard" } "CFBundleIdentifier" => { length = 18, contents = "com.spotify.client" } "_ResourceCoalition" => { length = 60, contents = "app" } "_DisablePointerAuth" => : true "ThrottleInterval" => : 2147483647 "MachServices" => { count = 0, transaction: 0, voucher = 0x0, contents = } "EnablePressuredExit" => : false "LimitLoadToSessionType" => { count = 2, capacity = 8, contents = 0: { length = 4, contents = "Aqua" } 1: { length = 11, contents = "LoginWindow" } } "InitialTaskRole" => : 2 "EnvironmentVariables" => { count = 12, transaction: 0, voucher = 0x0, contents = "__CF_USER_TEXT_ENCODING" => { length = 13, contents = "0x1F5:0x0:0x0" } "TMPDIR" => { length = 49, contents = "/var/folders/cs/l3838s9x1gdcktq5p9jlmcpc0000gn/T/" } "SHELL" => { length = 8, contents = "/bin/zsh" } "HOME" => { length = 11, contents = "/Users/ihor" } "SSH_AUTH_SOCK" => { length = 51, contents = "/private/tmp/com.apple.launchd.0f87TKIY8v/Listeners" } "LOGNAME" => { length = 4, contents = "ihor" } "PATH" => { length = 29, contents = "/usr/bin:/bin:/usr/sbin:/sbin" } "XPC_SERVICE_NAME" => { length = 19, contents = "com.apple.Spotlight" } "__CFBundleIdentifier" => { length = 18, contents = "com.spotify.client" } "COMMAND_MODE" => { length = 8, contents = "unix2003" } "USER" => { length = 4, contents = "ihor" } "XPC_FLAGS" => { length = 3, contents = "0x0" } } "_AdditionalProperties" => { count = 1, transaction: 0, voucher = 0x0, contents = "RunningBoard" => { count = 4, transaction: 0, voucher = 0x0, contents = "TMPDIR" => { length = 49, contents = "/var/folders/cs/l3838s9x1gdcktq5p9jlmcpc0000gn/T/" } "HOME" => { length = 11, contents = "/Users/ihor" } "RunningBoardLaunchedIdentity" => { count = 5, transaction: 0, voucher = 0x0, contents = "AJL" => { length = 50, contents = "application.com.spotify.client.138935288.141593500" } "TYPE" => : 1 "AUID" => : 501 "EAI" => { length = 18, contents = "com.spotify.client" } "PLAT" => : 1 } "RunningBoardLaunched" => : true } } "ExitTimeOut" => : 1 "Label" => { length = 50, contents = "application.com.spotify.client.138935288.141593500" } "WaitForDebugger" => : true "MaterializeDatalessFiles" => : true "WorkingDirectory" => { length = 1, contents = "/" } "_LaunchType" => : 3 "AbandonProcessGroup" => : true "ProgramArguments" => { count = 1, capacity = 8, contents = 0: { length = 48, contents = "/Applications/Spotify.app/Contents/MacOS/Spotify" } } "Program" => { length = 48, contents = "/Applications/Spotify.app/Contents/MacOS/Spotify" } } default 12:26:10.999443+0300 runningboardd [app:26622] is not RunningBoard jetsam managed. default 12:26:10.999460+0300 runningboardd [app:26622] This process will not be managed. default 12:26:10.999479+0300 runningboardd Now tracking process: [app:26622] default 12:26:11.001492+0300 runningboardd Using default underlying assertion for app: [app:26622] default 12:26:11.001923+0300 runningboardd Acquiring assertion targeting [app:26622] from originator [app:26622] with description , ]> default 12:26:11.002070+0300 runningboardd Assertion 420-420-140827 (target:[app:26622]) will be created as active default 12:26:11.002652+0300 runningboardd [app:26622] reported to RB as running default 12:26:11.002551+0300 runningboardd Calculated state for app: running-active (role: UserInteractive) (endowments: ) default 12:26:11.002794+0300 runningboardd [app:26622] Ignoring jetsam update because this process is not memory-managed default 12:26:11.002809+0300 runningboardd [app:26622] Ignoring suspend because this process is not lifecycle managed default 12:26:11.002825+0300 runningboardd [app:26622] Set darwin role to: UserInteractive default 12:26:11.003026+0300 runningboardd [app:26622] Ignoring GPU update because this process is not GPU managed default 12:26:11.003096+0300 runningboardd [app:26622] Ignoring memory limit update because this process is not memory-managed default 12:26:11.005742+0300 runningboardd Acquiring assertion targeting [app:26622] from originator [osservice:371] with description ]> default 12:26:11.005743+0300 runningboardd Calculated state for app: running-active (role: UserInteractive) (endowments: ) default 12:26:11.006145+0300 runningboardd Assertion 420-371-140828 (target:[app:26622]) will be created as active default 12:26:11.007812+0300 runningboardd Invalidating assertion 420-845-140826 (target:app) from originator [osservice:845] default 12:26:11.007867+0300 runningboardd Calculated state for app: running-active (role: UserInteractive) (endowments: ) default 12:26:11.009238+0300 runningboardd [app:26622] Ignoring jetsam update because this process is not memory-managed default 12:26:11.009274+0300 runningboardd [app:26622] Ignoring suspend because this process is not lifecycle managed default 12:26:11.009361+0300 runningboardd [app:26622] Ignoring GPU update because this process is not GPU managed default 12:26:11.009493+0300 runningboardd [app:26622] Ignoring memory limit update because this process is not memory-managed default 12:26:11.009546+0300 runningboardd [app:26622] Ignoring jetsam update because this process is not memory-managed default 12:26:11.009596+0300 runningboardd [app:26622] Ignoring suspend because this process is not lifecycle managed default 12:26:11.011085+0300 loginwindow -[PersistentAppsSupport applicationReady:] | App: Spotify, ready, updating active tracking timer default 12:26:11.011137+0300 loginwindow -[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : Spotify default 12:26:11.035943+0300 gamepolicyd Hit the server for a process handle 1881bcbe000067fe that resolved to: [app:26622] default 12:26:11.035983+0300 gamepolicyd Received state update for 26622 (app, running-active-NotVisible default 12:26:11.062894+0300 dmd Received xpc stream event (distributed notification matching) with name: com.apple.LaunchServices.applicationRegistered user info: { bundleIDs = ( "com.spotify.client" ); isPlaceholder = 0; } default 12:26:11.063224+0300 dmd Received xpc stream event (distributed notification matching) with name: com.apple.LaunchServices.applicationRegistered user info: { bundleIDs = ( "com.spotify.client.startuphelper" ); isPlaceholder = 0; } default 12:26:11.108820+0300 gamepolicyd Received state update for 26622 (app, running-active-NotVisible default 12:26:11.112656+0300 runningboardd [app:26622] Ignoring jetsam update because this process is not memory-managed default 12:26:11.112674+0300 runningboardd Calculated state for app: running-active (role: UserInteractiveNonFocal) (endowments: ) default 12:26:11.112679+0300 runningboardd [app:26622] Ignoring suspend because this process is not lifecycle managed default 12:26:11.112698+0300 runningboardd [app:26622] Set darwin role to: UserInteractiveNonFocal default 12:26:11.112709+0300 runningboardd [app:26622] Ignoring GPU update because this process is not GPU managed default 12:26:11.112729+0300 runningboardd [app:26622] Ignoring memory limit update because this process is not memory-managed default 12:26:11.112996+0300 gamepolicyd Received state update for 26622 (app, running-active-NotVisible default 12:26:14.037178+0300 tccd AUTHREQ_ATTRIBUTION: msgID=501.56, attribution={accessing={TCCDProcess: identifier=com.spotify.client, pid=26622, auid=501, euid=501, binary_path=/Applications/Spotify.app/Contents/MacOS/Spotify}, requesting={TCCDProcess: identifier=com.apple.syspolicyd, pid=501, auid=0, euid=0, binary_path=/usr/libexec/syspolicyd}, }, default 12:26:14.055125+0300 tccd AUTHREQ_SUBJECT: msgID=501.56, subject=com.spotify.client, default 12:26:14.057121+0300 tccd -[TCCDAccessIdentity staticCode]: static code for: identifier com.spotify.client, type: 0: 0x122f093d0 at /Applications/Spotify.app default 12:26:14.065609+0300 kernel ASP: Security policy would not allow process: 26622, /Applications/Spotify.app/Contents/MacOS/Spotify default 12:26:14.071047+0300 runningboardd [app:26622] termination reported by launchd (9, 8, 9) default 12:26:14.071130+0300 runningboardd Removing process: [app:26622] default 12:26:14.071620+0300 runningboardd Removing launch job for: [app:26622] default 12:26:14.072063+0300 runningboardd Removed job for [app:26622] default 12:26:14.072107+0300 runningboardd Removing assertions for terminated process: [app:26622] default 12:26:14.080430+0300 runningboardd Calculated state for app: none (role: None) (endowments: (null)) default 12:26:14.080734+0300 runningboardd Calculated state for app: none (role: None) (endowments: (null)) default 12:26:14.086889+0300 launchservicesd Hit the server for a process handle 1881bcbe000067fe that resolved to: [app:26622] default 12:26:14.088507+0300 gamepolicyd Received state update for 26622 (app, none-NotVisible default 12:26:14.101738+0300 loginwindow -[PersistentAppsSupport applicationQuit:] | for app:Spotify, _appTrackingState = 2 default 12:26:14.101768+0300 loginwindow -[PersistentAppsSupport applicationQuit:] | App: Spotify, quit, updating active tracking timer default 12:26:19.193182+0300 NotificationCenter Looking up app info for com.spotify.client default 12:26:19.214807+0300 NotificationCenter Found info for com.spotify.client at . app name: Spotify activities: ["pv-d66c169b947eca", "NOTIFICATION#2FNC3A47ZF:com.spotify.client"] ```
ulgens commented 5 months ago

I also had the issue with the latest update, but the error message appeared less often. I think it was only once, I wasn't exactly watching for it but it was definitely not frustrating as before.

jeremie-huy commented 5 months ago

Tried a bunch of uninstall/cleanup/update/reinstall but nothing changed.

What did it for me was to disable Spotify in the Login Items -> Allow in the Background list, the app still works so all good I guess?

ihor-sviziev commented 5 months ago

@razvanazamfirei, I've got a new update today, and this time, Spotify was running while I ran brew upgrade --cask.

==> Upgrading 1 outdated package:
spotify 1.2.34.783,923721d9,4676 -> 1.2.35.663,b699649e,5769

After the upgrade, I re-launched my Spotify, and everything worked fine—it just launched. Now, I'm confused. This behavior may be broken when the Spotify app is not running during upgrade.

Edit: Today, I got another update, and Spotify wasn't running at that time. After the upgrade, I tried to open Spotify, and got this issue again:

image

So it looks like the issue appear only when Stotify app is closed

Details

``` default 13:56:21.123498+0300 runningboardd Launch request for app[0] is using uid 501 (divined from auid 501 euid 501) default 13:56:21.123559+0300 runningboardd Acquiring assertion targeting app from originator [osservice:87001] with description attributes:[ ]> default 13:56:21.123619+0300 runningboardd Assertion 394-87001-1812140 (target:app) will be created as active default 13:56:21.123780+0300 runningboardd Executing launch request for app (LS launch com.spotify.client) default 13:56:21.123805+0300 runningboardd Checking PreventLaunch: global:0 exPath:/Applications/Spotify.app/Contents/MacOS/Spotify predicates:(null) allow:(null) default 13:56:21.123837+0300 runningboardd Creating and launching job for: app default 13:56:21.125693+0300 runningboardd _mutateContextIfNeeded called for com.spotify.client default 13:56:21.125749+0300 runningboardd app: -[RBPersonaManager personaForIdentity:context:personaUID:personaUniqueString:] required 0.000000 ms (wallclock); resolved to {4294967295, (null)} default 13:56:21.125838+0300 runningboardd 'app' Constructed job description: { count = 23, transaction: 0, voucher = 0x0, contents = "Platform" => : 1 "ProcessType" => { length = 3, contents = "App" } "EnableTransactions" => : false "_ManagedBy" => { length = 22, contents = "com.apple.runningboard" } "CFBundleIdentifier" => { length = 18, contents = "com.spotify.client" } "_ResourceCoalition" => { length = 60, contents = "app" } "_DisablePointerAuth" => : true "ThrottleInterval" => : 2147483647 "MachServices" => { count = 0, transaction: 0, voucher = 0x0, contents = } "EnablePressuredExit" => : false "LimitLoadToSessionType" => { count = 2, capacity = 8, contents = 0: { length = 4, contents = "Aqua" } 1: { length = 11, contents = "LoginWindow" } } "InitialTaskRole" => : 2 "EnvironmentVariables" => { count = 12, transaction: 0, voucher = 0x0, contents = "__CF_USER_TEXT_ENCODING" => { length = 13, contents = "0x1F5:0x0:0x0" } "TMPDIR" => { length = 49, contents = "/var/folders/cs/l3838s9x1gdcktq5p9jlmcpc0000gn/T/" } "SHELL" => { length = 8, contents = "/bin/zsh" } "HOME" => { length = 11, contents = "/Users/ihor" } "SSH_AUTH_SOCK" => { length = 51, contents = "/private/tmp/com.apple.launchd.Km7TVnGzKz/Listeners" } "LOGNAME" => { length = 4, contents = "ihor" } "PATH" => { length = 29, contents = "/usr/bin:/bin:/usr/sbin:/sbin" } "XPC_SERVICE_NAME" => { length = 19, contents = "com.apple.Spotlight" } "__CFBundleIdentifier" => { length = 18, contents = "com.spotify.client" } "COMMAND_MODE" => { length = 8, contents = "unix2003" } "USER" => { length = 4, contents = "ihor" } "XPC_FLAGS" => { length = 3, contents = "0x0" } } "_AdditionalProperties" => { count = 1, transaction: 0, voucher = 0x0, contents = "RunningBoard" => { count = 4, transaction: 0, voucher = 0x0, contents = "TMPDIR" => { length = 49, contents = "/var/folders/cs/l3838s9x1gdcktq5p9jlmcpc0000gn/T/" } "HOME" => { length = 11, contents = "/Users/ihor" } "RunningBoardLaunchedIdentity" => { count = 5, transaction: 0, voucher = 0x0, contents = "AJL" => { length = 50, contents = "application.com.spotify.client.141805413.145468815" } "TYPE" => : 1 "AUID" => : 501 "EAI" => { length = 18, contents = "com.spotify.client" } "PLAT" => : 1 } "RunningBoardLaunched" => : true } } "ExitTimeOut" => : 1 "Label" => { length = 50, contents = "application.com.spotify.client.141805413.145468815" } "WaitForDebugger" => : true "MaterializeDatalessFiles" => : true "WorkingDirectory" => { length = 1, contents = "/" } "_LaunchType" => : 3 "AbandonProcessGroup" => : true "ProgramArguments" => { count = 1, capacity = 8, contents = 0: { length = 48, contents = "/Applications/Spotify.app/Contents/MacOS/Spotify" } } "Program" => { length = 48, contents = "/Applications/Spotify.app/Contents/MacOS/Spotify" } } default 13:56:21.146261+0300 runningboardd [app:46169] is not RunningBoard jetsam managed. default 13:56:21.146279+0300 runningboardd [app:46169] This process will not be managed. default 13:56:21.146291+0300 runningboardd Now tracking process: [app:46169] default 13:56:21.146485+0300 runningboardd Calculated state for app: running-active (role: UserInteractive) (endowments: ) default 13:56:21.146995+0300 runningboardd Using default underlying assertion for app: [app:46169] default 13:56:21.147090+0300 runningboardd Acquiring assertion targeting [app:46169] from originator [app:46169] with description , ]> default 13:56:21.147334+0300 gamepolicyd Hit the server for a process handle 171d4a890000b459 that resolved to: [app:46169] default 13:56:21.147391+0300 gamepolicyd Received state update for 46169 (app, running-active-NotVisible default 13:56:21.147455+0300 runningboardd Assertion 394-394-1812141 (target:[app:46169]) will be created as active default 13:56:21.147644+0300 runningboardd [app:46169] Ignoring jetsam update because this process is not memory-managed default 13:56:21.147780+0300 runningboardd [app:46169] reported to RB as running default 13:56:21.147809+0300 runningboardd [app:46169] Ignoring suspend because this process is not lifecycle managed default 13:56:21.147859+0300 runningboardd [app:46169] Set darwin role to: UserInteractive default 13:56:21.147897+0300 runningboardd [app:46169] Ignoring GPU update because this process is not GPU managed default 13:56:21.147954+0300 runningboardd [app:46169] Ignoring memory limit update because this process is not memory-managed default 13:56:21.149959+0300 runningboardd Calculated state for app: running-active (role: UserInteractive) (endowments: ) default 13:56:21.155232+0300 runningboardd Acquiring assertion targeting [app:46169] from originator [osservice:362] with description ]> default 13:56:21.155299+0300 runningboardd Assertion 394-362-1812142 (target:[app:46169]) will be created as active default 13:56:21.156681+0300 runningboardd Invalidating assertion 394-87001-1812140 (target:app) from originator [osservice:87001] default 13:56:21.156905+0300 runningboardd Calculated state for app: running-active (role: UserInteractive) (endowments: ) default 13:56:21.158581+0300 runningboardd [app:46169] Ignoring jetsam update because this process is not memory-managed default 13:56:21.158624+0300 runningboardd [app:46169] Ignoring suspend because this process is not lifecycle managed default 13:56:21.158643+0300 runningboardd [app:46169] Ignoring GPU update because this process is not GPU managed default 13:56:21.158993+0300 runningboardd [app:46169] Ignoring memory limit update because this process is not memory-managed default 13:56:21.159152+0300 runningboardd [app:46169] Ignoring jetsam update because this process is not memory-managed default 13:56:21.159588+0300 runningboardd [app:46169] Ignoring suspend because this process is not lifecycle managed default 13:56:21.159817+0300 runningboardd Successfully acquired underlying assertion for [app:46169] default 13:56:21.159972+0300 runningboardd [app:46169] Ignoring GPU update because this process is not GPU managed default 13:56:21.160660+0300 runningboardd [app:46169] Ignoring memory limit update because this process is not memory-managed default 13:56:21.163537+0300 distnoted register name: com.apple.sharedfilelist.change object: com.apple.LSSharedFileList.ApplicationRecentDocuments/com.spotify.client token: 17800000039 pid: 86953 default 13:56:21.171931+0300 loginwindow -[PersistentAppsSupport applicationReady:] | App: Spotify, ready, updating active tracking timer default 13:56:21.171998+0300 loginwindow -[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : Spotify default 13:56:21.208277+0300 gamepolicyd Received state update for 46169 (app, running-active-NotVisible default 13:56:21.225281+0300 runningboardd Calculated state for app: running-active (role: UserInteractiveNonFocal) (endowments: ) default 13:56:21.225528+0300 runningboardd [app:46169] Ignoring jetsam update because this process is not memory-managed default 13:56:21.225563+0300 runningboardd [app:46169] Ignoring suspend because this process is not lifecycle managed default 13:56:21.225608+0300 runningboardd [app:46169] Set darwin role to: UserInteractiveNonFocal default 13:56:21.225642+0300 runningboardd [app:46169] Ignoring GPU update because this process is not GPU managed default 13:56:21.225702+0300 runningboardd [app:46169] Ignoring memory limit update because this process is not memory-managed default 13:56:21.260701+0300 gamepolicyd Received state update for 46169 (app, running-active-NotVisible default 13:56:26.292596+0300 runningboardd Assertion did invalidate due to timeout: 394-394-1812141 (target:[app:46169]) default 13:56:26.391503+0300 runningboardd [app:46169] Ignoring jetsam update because this process is not memory-managed default 13:56:26.391551+0300 runningboardd [app:46169] Ignoring suspend because this process is not lifecycle managed default 13:56:26.391596+0300 runningboardd [app:46169] Ignoring GPU update because this process is not GPU managed default 13:56:26.391685+0300 runningboardd [app:46169] Ignoring memory limit update because this process is not memory-managed default 13:56:26.391638+0300 runningboardd Calculated state for app: running-active (role: UserInteractiveNonFocal) (endowments: ) default 13:56:26.393142+0300 gamepolicyd Received state update for 46169 (app, running-active-NotVisible default 13:57:20.240510+0300 runningboardd Periodic Run States role:UserInteractiveNonFocal gpuRole:None explicitJetsamBand:0 memoryLimit:Inactive(Default) flags:60 guaranteedRunning:NO legacyFinishTaskReason:0 inheritances: primitiveAssertions:[ ] endowments:[ ]> ```

After pressing "cancel" button, I got the following logs:

Details

``` default 13:58:29.739398+0300 tccd AUTHREQ_ATTRIBUTION: msgID=515.160, attribution={accessing={TCCDProcess: identifier=com.spotify.client, pid=46169, auid=501, euid=501, binary_path=/Applications/Spotify.app/Contents/MacOS/Spotify}, requesting={TCCDProcess: identifier=com.apple.syspolicyd, pid=515, auid=0, euid=0, binary_path=/usr/libexec/syspolicyd}, }, default 13:58:29.750466+0300 tccd AUTHREQ_SUBJECT: msgID=515.160, subject=com.spotify.client, default 13:58:29.751527+0300 tccd -[TCCDAccessIdentity staticCode]: static code for: identifier com.spotify.client, type: 0: 0x12cb48700 at /Applications/Spotify.app default 13:58:29.756105+0300 kernel ASP: Security policy would not allow process: 46169, /Applications/Spotify.app/Contents/MacOS/Spotify default 13:58:29.758927+0300 runningboardd [app:46169] termination reported by launchd (9, 8, 9) default 13:58:29.759329+0300 runningboardd Removing process: [app:46169] default 13:58:29.759654+0300 runningboardd Removing launch job for: [app:46169] default 13:58:29.760040+0300 runningboardd Removed job for [app:46169] default 13:58:29.760071+0300 runningboardd Removing assertions for terminated process: [app:46169] default 13:58:29.765646+0300 runningboardd Calculated state for app: none (role: None) (endowments: (null)) default 13:58:29.765866+0300 runningboardd Calculated state for app: none (role: None) (endowments: (null)) default 13:58:29.770226+0300 gamepolicyd Received state update for 46169 (app, none-NotVisible default 13:58:29.770456+0300 launchservicesd Hit the server for a process handle 171d4a890000b459 that resolved to: [app:46169] default 13:58:29.780399+0300 loginwindow -[PersistentAppsSupport applicationQuit:] | for app:Spotify, _appTrackingState = 2 default 13:58:29.780436+0300 loginwindow -[PersistentAppsSupport applicationQuit:] | App: Spotify, quit, updating active tracking timer default 13:58:34.829301+0300 NotificationCenter Looking up app info for com.spotify.client default 13:58:34.840157+0300 NotificationCenter Found info for com.spotify.client at . app name: Spotify activities: ["pv-d66c169b947eca", "NOTIFICATION#2FNC3A47ZF:com.spotify.client"] ```

shiftgeist commented 5 months ago

For me a new entry below Settings -> Gatekeeper -> Allow applications downloaded from "App Store and identified developers appears after starting spotify with the same prompt as seen in the issue description. Where I could approve spotify. After that when starting a new option appeared to open spotify anyway.

ihor-sviziev commented 4 months ago

I got confused... Today got another update (spotify 1.2.36.959,04bf500c,859 -> 1.2.37.701,e66eb7bc,1226), and Spotify was stopped at that moment. After the upgrade, I tried to open Spotify and... it just works... Looks like it's not related to the fact that the app is running or no.

kfkonrad commented 4 months ago

I have the same issue, for me emptying the trash and running brew reinstall spotify does the trick. From what I gather there's a Spotify agent running in the background that's still the old version in the trash

I don't have a screenshot of that anymore (it's been a couple months) but I tracked down the error log in Console and that pointed to an executable in a trashed version of Spotify.app

emmaLP commented 3 months ago

Still experiencing this issue, any updates on the cause please?

image

Brew config:

HOMEBREW_VERSION: 4.3.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: 43eaeca50fe3b6c755f3fc9bc6f43669e0db1039
Last commit: 5 hours ago
Core tap JSON: 24 Jun 13:03 UTC
Core cask tap JSON: 24 Jun 13:03 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.45.2 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3 => /Applications/Xcode-15.3.0.app/Contents/Developer
Rosetta 2: false
rarylson commented 3 months ago

Workaround

Just like @matkoch mentioned in the description:

[...] after disabling Spotify from login items, it stops happening.

So just:

1) Open System Settings > Login Items, and toggle off Spotify.

2) Click on "Cancel" in the "cannot be verified" dialog.

Definitive fix

The root cause is that Homebrew was leaving the old Spotify login item when removing or upgrading the app.

This seem to be fixed by PR #170742, which is already merged.

After this fix, when removing Spotify, you should see the startup service being successfully removed:

$ brew uninstall --cask spotify
[...]
==> Removing launchctl service com.spotify.client.startuphelper
[...]

Now you can just reinstall Spotify.

andrewbraxton commented 2 months ago

I just hit this again, despite previously running brew uninstall spotify and seeing the startuphelper being removed. Are we sure this is fixed?

shiftgeist commented 2 months ago

For me a new entry below Settings -> Gatekeeper -> Allow applications downloaded from "App Store and identified developers appears after starting spotify with the same prompt as seen in the issue description. Where I could approve spotify. After that when starting a new option appeared to open spotify anyway.

This still works every time for me

  1. Open spotify
  2. Click on cancel for deletion dialog image
  3. Go to settings privacy & security and click on Open Anyway image
  4. Enter password/fingerprint if promted
  5. Click on Open in the unidentified application dialog
Arro commented 2 months ago

For whatever reason, the Spotify binary that hombrew is getting is not signed as from a legitimate developer. This is confusing to me, because it seems as though people downloading it directly from their browser (and installing it the old fashioned way) aren't also having this issue. Unless they are? I doubt it.

joh-klein commented 1 month ago

Happened again today, this fixed it, but this should not be the permanent solution:

brew uninstall --cask spotify && brew cleanup && brew install --cask spotify
noizo commented 1 month ago

Just happen to me again. Only brew uninstall --cask spotify && brew cleanup && brew install --cask spotify helps to run it again.

Workaround

Just like @matkoch mentioned in the description:

[...] after disabling Spotify from login items, it stops happening.

So just:

1. Open System Settings > Login Items, and toggle off Spotify.

2. Click on "Cancel" in the "cannot be verified" dialog.

Definitive fix

The root cause is that Homebrew was leaving the old Spotify login item when removing or upgrading the app.

This seem to be fixed by PR #170742, which is already merged.

After this fix, when removing Spotify, you should see the startup service being successfully removed:

$ brew uninstall --cask spotify
[...]
==> Removing launchctl service com.spotify.client.startuphelper
[...]

Now you can just reinstall Spotify.

Mentioned definitive fix is not definite.

lantrix commented 1 month ago

Just happen to me again. Only brew uninstall --cask spotify && brew cleanup && brew install --cask spotify helps to run it again. Mentioned definitive fix is not definite.

Same, I'm still getting it and this is the only workaround.

artmg commented 1 month ago

I also tried brew uninstall --cask spotify && brew cleanup && brew install --cask spotify to no avail. When I do

so the helper is still there!

My solution was to do BOTH workarounds:

That may be belt and braces but it did seem to work

noizo commented 4 weeks ago

3 weeks later. Screenshot 2024-09-07 at 13 49 04

I literally created an alias alias spor="brew uninstall --cask spotify && brew cleanup && brew install --cask spotify"

noizo commented 4 weeks ago

@bevanjkay So on 5th of September Spotify was running and playing. I run brew upgrade --greedy && brew cleanup and Spotify has updated. Since that day i had no Mac restarts, only sleep mode, until yesterday i shut it down. Spotify is in autostart, today i launched my Mac, result is on screenshot. More over, this window prevents me from manual start of any other application. Canceling is in constant loop, until i click Move to bin.

bevanjkay commented 4 weeks ago

Thanks for the info @noizo It seems that a computer restart might be key in replicating the issue - but this isn't consistent for me. The biggest hurdle for me has been not being able to replicate it regularly which has made this difficult to chase down.

I'm trying another launchctl removal, but I'm not convinced it will fix the issue - we will know after the next rounds of updates.

Arro commented 4 weeks ago

Not sure if you've tried this, but it happens when I do a brew upgrade . so you could uninstall, install the previous version, then brew upgrade spotify.

bevanjkay commented 3 weeks ago

@arro Definitely seems like the best way to go, I just haven't had access to a previous version of the Spotify application. I have a backup of the current one now, so can do some testing when there's another version bump.

ihor-sviziev commented 2 weeks ago

Just want to update - I got the same issue today, after upgrading to macOS Sequoia. Before that, I hadn'y any issues for a few months. Not sure if that's a new issue, but looks the same as previously.

@Arro I don't think that downgrade is possible, the download link is always the same - https://download.scdn.co/SpotifyARM64.dmg

ulgens commented 2 weeks ago

I got the same issue today, after upgrading to macOS Sequoia. Before that, I hadn't any issues for a few months.

It's exactly the same case here. Uninstall, clean purge and install solved it this time, but it was still annoying.

noizo commented 2 weeks ago

I had no issues with Spotify after upgrading to Sequoia. But last time i executed: launchctl remove com.spotify.client.startuphelper after removal.

brew uninstall --cask spotify 
brew cleanup 
launchctl remove com.spotify.client.startuphelper
brew install --cask spotify

seems like it works for now.

bevanjkay commented 2 weeks ago

Interesting finding @noizo - this would suggest that the launchctl item is not being successfully removed from the cask. launchctl remove com.spotify.client.startuphelper - this command is ran during uninstall.