mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
BaseURL seems to break DLNA/UPnP #1256
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DarwinAwardWinner on GitHub (Feb 4, 2020).
Describe the bug
I want my Jellyfin server accessible at https://myserver/jellyfin/, so I set the base URL to /jellyfin. However, whenever a base URL is set, UPnP stops working (tested with VLC and
gssdp-discover). Disabling base URL (setting it to empty) makes UPnP start working again.To Reproduce
Expected behavior
Setting a base URL should not cause UPnP discovery to stop working.
System (please complete the following information):
Additional context
I was able to work around this issue for my use case by disabling Jellyfin's base URL and then configuring my Caddy reverse proxy appropriately, like this:
This issue was discussed in Matrix here: https://matrix.to/#/!omTEDrqCdeTFwiOuos:matrix.org/$1580844715840185QCpKn:matrix.org?via=matrix.org&via=bonifacelabs.ca&via=librem.one
@PrplHaz4 commented on GitHub (Feb 5, 2020):
This is fixed on master. Will be in 10.5.
69d76af054@PrplHaz4 commented on GitHub (Feb 15, 2020):
@dkanada please reopen per https://github.com/jellyfin/jellyfin/issues/1322#issuecomment-586426345
@mazzystr commented on GitHub (Feb 15, 2020):
Sorry guys we don't have it yet....
Base URL: /jellyfinis still breaking DLNA. WithBase URLset the server is discoverable but content cannot be listed. Blank outBase URLand server is discoverable, content is listable, and content is playable.We gotta have
Base URLworking here. The next step is going to be running without--net=host, haproxy ssl offloading, and a broadcast relay between general network and container network.Version : Jellyfin nightly image / 10.5.0
Clients: VLC android app & Yamaha RX-V685 amplifier
@kylegordon commented on GitHub (Feb 19, 2020):
I see #1322 was closed in favour of this issue, but this issue does not mention non-exclusive port bindings as per https://github.com/jellyfin/jellyfin/issues/1322#issuecomment-573026321
Will that aspect of the issue also be covered, or would you rather it was opened as a new issue?
@JustAMan commented on GitHub (Feb 19, 2020):
It should be a separate issue, as it really is a separate issue :)
@Bond-009 commented on GitHub (Feb 20, 2020):
Did someone test this after #2400 was merged?
@PrplHaz4 commented on GitHub (Feb 20, 2020):
@mazzystr can you confirm the date or commit of the nightly you tested with (or test again with current nightly)?
@Bond-009 commented on GitHub (Feb 20, 2020):
I would prefer the second option ;)
@mazzystr commented on GitHub (Feb 20, 2020):
I'm getting some descent results. My previous nightly was from 6 days ago... I deleted that and pulled new nightly. Initially DLNA failed with my existing system.xml usingBaseurl /jellyfin. I manually edited system.xml Baseurl to /, restarted, DLNA works. I shutdown, manually edited system.xml Baseurl to /jellyfin, restarted, DLNA works.My clients are VLC and Yamaha RX-V685 integrated amplifier. Not much I can do with the Yamaha other than power down/up and query the server. That confirms to work. To be absolutely sure with VLC I forced shutdown of the app, cleared storage/cache, let VLC requery the network and populate the server and directory structure. Video and audio media play successfully.Sorry gents. I have to retract my confirmation. When I edited system.xml I forgot to close of the Baseurl line... God I hate hate hate xml.... Can't we move to yaml or json?? That caused Jellyfin to land a new and vanilla system.xml file... containing
<BaseUrl>/</BaseUrl>. DLNA works out of the box. Change this to<BaseUrl>/jellyfin</BaseUrl>and restart, DLNA fails.@mazzystr commented on GitHub (Feb 20, 2020):
I've reverted back to
latestand now my mobile apps are broke. Sigh... :/Man when those apps break they break good. I went around the network checking dns... Let's Encrypt certs... restarting jellyfin and haproxy... just to uninstall reinstall and bam service is autodiscovered! Wife walks by and I notice she's scrolling through the Jellyfin library... Grrr! LOL!
@mazzystr commented on GitHub (Feb 21, 2020):
and I'm back on
nightly 10.5.0and DLNA still not working. Mobile apps are good. Chromecast streams are good.I bring a tcpdump also...
I feel some data is missing from the tcpdump capture. I'll keep hacking here.
Edit: Yup the tcpdump was definitely missing some data. adding the
-Xswitch decodes udp pkts. tcpdump pkt trace now showing some very interesting information. Here's some of the more important looking pkts...I was able to the following manual command...
@twinkybot commented on GitHub (May 16, 2020):
Most probably this is the correct bug for me as well. As there are quite some I didn'T want to create a new one.
EDIT: Server is Ubuntu 19.04 with latest Jellyfin from PPA, Version 10.5.5
First of all I have a subdomain e.g. jellyfin.example.org. What would my BaseUrl be? I tried "/" but this is removed after restart.
My log says when I try to play via DLNA
Playing on Laptop or any other device works fine.
Furthermore when I try to access Jellyfin from the A/V Receiver it shows as DLNA Server "----empty----" which I am not sure what it means. Either that there is no server or that there is no content. I don't trust my device anymore :) but it used to work with Emby with some hiccups but it worked.
@twinkybot commented on GitHub (May 28, 2020):
Any insides?
I'd ague as DLNA is a major functionality tat the priority should be higher on this one, no?
Or is the "Known Issues" list sorted ascending in priority (highest at the bottom)?
@Noir- commented on GitHub (Jun 7, 2020):
This is breaking for me as well. I also tried adding
<BaseUrl>/</BaseUrl>to the config.xml but it seems to get automatically removed.My client is a LG OLED C9 TV.
@PacifistRiot commented on GitHub (Jun 28, 2020):
Confirmed that base url also breaks DLNA on my LG smart TV using 10.5.5.
@dkanada commented on GitHub (Jun 28, 2020):
The solution is really just to not use a base URL, which should resolve any problems you have been seeing.
@dkanada commented on GitHub (Jun 28, 2020):
Of course, this is definitely something we should fix, but if the setting is unused nothing should be amiss for now.
@Noir- commented on GitHub (Jun 28, 2020):
The thing is that this configuration option isn't even in the settings GUI as far as I can tell. It just renders an installation unusable and you have to debug and manually edit the config to make it work. At the moment, UPNP with Jellyfin is really a mess 😕
@twinkybot commented on GitHub (Jun 29, 2020):
@dkanada
No it is not as an empty base URL throws an Exception. What is your proposed solution?
@dkanada commented on GitHub (Jun 29, 2020):
Hmmmm it must be a DLNA only exception then, I'm running without one right now and have zero errors. No proposed solutions though, I don't have a single device that supports DLNA for testing.
None of the devs enjoy working on DLNA, so it has a low priority. If someone shows up that uses DLNA and wants to maintain and improve the feature that would change. We can't really do anything about it for now.
@twinkybot commented on GitHub (Jun 29, 2020):
This is sad :( as I need the feature. I used to listen to my music in my living room via my A/V Receiver and now I can only listen to internet radio. Sad.
Like I wrote in reddit. It is a shame that no one wants to write executable specifications as it would have helped enormously to fix this. I want to help but I am utterly lost in the code and I actually don't want to spend so much time to figure out what is wrong :(
Especially as I do not know how DLNA works in the first place :)
@Noir- commented on GitHub (Jun 29, 2020):
What if there would be some people backing this with a bounty?
@twinkybot commented on GitHub (Jun 29, 2020):
Bounties have a draw back. People's interest is in those cases only the bounty and not the project, thus they'll most probably hack and do not write maintainable code.
@Noir- commented on GitHub (Jun 29, 2020):
Yeah that's the worst case scenario but luckily it's not about a whole new feature (Isn't it possible to add maintainability to the bounty criteria?). But it sounds like this code isn't maintained anyway. Ideally, the bounty would go to a developer with a certain reputation. You know, I do a lot of things which I don't certainly enjoy but I get money for that 😉 So my hope is that the money helps with prioritization.
If UPNP is so horrible that it's not maintainable maybe it should be removed all together?
@PrplHaz4 commented on GitHub (Jun 29, 2020):
I think these two PRs might already make some progress towards fixing this issue - I think the next step is making sure
PublishedServerUrlis what is sent out for SSDP messages.@BaronGreenback any idea if this is the case with your new network mgmt implementation?
https://github.com/jellyfin/jellyfin/pull/3033
https://github.com/jellyfin/jellyfin/pull/3257
@BaronGreenback commented on GitHub (Jun 29, 2020):
Perfect timing - just going through Emby.dnla with nullable.
As far as #3257 and ssdp messages go - it only provides the ability to filter them from going out on certain interfaces.
But looking at your exception above on the 16th May - that's being put together in descriptionXmlBuilder.cs where BaseURL is set to the _serverAddress.
This value is calculated from the requested string up to the /dnla/
var url = Request.AbsoluteUri;
var serverAddress = url.Substring(0, url.IndexOf("/dlna/", StringComparison.OrdinalIgnoreCase));
(serverAddress is the baseUrl in the error msg)
Given that the request is from:
Error processing request. URL: "http://jelyyfin.example.org/Sessions/ffb30e5672d6215cdd02a581d347b63e/Playing?ItemIds=85458581b2ce6b928d07854964ee6a3d&PlayCommand=PlayNow&StartPositionTicks=2023149430"
System.ArgumentNullException: Value cannot be null. (Parameter 'baseUrl')
this code is never going to work.
@BaronGreenback commented on GitHub (Jun 29, 2020):
Check PR #3481 based upon #3033 - may work - most likely won't but may be a step in the right direction.
*** Local Subnet has to be defined for DLNA to work.
@BaronGreenback commented on GitHub (Jul 2, 2020):
@twinkybot Done some testing today. PR #2377 should now work with BaseDir and published-server-url. Details in the PR.
If you could test on your system?
@twinkybot commented on GitHub (Jul 4, 2020):
Yes I gladly would but I do not know how. I have Ubuntu and installed Jellyfin via deb. I presume I need to checkout this branch and package it myself to a deb?
Is there a documentation for this?
@twinkybot commented on GitHub (Jul 4, 2020):
So I need to execut
./build.sh -t native -p ubuntu.amd64But before that I have to install dotnet like described here: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-
Right?
It created a packages-microsoft.prd.deb, is that right?
@twinkybot commented on GitHub (Jul 4, 2020):
Sorry found the documentation (blush)
@twinkybot commented on GitHub (Jul 4, 2020):
Because I forgot to change the file I had to build it twice and now I am getting an error I do not know what to do:
@BaronGreenback commented on GitHub (Jul 4, 2020):
Sorry not at all familiar with linux building. However, came across this https://github.com/CESNET/libyang/issues/627 if it's of any help?
@mazzystr commented on GitHub (Jul 10, 2020):
Curiously, I can start/play media via DLNA to my amp (Yamaha RX-V685) with Jellyfin (container jellyfin/jellyfin:nightly-20200709) /jellyfin BaseURL setting if I start it from the web or app. If I use the amp app and select server source no dlna endpooint is discovered. Soon as I remove BaseURL setting the amp app discovers the DLNA endpoint is discovered and I can browse and play media.
@BaronGreenback commented on GitHub (Jul 10, 2020):
#2377 hasn't been accepted into the build yet - so you'll need to pull in that code and compile.
It you have already done that change the settings in you logging.default.json file to
{
"Serilog": {
"MinimumLevel": {
"Default": "Warning",
"Override": {
"Microsoft": "Warning",
"System": "Warning",
"Emby.Dlna": "Debug",
"Emby.Dlna.Eventing": "Debug"
}
restart jellyfin - and post the log here.
This will turn on the dlna debugging
@zzc-tongji commented on GitHub (Jul 17, 2020):
I have met the same problem when running Jellyfin 10.5.5 in Docker.
@twinkybot commented on GitHub (Jul 21, 2020):
AWEWSOME: with the new delivered package (Version 10.6.0) it is working!
Thanks a lot!!!!!
For me this bug can be closed.
@zzc-tongji commented on GitHub (Jul 24, 2020):
It seems that the problem still exists in 10.6.0 (Docker).
@BaronGreenback commented on GitHub (Jul 24, 2020):
Should be fixed in https://github.com/jellyfin/jellyfin/pull/3481
@BaronGreenback commented on GitHub (Aug 1, 2020):
@zzc-tongji 10.6.0 breaks certains other things. Try 10.6.1 and let me know if it works.
@zzc-tongji commented on GitHub (Sep 4, 2020):
@BaronGreenback I have upgraded to 10.6.4 and it seems still doesn't work.
DLAN client as nPlayer says
Premature end of data in tag HTML line 2.@kyz commented on GitHub (Sep 14, 2020):
I've been trying to use Jellyfin to play to a Samsung Smart TV.
Installed: Jellyfin 10.6.4-1
OS: Ubuntu 20.04 amd64
Running behind Apache 2 proxy (serving http on port 80 and https on 443, the only ports open on the firewall)
Base URL is /jellyfin
Local bind address is 127.0.0.1
LAN networks set to 10.0.0.0/255.255.255.0
I get an exception if local bind address is set to 127.0.0.1:
However, provided the local bind address is left blank, DLNA sending to the TV works both when a base URL is set and when it is blank, and it also works when "LAN networks" are set and when they are blank.
@BaronGreenback commented on GitHub (Sep 14, 2020):
DLNA uses ip address and not urls, so that is why it works.
The system cannot find 127.0.0.1 in the list of ip addresses, hence the null crash.
This whole backend system is currently going through the PR system as i type.
I will run this against the new version to make sure it works.
@crobibero commented on GitHub (Sep 28, 2020):
Should be fixed by https://github.com/jellyfin/jellyfin/pull/4162
@transiient commented on GitHub (Nov 6, 2020):
Has this change been implemented in Docker image
jellyfin/jellyfin:2020-11-05.1? The image reports version10.7.0but the issue still occurs in it.The WireShark output below is a short capture from when I attempt to access my Jellyfin instance (hosted on 192.168.1.200) via VLC Media Player on Windows 10. It occurs after I double-click the Jellyfin instance. I can't even get the Jellyfin instance to appear on my PS3 console or Windows Media Player.
It seems as though DLNA is still looking for
jellyfin.server/dlna/af...instead ofjellyfin.server/baseurl/dlna/af...as it should be. Been trying to get this working all day.@BaronGreenback commented on GitHub (Nov 6, 2020):
Its not been merged with the unstable yet.
@transiient commented on GitHub (Nov 21, 2020):
@BaronGreenback I apologise for bringing up a closed issue, but could I ask how I can track which commits are in unstable? Thanks!
@PrplHaz4 commented on GitHub (Nov 21, 2020):
#4161 says the fix was merged to master on Sept 27:
At this point you're probably better off waiting for the RC to test, as that has significant network changes that will impact DLNA (for the better)...
To check commit history: https://github.com/jellyfin/jellyfin/commits/master - but beware it's loooong since last release...
@BaronGreenback commented on GitHub (Nov 21, 2020):
I've just checked (and corrected a subsequent bug) - DLNA with baseurl works in network PR 2.
@cloventt commented on GitHub (Jun 17, 2021):
I'm still seeing this issue on 20210616.1-unstable (admin dashboard shows version 10.8.0 linux X64 running inside Docker) and on version 10.7.5 stable.
DLNA works fine without a base URL set. As soon as it is set, DLNA stops working. Unsetting it makes DLNA work again.
@BaronGreenback commented on GitHub (Jun 17, 2021):
What are you setting baseurl to?