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
Spotify connect #1009
Comments
Blank lines are valid in hostfiles on all systems (any *BSD, *UX, even on DOS and WIN). So it's a problem of Spotify app to be reported there. |
@guest4711 no it's not fault from the Spotify App as it works if you disable Adaway! @spafm simply whitelist: spclient.wg.spotify.com |
Whitelisting spclient.wg.spotify.com worked for me too. Thanks! |
Update: Whitelisting spclient.wg.spotify.com stopped working for me. |
Same issue, workaround is not working |
Spotify connect currently works for me by whitelisting the following:
|
Somehow not working for me, seems the wildcard Where the bold characters are randomly generated it seems |
I have the same problem, whitelisting all of the previous IPs and spotify.com does not currently work. |
I am having the same issue and none of the whitelisting mentioned works. My laptop running spotify always appears in the spotify app in my phone when it is running, but my sonos speakers normally do not |
Latest beta fixes this problem |
Is that spotify, sonos or adaway beta that fixes the problem? |
Adaway beta client, shared on xda forum |
I tried version 4.0.2 from the xda forum and still had the same issue. However I have managed to come up with a workaround to get it to work. The problem is in the way the spotify app resolves localhost, so although this works, the reason it is not working is spotify and not a problem with adaway. To get it to work, I download and apply latest hosts in adaway. Then I opened the hosts file and at the top, you will see 2 entries for localhost - one with an ipv4 address and one with an ipv6 address
I changed one of the entries to have a different name and saved it - eg
Then spotify app saw my sonos speakers as spotify connect devices. The downside of this is that it needs to be done each time new files are downloaded in adaway |
Maybe this Issue should be linked here? https://github.com/AdAway/AdAway/wiki/ProblematicApps |
@antxxxx Thank you so much, your solution solved it for me! |
@AnTxXx Thanks! This was driving me crazy! Any chance this could be fixed within adaway? |
I having the same issue but fixed it. Thanks to @antxxxx |
@antxxxx |
The localhost entries are standard on virtually all computers. They are NOT blocking rules! These are legitimate entries. At least the IPv4 version ( |
@Vankog agree - its not a problem with adaway and should not be fixed here - the problem is how spotify resolves localhost. @anzetal - I think I ended up copying the file to my laptop and editing it on there, which I know is not a good solution. I use a custom tasker task now to download the adaway blocking host files and have a toggle to quickly disable or enable using it, and I just disable host file blocking when I want to use spotify and sonos |
Will adding redirect rule |
short answer: delete long answers:
|
Thanks for your explaining~ |
Just to make sure: if spotify (connect) and adaway is active right now the only solution is the workaround as described earlier? |
Summarizing the above and adding my own findings: The following steps currently seem to mostly solve the issue (which is definitely a bug in Spotify, not in Adaway).
|
EDIT: fixed it |
Use the whitelist feature of AdAway. Add spclient.wg.spotify.com to the whitelist.
…On November 18, 2018 1:31:55 PM GMT+01:00, rahul-sundaresan ***@***.***> wrote:
@github-ronk how do you edit the file? Most android editors crash or
throw up permission errors even with su access while modifying
`/system/etc/hosts`
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1009 (comment)
|
@rahul-sundaresan - Since I like to apply ad-away hosts frequently, I use a shell script to do the modification automatically on the phone itself in a shell window. (this is from memory - if you want to use it, check it first, and since it must be run as root, I'm adding the expected disclaimer - use at your own risk. This script may: not work as intended, and/or brick your phone, and/or annihilate the whole universe.
|
In case anyone wants to understand what is going on: Spotify (in liborbit-jni-spotify.so) looks up the hostname with gethostname, then will do a getaddrinfo(hostname, NULL, ...) and then checks if more than one address was returned. If that is the case, it will do setsockopt(socket, SOL_IP, IP_MULTICAST_IF, addr) for each found IPv4-Address. On my device, gethostname returns localhost, causing getaddrinfo to return [127.0.0.1, ::1]. As this list contains more than one entry, spotify will bind the socket with IP_MULTICAST_IF to 127.0.0.1 and therefore send out the mDNS broadcast over the lo interface. With the fix, IP_MULTICAST_IF is never set as getaddrinfo returns just one address, and the broadcast will go out through the proper interface. |
Very illuminating, thanks! |
This actually sounds like a fully fledged Spotify bug. Might be worth reporting this.
are totally legitimate entries that are globally established. This has nothing to do with AdAway besides the fact that it writes the two entries to the host file. |
If anyone is interested, I have compiled a patched version of AdAway, that implements this workaround for Spotify (omits the line ::1 localhost). See https://github.com/c64bob/AdAway/releases/tag/v4.1.0 |
Brilliant! Works perfectly :) |
I cannot install the patched version on my oneplus 5t with android 9. |
Installed fine on my 5t but only after removing/uninstalling original adaway version |
i don't know what i did wrong the last time i tried that, but now it works as you described.....so my problem is solved |
There is a problem with Spotify app:
"Spotify connect" is not displayed as "available device" if hosts file contains blank lines.
The text was updated successfully, but these errors were encountered: