Nuzair46 / BlockTheSpot-Mac

Spotify Ad blocker for MacOS
GNU General Public License v3.0
1.35k stars 82 forks source link

Applying Spicetify results in SpotX being unable to be installed #35

Closed RWCoding58 closed 1 year ago

RWCoding58 commented 1 year ago

🧐 Have you fully read the README and viewed similar issues?

Сountry of your account

Singapore

What is your Spotify Plan?

Free

Do you have Spicetify installed?

Yes

ℹ Computer information

- Spotify: 1.1.98.691
- macOS: macOS Ventura 13.1
- Shell: zsh

📝 Description

  1. Run the SpotX script to install SpotX (bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh) -ceh -E leftsidebar for me)
  2. Run the Spicetify script to apply Spicetify (spicetify apply/spicetify backup apply, both result in the same error)
  3. Rerun the SpotX script (same as step 1)

At step 3, the script returns an "xpui not found!" error and asks to reinstall Spotify. The Spotify client, SpotX and Spicetify features work, and Spicetify can still be applied; the only problem is that SpotX can't be reapplied or updated without reinstalling Spotify. Interestingly, spicetify backup apply does specifically say it clears the backup, but the error still occurs even when running spicetify apply, which doesn't say anything about that. Honestly, I'm just assuming it's okay to install Spicetify on SpotX (which I might be wrong about) because of the FAQ section in the Windows client, which says it is okay to do so and recommended to install Spicetify on SpotX rather than the other way round. I apologise if I'm making any apparent mistakes, I don't know much about these things.

Edit: It appears that running spicetify apply overwrites all the SpotX patches, while spicetify backup apply doesn't.

🖵 Terminal Output

  1. (bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh) -ceh -E leftsidebar)

    SpotX-Mac by @SpotX-CLI


Spotify version: 1.1.98.691 SpotX-Mac version: 1.1.98.691-1

Creating xpui backup... Extracting xpui... Applying SpotX patches... Removing ad-related content... Removing premium-only features... Unlocking Spotify Connect... Adding experimental features... Removing logging... Enabling new home screen UI... Hiding non-music items on home screen... Clearing app cache... Rebuilding xpui... SpotX finished patching!

  1. (spicetify apply) spicetify v2.14.1 Copying raw assets: OK Overwriting themed assets: OK Transferring user.css: OK Applying additional modifications: OK Transferring extensions: OK Transferring custom apps: OK success Spotify is spiced up!

OR

  1. (spicetify backup apply) spicetify v2.14.1 info There is available backup. info Clear current backup: success Backup is cleared. Backing up app files: OK Extracting: OK Preprocessing: info Fetching remote CSS map for newer compatible tag version: master OK OK success Everything is ready, you can start applying now! Copying raw assets: OK Overwriting themed assets: OK Transferring user.css: OK Applying additional modifications: OK Transferring extensions: OK Transferring custom apps: OK success Spotify is spiced up!

  2. (bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh) -ceh -E leftsidebar)


    SpotX-Mac by @SpotX-CLI


Spotify version: 1.1.98.691 SpotX-Mac version: 1.1.98.691-1

xpui not found! Reinstall Spotify then try again. Exiting...

📸 Screenshots

No response

jetfir3 commented 1 year ago

@RWCoding58

Your "step 3" is expected behavior as the file that SpotX modifies has been altered by Spicetify.

Therefore, SpotX-Mac must be run before Spicetify -- SpotX will not be able to run AFTER running Spicetify unless Spotify is reinstalled or upgraded -- at that point you could re-patch the reinstalled/updated client with SpotX first, then run Spicetify again.

Is there a reason for "step 3" in your example? SpotX should only need to be run once per Spotify version.

There should be no reason that Spicetify is reverting SpotX patches requiring SpotX to be run a second time on the same install.. unless some of the Spicetify patches/themes/whatever conflict with the SpotX patches themselves... or there are previously existing Spicetify files causing issues. Completely uninstalling Spicetify and Spotify and starting fresh should correct any issues.

The standard workflow should be: Install/upgrade Spotify -> Run SpotX -> Run Spicetify

Update: I have since attempted to install Spicetify. With a SpotX-patched Spotify 1.1.98.691 I ran the 2 Spicetify install scripts/commands for mac. Running spicetify apply told me I must first run spicetify backup apply which seems to first create a backup and then apply itself. After that, opening up Spotify resulted in both SpotX patches + Spicetify features working as expected. Closing Spotify, I then ran spicetify apply -- this also resulted in both SpotX patches + Spicetify working as expected.

Of course, since using Spicetify, I am not about to run SpotX again a second time, unless: A. I first run spicetify restore which restores the backup that spicetify created (this should also result in SpotX patches still being enabled even after restoring Spicetify... as SpotX should be run before Spicetify.. resulting in Spicetify's backup containing the SpotX patches and not stock Spotify files) B. I re-install or update Spotify which would remove any SpotX/Spicetify patches made to the Spotify app.

If Spicetify was already run on 1.1.98.691 prior to attempting to use SpotX then it's possible that either a spicetify backup or spicetify altering the main files (and changing what SpotX looks for) could cause issues. So again, the workflow should always be: Install/upgrade Spotify -> Run SpotX commands of choice -> Run Spicetify spicetify backup apply (this avoids any pre-existing spicetify backup potentially causing issues).

And if SpotX needs to be run a second time on the same install for some reason (this should not be a common occurance).. and Spicetify has been in the mix.. the workflow would be: spicetify restore -> run spotx command of choice -> spicetify backup apply

If both SpotX and Spicetify is used in the suggested workflow order... in order for Spotify to be returned to 100% stock (without reinstalling): spicetify restore -> bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/uninstall.sh)

Disclaimer: I've never touched or used Spicetify before this quick test today so there may be other ways to handle these things.. but what I've described above in my update edit seems to at least be one route and way of handling it all.

Nuzair46 commented 1 year ago

@jetfir3 we can add those to a Notes section in the readme for users with spicetify

RWCoding58 commented 1 year ago

@jetfir3 Alright, thanks for the reply. The only reason why I considered rerunning SpotX was if there was any update to the patch. Also, thanks for finding a workaround besides reinstalling the app. This would probably be helpful information that could be put on the FAQ page as well as a notes section like @Nuzair46 mentioned. Once again, I apologise for any inconvenience, as I don't know much about these things.

jetfir3 commented 1 year ago

I may add some "spicetify detection" in the script to then add some wording to the script output.

But, yes, we will eventually add a notes/faq section specific to macOS to address mac-specific issues as things aren't setup or handled exactly as the windows version.