spicetify / cli

Command-line tool to customize Spotify client. Supports Windows, MacOS, and Linux.
https://spicetify.app
GNU Lesser General Public License v2.1
18.18k stars 716 forks source link

Apply fails #524

Closed Xenation closed 3 years ago

Xenation commented 3 years ago

I had a theme applied using spicetify-cli and everything worked just fine until today. I run on Windows and started using spicetify around the beginning of this month (after the 1.1.56 spotify update). But today Spotify could not launch anymore, closing itself immediately. Thinking that an update might have broken something, I tried reapplying the theme. spicetify indicated that the version was not the same as the backup I had so I did the spicetify backup apply that was recommended, unfortunatly it seems to have failed with this message:

PS C:\Users\Xenation> spicetify backup apply
spicetify v1.2.1
info There is available backup.
info Clear current backup:
success Backup is cleared.
Backing up app files:
OK
Extracting:
[ 1 / 32 ] xpuifatal zip: not a valid zip file

I tried a simple spicetify apply too but it also failed:

PS C:\Users\Xenation> spicetify apply
spicetify v1.2.1
warning Spotify version and backup version are mismatched.
info Spotify client possibly just had an new update.
info Please run "spicetify backup apply".
Continue anyway? [y/N] y
Copying raw assets:
OK
Overwriting themed assets:
OK
Transferring user.css:
fatal open C:\Users\Xenation\AppData\Roaming\Spotify\Apps\login\css\user.css: The system cannot find the path specified.

I fetched the AppData/Roaming/Spotify files of a slightly older version from another computer, v1.1.56 (not modified through spicetify), but I can't 100% confirm that my current version was 1.1.57 as I could not access spotify's about menu. I noticed that, in my curent files, the Apps did not contain .spa files but folders instead, but I'm guessing this is because the apply could not entirely be completed. After replacing the files (by the .spa from the older clean install) spotify could launch again, but trying spicetify apply gave the same error as before, except now spotify did not close but displayed a black screen. I enabled the devtools to look at the Console and there was nothing, but after I deleted the (likely incomplete) folders from Apps to put what was in spicetify's backup folder, I got the same black screen but these errors:

The FetchEvent for "https://xpui.app.spotify.com/index.html" resulted in a network error response: the promise was rejected.
service-worker.js:1 Uncaught (in promise) no-response: no-response :: [{"url":"https://xpui.app.spotify.com/index.html","error":{}}]
    at D._handle (https://xpui.app.spotify.com/service-worker.js:1:20428)
    at async D._getResponse (https://xpui.app.spotify.com/service-worker.js:1:10198)

When I revert back to unmodified files in Apps (from v1.1.56) everything works again, but without any theme applied of course. I tried reinstalling Spotify and deleting spicetify's config, both did nothing to help.

Sorry if that is a bit of a lengthy, I tried to give as much info as I could, but of course I can give more if needed. Thanks

khanhas commented 3 years ago

Reinstall and run spicetify backup apply. After any Spotify update, run that command again, not just apply.

Xenation commented 3 years ago

Ok, Thanks. The spicetify backup apply worked on a clean Spotify install, but it was the first thing I did after the update and it did not work initially. Is a clean install required after every Spotify update? (Or maybe is there something else that I should have done after the update?)

khanhas commented 3 years ago

No, you don't have to. Just run spicetify backup apply after Spotify updates itself.