-
-
Notifications
You must be signed in to change notification settings - Fork 94
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 librespot-java in a VM #479
Comments
Hello, Are you still able to capture metadata, etc as of yesterday? |
I haven't updated or changed anything in quite a while, but librespot-java is working and sending metadata. |
I use this project that is built on librespot-java and it appears to have went down.
https://github.com/entriphy/sp-playcount-librespot
I wasn’t sure if it’s the librespot project that broke it. I tried deploying my own instance and something also is working. I’m trying to figure out where the issue lies 😔
…Sent from my iPhone
On Apr 22, 2022, at 8:58 AM, iVolt1 ***@***.***> wrote:
I haven't updated or changed anything in quite a while, but librespot-java is working and sending metadata.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Hi devgianlu, This issue still exists even in the latest releases of librespot-java. I have gotten stuck in a troubleshooting loop a few times when after many months I have had to move my librespot-java/owntone environment to a different vm and the librespot-java server device doesn't appear in spotify. I eventually remember that the code excludes those mac addresses and have to go into the vm settings and fake the mac address. Is there a reason to exclude librespot-java from running in a vm such as a spotify licensing issue? librespot-java runs runs great for me in hyper-v and VirtualBox so it would be nice if that code could be removed in the future. I currently run the librespot-java/owntone environment in the HomePod Connect addon on Home Assistant and works Home Assistant dashboard which is probably the best whole house audio arrangement anywhere, even in a vm. It looks like this code excludes running VMs, possibly for no apparent reason. I changed the x08 to x06the MAC in the VM settings and now spotify connects to spocon. Thanks for the great project, ivolt1 @jpgrovy I think you posted in the wrong thread, but your project looks promising. |
I will first say that librespot-java works flawlessly for spotify audio and metadata and I appreciate the effort put into the project.
I previously reported this issue at spocon/spocon#46 .
I am running spocon in a virtualbox VM. Initially it took me a day or two to figure out why spotify could not see librespot-java.
It looks like this code excludes running VMs, possibly for no apparent reason. I changed the x08 to x06the MAC in the VM settings and now spotify connects to spocon.
Can this code be removed or modified so that librespot-java works out of the box in a VM? At the very least could a warning/workaround be put into the readme install instructions?
https://github.com/librespot-org/librespot-java/blob/dev/lib/src/main/java/xyz/gianlu/librespot/ZeroconfServer.java
...
public class ZeroconfServer implements Closeable {
public static final String SERVICE = "spotify-connect";
private final static int MAX_PORT = 65536;
private final static int MIN_PORT = 1024;
private static final Logger LOGGER = LoggerFactory.getLogger(ZeroconfServer.class);
private static final byte[] EOL = new byte[]{'\r', '\n'};
private static final JsonObject DEFAULT_GET_INFO_FIELDS = new JsonObject();
private static final JsonObject DEFAULT_SUCCESSFUL_ADD_USER = new JsonObject();
private static final byte[][] VIRTUAL_INTERFACES = new byte[][]{
new byte[]{(byte) 0x00, (byte) 0x0F, (byte) 0x4B}, // Virtual Iron Software, Inc.
new byte[]{(byte) 0x00, (byte) 0x13, (byte) 0x07}, // Paravirtual Corporation
new byte[]{(byte) 0x00, (byte) 0x13, (byte) 0xBE}, // Virtual Conexions
new byte[]{(byte) 0x00, (byte) 0x21, (byte) 0xF6}, // Virtual Iron Software
new byte[]{(byte) 0x00, (byte) 0x24, (byte) 0x0B}, // Virtual Computer Inc.
new byte[]{(byte) 0x00, (byte) 0xA0, (byte) 0xB1}, // First Virtual Corporation
new byte[]{(byte) 0x00, (byte) 0xE0, (byte) 0xC8}, // Virtual access, ltd.
new byte[]{(byte) 0x54, (byte) 0x52, (byte) 0x00}, // Linux kernel virtual machine (kvm)
new byte[]{(byte) 0x00, (byte) 0x21, (byte) 0xF6}, // Oracle Corporation
new byte[]{(byte) 0x18, (byte) 0x92, (byte) 0x2C}, // Virtual Instruments
new byte[]{(byte) 0x3C, (byte) 0xF3, (byte) 0x92}, // VirtualTek. Co. Ltd.
new byte[]{(byte) 0x00, (byte) 0x05, (byte) 0x69}, // VMWare 1
new byte[]{(byte) 0x00, (byte) 0x0C, (byte) 0x29}, // VMWare 2
new byte[]{(byte) 0x00, (byte) 0x50, (byte) 0x56}, // VMWare 3
new byte[]{(byte) 0x00, (byte) 0x1C, (byte) 0x42}, // Parallels
new byte[]{(byte) 0x00, (byte) 0x03, (byte) 0xFF}, // Microsoft Virtual PC
new byte[]{(byte) 0x00, (byte) 0x16, (byte) 0x3E}, // Red Hat Xen, Oracle VM, Xen Source, Novell Xen
new byte[]{(byte) 0x08, (byte) 0x00, (byte) 0x27}, // VirtualBox
new byte[]{(byte) 0x00, (byte) 0x15, (byte) 0x5D}, // Hyper-V
};
...
Thanks,
iVolt
The text was updated successfully, but these errors were encountered: