Xeroday / Spotify-Ad-Blocker

EZBlocker - A Spotify Ad Blocker for Windows
https://www.ericzhang.me/projects/spotify-ad-blocker-ezblocker/
GNU General Public License v3.0
1.85k stars 193 forks source link

[Critical] Spotify not found #261

Open gnpaone opened 2 years ago

gnpaone commented 2 years ago

It says spotify not found even if I have spotify. FYI, I installed spotify from microsoft store. Please solve this issue.

TheDiamondGen commented 2 years ago

It doesnt work with the microsoft store version. Download the normal version, and if you want extra customization install spicetify.

JPlayer3 commented 2 years ago

"Show desktop overlay when using media keys" If you turn this off, you will not be able to find it.

gnpaone commented 2 years ago

"Show desktop overlay when using media keys" If you turn this off, you will not be able to find it.

It's turned on but still not found Screenshot (5106)

TheDiamondGen commented 2 years ago

I didn't know this worked with the microsoft version as most extra apps dont. I guess it's because it doesnt change anything inside of spotify. Did you run Ezblocker as administrator? You only need to run it as administrator to change the setting about banner ads, then relaunch it. If that doesn't work then try the version from spotify website.

MassimoTambu commented 2 years ago

It doesnt work with the microsoft store version. Download the normal version, and if you want extra customization install spicetify.

This. Just install Spotify from their site and EzBlocker will work.

Darxide23 commented 2 years ago

Just started happening again a couple of days ago.

EZBlocker Version: 1.8.1.0 Spotify Version: 1.1.72.439

It will find Spotify at first, but then after a minute it will change to "Spotify not found"

EDIT: Watched it a little closer. This is what it's doing:

  1. Start EZBlocker.
  2. Spotify starts automatically (I have the option checked)
  3. It says "Muting: {Band name}"
  4. After a few seconds changes to "Muting: N/A" for a brief moment
  5. Shows "Spotify not found"
Darxide23 commented 2 years ago

Is this project finally dead? :(

mendelsphotography commented 2 years ago

Happened to me many time but I I fixed it by closing both Ezblocker and Spotify and making sure they are both killed and then reopen EzBlocker Wich also opens Spotify and runs as admin the way I have it set. That fixed it always by me. @gnpaone

mendelsphotography commented 2 years ago

image this is have I have it and it works By me, Sometimes Have to unmute at the start by going to Open Volume Control and find Spotify and unmute it. I have the latest version. EZBlocker Version: 1.8.1.0 And trying the Above.

gnpaone commented 2 years ago

image this is have I have it and it works By me, Sometimes Have to unmute at the start by going to Open Volume Control and find Spotify and unmute it. I have the latest version. EZBlocker Version: 1.8.1.0 And trying the Above.

Are you sure you are using Spotify microsoft store version? I will try what you said

mendelsphotography commented 2 years ago

me no Using from https://community.chocolatey.org/packages/spotify Before I use that and had no issue now use chocolatey for all my programs. Since it's one command to update all Programs. Besides I found Stuff in the Microsoft store are sometimes outdated trying using even the regular Installer From spotify

mendelsphotography commented 2 years ago

Rember @Darxide23 This is Open Source And it's Written In C# Wich is not that hard to learn and tons of people know and use it. So If someone were to want to fix something even if it's dead they Chuld.

mendelsphotography commented 2 years ago

Let me Know If that Fixes it @gnpaone

Darxide23 commented 2 years ago

Rember @Darxide23 This is Open Source And it's Written In C# Wich is not that hard to learn and tons of people know and use it. So If someone were to want to fix something even if it's dead they Chuld.

Guess that means you'll fix it, then.

mendelsphotography commented 2 years ago

@Darxide23 No one can fix it if they don't merge the request but was trying to add a point that If someone wants to fix it for themselves they can Unlike If #Primere Pro Crashes that you can't since its not open source...

Darxide23 commented 2 years ago

@mendelsphotography So the answer is No, you won't fix it. Cool. That's all you had to say.

mendelsphotography commented 2 years ago

I can't fix it. Meaning I can fork the project add a fix and make a pull request but that won't do anything till the owner adds that pull request You can do my profile and download it but then it's not from original source and who said its not a virus? Right so #262 this is a fix gnpaone Made but it has to be merged by the owner for all to be able to use it

mehrdad-ataee commented 2 years ago

It can start Spotify at launch but still says Spotify not found. EZBlocker 1.8.1.0 Spotify for Windows 1.1.81.604.gccacfc8c

p.s. For me, it works if I first open Spotify manually and then launch the EZBlocker.

cjhesse commented 2 years ago

Hey all, I tried @gnpaone's pull request (#262), which adds a default path to Spotify's executable, but it didn't work for me.

265 updates the MediaHook to check for the media session name that the Windows Store version of Spotify uses. I've tested the ad muting function, and it's working for me.

Darxide23 commented 2 years ago

265 updates the MediaHook to check for the media session name that the Windows Store version of Spotify uses. I've tested the ad muting function, and it's working for me.

Neither #262 nor #265 work for me. "Spotify not found" and ads play with both.

cjhesse commented 2 years ago

I got to my solution by debugging and seeing where things were going wrong. Make sure Spotify is started before you launch the debugger, then here's a few things to look at:

On line 190 of EZBlockerMain.cs, see if it's successfully finding the Spotify path (check the value of spotifyPath). If not, you might try stepping into GetSpotifyPath() and see if it's finding any processes at all.

If it is finding Spotify, then try to debug the line I changed: line 37 of MediaHook.cs. Make sure Spotify is actively playing something when you debug this so that it has an active media session. The MediaHook loops through all of the active media sessions and looks for Spotify, so see if session.SourceAppUserModelId ever gets set to some Spotify-related. For me, it was set to "SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify". I'm hoping that's universal for the Windows Store version, but it could be tied to a region or version.

Darxide23 commented 2 years ago

Ok, spotifyPath is being captured correctly. For me it's spotifyPath = "C:\\Program Files\\WindowsApps\\SpotifyAB.SpotifyMusic_1.180.699.0_x86__zpdnekdrzrea0\\Spotify.exe".

session.SourceAppUserModelId only ever gets set as firefox.exe. I closed Firefox and tried again and it never gets set to anything. It always stays null.

I don't know enough about it to get it working on my own from just this.