Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run the app #2

Closed
Amanse opened this issue May 5, 2021 · 33 comments
Closed

Can't run the app #2

Amanse opened this issue May 5, 2021 · 33 comments

Comments

@Amanse
Copy link

Amanse commented May 5, 2021

I have fedora 34 and spotify client installed from unitedRPMs, compiled from source adblock and when i run
LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
i get
/usr/bin/bash: symbol lookup error: /usr/local/lib/spotify-adblock.so: undefined symbol: cef_string_userfree_utf16_free

edit: I also tried the release and it is giving the same error

@abba23
Copy link
Owner

abba23 commented May 5, 2021

My first guess would be that your Spotify version is outdated (you can find out using spotify --version). The latest Linux version should be 1.1.56.595.g2d2da0de I think. I've never used Fedora, but the installation script in the UnitedRPMs repository seems like a complete mess to me at first glance.

Looking at the Fedora documentation on installing Spotify, installing it through the RPM Fusion repository might be an idea. Alternatively you could try your luck with the Flatpak version and the corresponding instructions in the readme.

@Amanse
Copy link
Author

Amanse commented May 5, 2021

Thanks for replying this fast! It was the unitedRPMs issue, the version is old, even the icon, could have judged from it, thanks again!

@Amanse Amanse closed this as completed May 5, 2021
@Amanse
Copy link
Author

Amanse commented May 6, 2021

Haha, sorry about this but i updated and the issue still persists, it is 1.1.55.498.gf9a83c60 i'll try the flatpak version, is there a way to know if shared libraries would let it work?

@Amanse
Copy link
Author

Amanse commented May 6, 2021

Didn't work with flatpak due to glibc issue :(
is there any way to get it to work with 1.1.55.498.gf9a83c60 ?

@Amanse Amanse reopened this May 6, 2021
@jclsn

This comment has been minimized.

@Amanse

This comment has been minimized.

@jclsn

This comment has been minimized.

@abba23

This comment has been minimized.

@jclsn

This comment has been minimized.

@Amanse

This comment has been minimized.

@Amanse
Copy link
Author

Amanse commented May 6, 2021

@abba23 should i try getting the latest .deb and installing with some converter if the verison is the issue?

edit: i don't think that's possible, i will try the non-rust version

@Amanse
Copy link
Author

Amanse commented May 6, 2021

There is a cef build for non-rust version can it have anything to do with this?

@abba23
Copy link
Owner

abba23 commented May 6, 2021

Does the Spotify package your're using place a wrapper script in /usr/bin instead of (linking to) the actual binary? In that case you might need to set LD_PRELOAD in that script, where the actual binary is launched. The wrapper would likely be overwritten though when Spotify gets updated, so you'd have to modify it again after every update.

Alternatively, you could just skip the wrapper script and launch the binary directly (i.e. LD_PRELOAD=/usr/local/lib/spotify-adblock.so /path/to/binary). This might however cause other problems if the wrapper does some setup that is needed for Spotify to work on Fedora.

@Amanse
Copy link
Author

Amanse commented May 6, 2021

yes, there is a wrapper, if i run the binary directly it gives error about libcurl-gnutils being shared object file, I'll try putting it in the wrapper

@Amanse
Copy link
Author

Amanse commented May 6, 2021

THANKS A LOT SIR! it worked by putting it in the wrapper☺️🥳

@Amanse Amanse closed this as completed May 6, 2021
@Albortolsd
Copy link

THANKS A LOT SIR! it worked by putting it in the wrapperrelaxedpartying_face

hello, can i know where is the wrapper and how to modify it?
Thanks a lot

@Amanse
Copy link
Author

Amanse commented Jun 6, 2021

THANKS A LOT SIR! it worked by putting it in the wrapperrelaxedpartying_face

hello, can i know where is the wrapper and how to modify it?
Thanks a lot

the wrapper is /usr/bin/spotify
in the last line put the LDPRELOAD command from Readme, and done

@Albortolsd
Copy link

Albortolsd commented Jun 7, 2021

THANKS A LOT SIR! it worked by putting it in the wrapperrelaxedpartying_face

hello, can i know where is the wrapper and how to modify it?
Thanks a lot

the wrapper is /usr/bin/spotify
in the last line put the LDPRELOAD command from Readme, and done

Thanks a lot for your reply.
I installed Spotify 1.1.55.498.gf9a83c60 from flathub but i haven't any spotify's file inside /usr/bin on fedora 34.
What did i do different?

Ok i found it, the script is installed with the rpm fusion version, no the flatpack

@Amanse
Copy link
Author

Amanse commented Jun 8, 2021

THANKS A LOT SIR! it worked by putting it in the wrapperrelaxedpartying_face

hello, can i know where is the wrapper and how to modify it?
Thanks a lot

the wrapper is /usr/bin/spotify
in the last line put the LDPRELOAD command from Readme, and done

Thanks a lot for your reply.
I installed Spotify 1.1.55.498.gf9a83c60 from flathub but i haven't any spotify's file inside /usr/bin on fedora 34.
What did i do different?

Ok i found it, the script is installed with the rpm fusion version, no the flatpack

yeah, for flatpak refer to readme

@Albortolsd
Copy link

i'm not sure but i added the string
"LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify"
at the end of the script "/usr/bin/spotify"
but i have the publicity anyway, not the banners, but the audio

@kuboosoft
Copy link

kuboosoft commented Jun 10, 2021

If you use the UnitedRPMs spotify, you can put the "*.so" in "/home/your_user_name/.local/share/spotify/spotify-client/" or permanent in "/usr/lib64"

I completely forgot; if your spotify is outdated you can use "spotify-reset" (Generally each 20 days update automatic)

@Albortolsd
Copy link

If you use the UnitedRPMs spotify, you can put the "*.so" in "/home/your_user_name/.local/share/spotify/spotify-client/" or permanent in "/usr/lib64"

I completely forgot; if your spotify is outdated you can use "spotify-reset" (Generally each 20 days update automatic)

Thanks for the reply, i tried the UnitedRPMs and moved the .so in "/home/your_user_name/.local/share/spotify/spotify-client/" and in "/usr/lib64" too but i have the same error, undefined symbol: cef_string_userfree_utf16_free, and all the advertising too.
I added "LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify" at the end of the script "/usr/bin/spotify" too
I don't understand what else i have to do

@tr1p0p
Copy link

tr1p0p commented Jul 15, 2021

I confirm this bug still here on fedora 34, and add line on wrapper not working either.
spotify-adblock seem just unusable on fedora that's all.

So stop closing this bug, it's still here, no instructions on wiki for solving it..

For the moment just not work on Fedora/Rhel based distro.

@abba23
Copy link
Owner

abba23 commented Jul 15, 2021

It's kind of difficult for me to help you with this issue without knowing what the wrapper script looks like. Maybe @Amanse can expand on how exactly they did it.

Assuming the Spotify binary is launched on the last line of the wrapper script and the LD_PRELOAD environment variable isn't already being set anywhere, just adding LD_PRELOAD=/usr/local/lib/spotify-adblock.so to the beginning of that line should work.

@abba23 abba23 reopened this Jul 15, 2021
@tr1p0p
Copy link

tr1p0p commented Jul 15, 2021

Ok, so i paste the all wrapper here for study : https://paste.ubuntu.com/p/6hg6xcbWMg/

I've been trying to add LD_PRELOAD=/usr/local/lib/spotify-adblock.so at the end, but no effect. terminal don't mention spotify-adblock at launch with spotify in terminal. (edit: maybe like the term at the end i have to add $spotify $@ ?)

Will investigate more this evening.

@abba23
Copy link
Owner

abba23 commented Jul 15, 2021

I've been trying to add LD_PRELOAD=/usr/local/lib/spotify-adblock.so at the end

So that last line now looks like this?

LD_PRELOAD=/usr/local/lib/spotify-adblock.so LD_LIBRARY_PATH=$( dirname $spotify ) LC_NUMERIC=en_US.utf8 $spotify $@

@tr1p0p
Copy link

tr1p0p commented Jul 15, 2021

No more like this :

LD_LIBRARY_PATH=$( dirname $spotify ) LC_NUMERIC=en_US.utf8 $spotify $@
LD_PRELOAD=/usr/local/lib/spotify-adblock.so

So.. it's because the last $spotify $@ launch spotify and i put the line just after, i guess is just don't take it then.. Will try that.

@tr1p0p
Copy link

tr1p0p commented Jul 15, 2021

So... now after put the line in that order, terminal show this :

dirname: symbol lookup error: /usr/local/lib/spotify-adblock.so: undefined symbol: cef_string_userfree_utf16_free
/usr/lib64/spotify-client/spotify: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory

My spotify version installed :

 spotify --version
/usr/lib64/spotify-client/spotify: /usr/lib64/spotify-client/libcurl-gnutls.so.4: no version information available (required by /usr/lib64/spotify-client/spotify)
Spotify version 1.1.56.595.g2d2da0de, Copyright (c) 2021, Spotify Ltd

@abba23
Copy link
Owner

abba23 commented Jul 15, 2021

Try setting LD_PRELOAD after LD_LIBRARY_PATH then. I.e. like this:

LD_LIBRARY_PATH=$( dirname $spotify ) LD_PRELOAD=/usr/local/lib/spotify-adblock.so LC_NUMERIC=en_US.utf8 $spotify $@

@tr1p0p
Copy link

tr1p0p commented Jul 15, 2021

That's it !

So it's this line and no other that do the trick. I guess fedora user need like a echo line for add this in the wrapper then ? (don't really know echo..)

So for me

sudo nano /usr/bin/spotify
remove last line and add this :
LD_LIBRARY_PATH=$( dirname $spotify ) LD_PRELOAD=/usr/local/lib/spotify-adblock.so LC_NUMERIC=en_US.utf8 $spotify $@

Ctrl+x Enter

And now it work !

@abba23 abba23 closed this as completed Jul 15, 2021
@amankaif
Copy link

Just logged in to say I've been using your work for every linux distro and now that I'm on fedora you've thoroughly helped getting it to run there too, I really appreciate it.

@softExploit
Copy link

Does the Spotify package your're using place a wrapper script in /usr/bin instead of (linking to) the actual binary? In that case you might need to set LD_PRELOAD in that script, where the actual binary is launched. The wrapper would likely be overwritten though when Spotify gets updated, so you'd have to modify it again after every update.

Alternatively, you could just skip the wrapper script and launch the binary directly (i.e. LD_PRELOAD=/usr/local/lib/spotify-adblock.so /path/to/binary). This might however cause other problems if the wrapper does some setup that is needed for Spotify to work on Fedora.

and make sure that this /usr/local/lib/spotify-adblock.so have the correct permision or it won't let you load it, i use $ sudo chmod 751 /usr/local/lib/spotify-adblock.so, or where ever you have the spotify-adblock.so located :)

@bluelhf
Copy link

bluelhf commented May 22, 2022

I had this problem when I switched to the fish shell — setting LD_PRELOAD and running Spotify through bash solved the issue for me. If someone has a more idiomatic solution, feel free to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants