abba23 / spotify-adblock-linux

Spotify adblocker for Linux
GNU General Public License v3.0
721 stars 68 forks source link

Gtk-Message: Failed to load module "gail" "atk-bridge" "canberra-gtk-module" #103

Closed rohit-kumar-j closed 3 years ago

rohit-kumar-j commented 3 years ago

This is the error I got. Any suggestions. I've installed Spotify from the Ubuntu Software App.(Perhaps it may have been a snap package?)

rkj@Strix:~/Downloads/spotify-adblock-linux$ wget -O cef.tar.bz2 https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
--2021-02-08 02:59:24--  https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
Resolving cef-builds.spotifycdn.com (cef-builds.spotifycdn.com)... 151.101.158.249, 2a04:4e42:25::761
Connecting to cef-builds.spotifycdn.com (cef-builds.spotifycdn.com)|151.101.158.249|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 276353497 (264M) [application/x-tar]
Saving to: ‘cef.tar.bz2’

cef.tar.bz2                                           15%[================>                                                                                                   ]  39.89M  2.14MB/s    eta 2mcef.tar.bz2                                        100%[===============================================================================================================>] 263.55M  1.71MB/s    in 2m 48s  

2021-02-08 03:02:12 (1.57 MB/s) - ‘cef.tar.bz2’ saved [276353497/276353497]

rkj@Strix:~/Downloads/spotify-adblock-linux$ tar -xf cef.tar.bz2 --wildcards '*/include' --strip-components=1
rkj@Strix:~/Downloads/spotify-adblock-linux$ make
make: Nothing to be done for 'all'.
rkj@Strix:~/Downloads/spotify-adblock-linux$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
2021/02/08 03:03:33.261413 system_key.go:147: cannot determine seccomp compiler version in generateSystemKey: invalid format of version-info: "ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.\n744680e86d577abd4ccf0ff76e60681ab0f58f99 2.4.3 9b218ef9a4e508dd8a7f848095cb8875d10a4bf28428ad81fdc3f8dac89108f7 bpf-actlog"
Gtk-Message: 03:03:33.332: Failed to load module "gail"
Gtk-Message: 03:03:33.333: Failed to load module "atk-bridge"
Gtk-Message: 03:03:33.336: Failed to load module "canberra-gtk-module"
rkj@Strix:~/Downloads/spotify-adblock-linux$ 
abba23 commented 3 years ago

Looks like you missed the installation step (sudo make install).

Perhaps it may have been a snap package?

That could be another problem. Make sure you've installed the Debian package. You can find the instructions at the bottom of this page.

rohit-kumar-j commented 3 years ago

Ah Yes! Thanks it works! However, I have this error now: (Should I open a new issue?)

rkj@Strix:~/Custom/spotify-adblock-linux$ sudo make install
install --strip -Dm644 -t /usr/local/lib spotify-adblock.so
strip: /usr/local/lib/spotify-adblock.so: file format not recognized
install: strip process terminated abnormally
make: *** [Makefile:19: install] Error 1
rkj@Strix:~/Custom/spotify-adblock-linux$ 
abba23 commented 3 years ago

Try running make clean and then go through the build and install steps again.

rohit-kumar-j commented 3 years ago

Okay, I did a clean Install of Spotify, logged in, and did this: It doesn't seem to be working. Any suggestions? Is there a problem with my $PATH or something? (I'm running Ubuntu 20,04 LTS)

rkj@Strix:~/Custom$ cd spotify-adblock-linux
rkj@Strix:~/Custom/spotify-adblock-linux$ wget -O cef.tar.bz2 https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
--2021-02-08 04:25:31--  https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
Resolving cef-builds.spotifycdn.com (cef-builds.spotifycdn.com)... 151.101.158.249, 2a04:4e42:25::761
Connecting to cef-builds.spotifycdn.com (cef-builds.spotifycdn.com)|151.101.158.249|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 276353497 (264M) [application/x-tar]
Saving to: ‘cef.tar.bz2’

cef.tar.bz2               100%[==================================>] 263.55M  5.30MB/s    in 57s     

2021-02-08 04:26:28 (4.62 MB/s) - ‘cef.tar.bz2’ saved [276353497/276353497]

rkj@Strix:~/Custom/spotify-adblock-linux$ tar -xf cef.tar.bz2 --wildcards '*/include' --strip-components=1
rkj@Strix:~/Custom/spotify-adblock-linux$ make
gcc -Wall -I. -shared -fPIC -o spotify-adblock.so  -ldl spotify-adblock.c whitelist.h blacklist.h
rkj@Strix:~/Custom/spotify-adblock-linux$ sudo make install
install --strip -Dm644 -t /usr/local/lib spotify-adblock.so
rkj@Strix:~/Custom/spotify-adblock-linux$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
bash: /snap/bin/spotify: No such file or directory
rkj@Strix:~/Custom/spotify-adblock-linux$ 
abba23 commented 3 years ago

The adblocker seems to be installed correctly now. There's still something wrong with your Spotify installation though. It looks like there's a broken symlink from /usr/bin/spotify to /snap/bin/spotify leftover from the snap package.

rohit-kumar-j commented 3 years ago

I was using sudo -i for root user, this was taking me to root@Strix~ which only had "snap" directory in it, but I realized that In Ubuntu20.04, I need to use sudo -s to be root@Strix~/home/rkj#. Now When I do ls in root@S trix~/home/rkj# I get this as the output:

Spotify exists as a shortcut, and when I click it, "Spotify Free" opens with ads:

Screenshot from 2021-02-09 13-32-23

This is from /usr/bin. It has 'spotify` in it:

Screenshot from 2021-02-09 13-29-33

I tried running ./spotify from /usr/bin too, and got this error:

root@Strix:/usr/bin# ./spotify 
Gtk-Message: 13:28:25.482: Failed to load module "canberra-gtk-module"
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
[0209/132833.278361:FATAL:gpu_data_manager_impl_private.cc(439)] GPU process isn't usable. Goodbye.
Trace/breakpoint trap
root@Strix:/usr/bin#

Also, from the CMD_LINE:

rkj@Strix:~$ $ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
bash: $: command not found
rkj@Strix:~$ cd /usr/local/lib/
rkj@Strix:/usr/local/lib$ ls
libpython3.6m.a  pkgconfig  python3.6  python3.8  spotify-adblock.so
rkj@Strix:/usr/local/lib$ $ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
bash: $: command not found
rkj@Strix:/usr/local/lib$ 

should I do make clean and make install from the spotify-adblock-linux directory?

rohit-kumar-j commented 3 years ago

I did a purge and did a clean reinstall. It worked just fine. Thank you!

Although, I have 2 Spotify start options now (Perhaps I need to remove a startup method(?) as both open the same application named 'Spotify'): image

For future readers:

rkj@Strix:~$ uname -a
Linux Strix 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux