cli icon indicating copy to clipboard operation
cli copied to clipboard

WebNowPlaying Broken on Latest Spotify

Open Fosmos opened this issue 4 years ago • 12 comments

ℹ Computer information

  • Spotify version: 1.1.77.643.g3c4c6fc6
  • Spicetify version: 2.8.4

Nothing appears to be working (no cover, media controls, or info). Additionally, Rainmeter shows no errors or warnings in the log.

Tested on two seperate skins that use the plugin: https://visualskins.com/skin/cleartext https://www.deviantart.com/fosmos/art/Simply-858119562

Fosmos avatar Jan 19 '22 16:01 Fosmos

Can confirm this issue as well, the console reports the following:

Uncaught TypeError: Cannot read properties of undefined (reading 'getVolume')
    at Object.getVolume (spicetifyWrapper.js:36)
    at updateInfo (webnowplaying.js:58)
[email protected]:36
[email protected]:58

ToasterDEV avatar Jan 19 '22 18:01 ToasterDEV

You can (temporarily, until it's fixed) make it work again, by commenting out Line 58 in webnowplaying.js

//storage.VOLUME = Math.round(Spicetify.Player.getVolume() * 100); then just spicetify apply

Depending on what you use with Rainmeter, there may be issues with Volume control or fetching the current volume, but everything else works.

DanBeast1337 avatar Jan 19 '22 18:01 DanBeast1337

Just want to add in, since I was initially modifying the wrong webnowplaying.js file. Run this to get the path of the file: spicetify -e path webnowplaying.js

NikolasKomonen avatar Jan 21 '22 17:01 NikolasKomonen

Line 58 commented, it works again, except volume info of course... but... My Webnowplaying.js stops working after 5 mins, progress and position info stops getting info. Anyone more with that problem?

daplon avatar Jan 22 '22 14:01 daplon

The volume methods and events have moved from Player.origin to Platform.PlaybackAPI; I've attempted a fix for this change (see here: #1424 ), but at the moment it still requires extensions which listen for volume events to attach their listeners to Platform.PlaybackAPI._events (assuming my fix works and gets merged).

machinemessiah avatar Jan 23 '22 05:01 machinemessiah

I've attempted a fix for this change (see here: #1424 )

Replacing the lines you changed makes it work again, without commenting out anything in webnowplaying.js, so that's something.

DanBeast1337 avatar Jan 23 '22 11:01 DanBeast1337

You can (temporarily, until it's fixed) make it work again, by commenting out Line 58 in webnowplaying.js

//storage.VOLUME = Math.round(Spicetify.Player.getVolume() * 100); then just spicetify apply

Depending on what you use with Rainmeter, there may be issues with Volume control or fetching the current volume, but everything else works.

~~This didn't work for me, unless I somehow edited the wrong file. No change.~~

charmarkk avatar Jan 29 '22 03:01 charmarkk

Working for me by commenting out Line 58 in webnowplaying.js. I just needed to run spicetify apply again.

borsTiHD avatar Jan 29 '22 09:01 borsTiHD

~~This didn't work for me, unless I somehow edited the wrong file. No change.~~

I reinstalled via chocolately and it's working for me now. Maybe I had the wrong file/an old installation issue. Great fix @DanBeast1337!

charmarkk avatar Jan 29 '22 21:01 charmarkk

#1424 seems to have fixed this.

afonsojramos avatar Feb 01 '22 00:02 afonsojramos

the problem is back, i've commented the line

storage.VOLUME = Math.round(Spicetify.Player.getVolume() * 100);

but nothing happens, the actual versions are:

  • Spotify Windows (64 bits) 1.2.19.941.gbf202593
  • Spicetify v2.23.0

the script that i'm executing are:

iwr -useb https://raw.githubusercontent.com/spicetify/spicetify-cli/master/install.ps1 | iex
iwr -useb https://raw.githubusercontent.com/spicetify/spicetify-marketplace/main/resources/install.ps1 | iex

anybody have the same problem now?

Sol1vaN avatar Sep 01 '23 14:09 Sol1vaN

I need to reinstall spotify, clear backups and apply again the inyect of webnowplaying. And is working again.

Edited, new version of Spotify in 2 days... Webnowplaying is broken again.

daplon avatar Sep 01 '23 15:09 daplon