Skip to content

fix(version-detect): spotify version detection on macOS - #3923

Open
MrPandir wants to merge 1 commit into
spicetify:v3-betafrom
MrPandir-forks:fix/macos-mdls-fallback
Open

fix(version-detect): spotify version detection on macOS#3923
MrPandir wants to merge 1 commit into
spicetify:v3-betafrom
MrPandir-forks:fix/macos-mdls-fallback

Conversation

@MrPandir

@MrPandir MrPandir commented Sep 7, 2026

Copy link
Copy Markdown

When trying to get the Spotify version via
mdls -name kMDItemVersion -raw /Applications/Spotify.app. I received (null).

mdls /Applications/Spotify.app full output:

kMDItemFSContentChangeDate = 1980-01-01 00:00:00 +0000
kMDItemFSCreationDate      = 1980-01-01 00:00:00 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Spotify.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""

Because the code treated the literal (null) from mdls as a non-empty result, semver parsing attempted to parse "(null)" and failed, causing spicetify apply to warn and skip module staging. Example of the error before the fix:

 WARN could not detect the Spotify version before apply error=failed to parse Spotify version '(null)': unexpected character '(' while parsing major version number
 INFO Stopping Spotify (if running)
 INFO force-killing Spotify processes
 INFO Restoring ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui.spa⁩ from .spa.backup
 INFO Extracting ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui.spa⁩ -> ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui⁩
 INFO Patching xpui/index.html to redirect to modules
 INFO using exposure patches embedded (11 patches)
 INFO Linking ⁨/Users/user/.config/spicetify/store⁩ -> ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui.tmp/store⁩
 INFO staged the embedded client payload
 WARN cannot detect the Spotify version: skipping module staging
 INFO using css map embedded (2585 entries)
 INFO rewrote class names in 50 file(s)
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.
 INFO Spotify launched via open -a /Applications/Spotify.app
 INFO Started Spotify
 INFO registered spicetify:// to /Users/user/Applications/Spicetify.app
 INFO Applied Spicetify to Spotify

After this fix the code treats mdls output equal to (null) as “no result” and correctly falls back to reading the Info.plist via defaults. Example after the fix:

 INFO Stopping Spotify (if running)
 INFO force-killing Spotify processes
 INFO Restoring ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui.spa⁩ from .spa.backup
 INFO Extracting ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui.spa⁩ -> ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui⁩
 INFO Patching xpui/index.html to redirect to modules
 INFO cached expose.json
 INFO cached classmap file 1020099/classmap-19f856aefd5.json
 INFO cached classmap file 1020099/META.json
 INFO cached classmap file 1020099/css-map.json
 INFO classmap 1020099 is current
 INFO using exposure patches /Users/user/.config/spicetify/classmaps/expose.json (11 patches)
 INFO Linking ⁨/Users/user/.config/spicetify/store⁩ -> ⁨/Applications/Spotify.app/Contents/Resources/Apps/xpui.tmp/store⁩
 INFO staged the embedded client payload
 INFO stdlib@1.10.4: checksum verified
 INFO Module added
 INFO Module enabled
 INFO staged system module stdlib@1.10.4
 INFO manager@1.2.2: checksum verified
 INFO Module added
 INFO Module enabled
 INFO staged system module manager@1.2.2
 INFO using classmap /Users/user/.config/spicetify/classmaps/1020099/classmap-19f856aefd5.json (2 stale leaf/leaves)
 INFO staged 4 module(s)
 INFO using css map embedded (2585 entries)
 INFO applied css-map overlay for 1020099 (2 entries)
 INFO rewrote class names in 51 file(s)
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.
 INFO Spotify launched via open -a /Applications/Spotify.app
 INFO Started Spotify
 INFO registered spicetify:// to /Users/user/Applications/Spicetify.app
 INFO Applied Spicetify to Spotify

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: f7d5f179-def0-49f8-9216-3bc1061d7d93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MrPandir MrPandir changed the title Fix: Spotify version detection on macOS fix(version-detect): Spotify version detection on macOS Sep 7, 2026
@MrPandir MrPandir changed the title fix(version-detect): Spotify version detection on macOS fix(version-detect): spotify version detection on macOS Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant