Discussion:
Bug#1061790: gerbera: Missing files JS files prevent UI from working
(too old to reply)
Wesley Schwengle
2024-01-29 19:10:02 UTC
Permalink
Package: gerbera
Version: 2.0.0+dfsg-1
Severity: important
X-Debbugs-Cc: ***@schwengle.net

Dear Maintainer,

I was trying to see how gerbera does m3u playlist support so I installed it
from the repo and tried to access the web UI. What happens is that you only get
to see a login button. Once you click that you get an 404 Not Found error on
http://my.ip:49152/?

When you open http://my.ip:49152 with a developer tool the following files seem
to be missing:

* vendor/tether/tether.min.js
* vendor/md5.min.js
* vendor/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0
* vendor/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0
* vendor/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0

I compiled Gerbera from source in $HOME/.local/gerbera and with the same
configuration (abeit a minor change to reflect the change of webroot) the app
works as intented: When enabling the UI and the account you get the
user/password textblocks and you can login.

It seems that the build is not placing the files where one expects them to be.



-- System Information:
Debian Release: trixie/sid
APT prefers unstable
APT policy: (900, 'unstable'), (500, 'experimental'), (500, 'testing'), (10, 'stable-updates'), (10, 'stable-security'), (10, 'oldstable-security'), (10, 'oldoldstable'), (10, 'stable'), (10, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.11-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gerbera depends on:
ii adduser 3.137
ii fonts-font-awesome 5.0.10+really4.7.0~dfsg-4.1
ii fonts-lato 2.015-1
ii init-system-helpers 1.66
ii libavcodec-extra60 [libavcodec60] 7:6.1.1-1
ii libavformat60 7:6.1.1-1
ii libavutil58 7:6.1.1-1
ii libc6 2.37-14
ii libcurl3-gnutls 8.5.0-2
ii libduktape207 2.7.0-2+b1
ii libebml5 1.4.5-1
ii libexif12 0.6.24-1+b1
ii libexiv2-27 0.27.6-1+b1
ii libffmpegthumbnailer4v5 2.2.2+git20220218+dfsg-2+b1
ii libfmt9 9.1.0+ds1-2
ii libgcc-s1 14-20240127-1
ii libixml11 1:1.14.18-1
ii libjs-bootstrap4 4.6.1+dfsg1-4
ii libjs-jquery 3.6.1+dfsg+~3.5.14-1
ii libjs-jquery-ui 1.13.2+dfsg-1
ii libjs-popper.js 1.16.1+ds-6
ii libjs-prototype 1.7.3-1
ii libmagic1 1:5.45-2+b1
ii libmariadb3 1:10.11.6-2
ii libmatroska7 1.7.1-1
ii libpugixml1v5 1.14-0.1
ii libspdlog1.12 [libspdlog1.12-fmt9] 1:1.12.0+ds-2
ii libsqlite3-0 3.45.0-1
ii libstdc++6 14-20240127-1
ii libtag1v5 1.13.1-1
ii libupnp17 1:1.14.18-1
ii libuuid1 2.39.3-6
ii node-js-cookie 3.0.1+~3.0.0-3

gerbera recommends no packages.

Versions of packages gerbera suggests:
ii chromium [www-browser] 121.0.6167.85-1
ii firefox-esr [www-browser] 115.7.0esr-1
ii gerbera-doc 2.0.0+dfsg-1
ii google-chrome-beta [www-browser] 122.0.6261.6-1
ii google-chrome-stable [www-browser] 121.0.6167.85-1
ii google-chrome-unstable [www-browser] 123.0.6262.5-1
ii lynx [www-browser] 2.9.0rel.0-2
ii w3m [www-browser] 0.5.3+git20230121-2+b2

-- Configuration Files:
/etc/gerbera/config.xml changed [not included]

-- no debconf information
Graham Cobb
2024-02-10 16:20:01 UTC
Permalink
Package: gerbera
Version: 2.0.0+dfsg-1
Followup-For: Bug #1061790

Dear Maintainer,

I use Gerbera rarely and have been running an old version.
I upgraded to 2.0.0+dfsg-1 and now see the same problem.

Note: in my case, I do not run Gerbera from systemd - I just invoke
it from my user terminal session.

Please let me know if I can provide any further information.

Graham

-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-5-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_IE.utf8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gerbera depends on:
ii adduser 3.137
ii fonts-font-awesome 5.0.10+really4.7.0~dfsg-4.1
ii fonts-lato 2.015-1
ii init-system-helpers 1.66
ii libavcodec60 7:6.1.1-1
ii libavformat60 7:6.1.1-1
ii libavutil58 7:6.1.1-1
ii libc6 2.37-13
ii libcurl3-gnutls 8.5.0-2
ii libduktape207 2.7.0-2+b1
ii libebml5 1.4.5-1
ii libexif12 0.6.24-1+b1
ii libexiv2-27 0.27.6-1+b1
ii libffmpegthumbnailer4v5 2.2.2+git20220218+dfsg-2+b1
ii libfmt9 9.1.0+ds1-2
ii libgcc-s1 13.2.0-9
ii libixml11 1:1.14.18-1
ii libjs-bootstrap4 4.6.1+dfsg1-4
ii libjs-jquery 3.6.1+dfsg+~3.5.14-1
ii libjs-jquery-ui 1.13.2+dfsg-1
ii libjs-popper.js 1.16.1+ds-6
ii libjs-prototype 1.7.3-1
ii libmagic1 1:5.45-2+b1
ii libmariadb3 1:10.11.6-1
ii libmatroska7 1.7.1-1
ii libpugixml1v5 1.14-0.1
ii libspdlog1.12 [libspdlog1.12-fmt9] 1:1.12.0+ds-2
ii libsqlite3-0 3.44.2-1
ii libstdc++6 13.2.0-9
ii libtag1v5 1.13.1-1
ii libupnp17 1:1.14.18-1
ii libuuid1 2.39.3-6
ii node-js-cookie 3.0.1+~3.0.0-3

gerbera recommends no packages.

Versions of packages gerbera suggests:
ii firefox-esr [www-browser] 115.6.0esr-1
pn gerbera-doc <none>
ii konqueror [www-browser] 4:22.12.3-2
ii links2 [www-browser] 2.29-1+b1
ii lynx [www-browser] 2.9.0dev.12-1
ii w3m [www-browser] 0.5.3+git20230121-2+b2

-- Configuration Files:
/etc/gerbera/config.xml changed:
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
<!--
See http://gerbera.io or read the docs for more
information on creating and using config.xml configuration files.
-->
<server>
<ui enabled="no" show-tooltips="yes">
<accounts enabled="no" session-timeout="30">
<account user="gerbera" password="gerbera"/>
</accounts>
</ui>
<name>gerbera</name>
<udn>uuid:69d46ab1-48be-4104-a6c8-50a09af2561a</udn>
<home>/var/lib/gerbera</home>
<webroot>/usr/share/gerbera/web</webroot>
<!--
How frequently (in seconds) to send ssdp:alive advertisements.
Minimum alive value accepted is: 62
The advertisement will be sent every (A/2)-30 seconds,
and will have a cache-control max-age of A where A is
the value configured here. Ex: A value of 62 will result
in an SSDP advertisement being sent every second.
-->
<alive>1800</alive>
<storage>
<sqlite3 enabled="yes">
<database-file>gerbera.db</database-file>
</sqlite3>
<mysql enabled="no">
<host>localhost</host>
<username>gerbera</username>
<database>gerbera</database>
</mysql>
</storage>
<protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
<!--
Uncomment the lines below to get rid of jerky avi playback on the
DSM320 or to enable subtitles support on the DSM units
-->
<!--
<custom-http-headers>
<add header="X-User-Agent: redsonic"/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
-->
<!-- Uncomment the line below if you have a Telegent TG100 -->
<!--
<upnp-string-limit>101</upnp-string-limit>
-->
<extended-runtime-options>
<ffmpegthumbnailer enabled="no">
<thumbnail-size>128</thumbnail-size>
<seek-percentage>5</seek-percentage>
<filmstrip-overlay>yes</filmstrip-overlay>
<workaround-bugs>no</workaround-bugs>
</ffmpegthumbnailer>
<mark-played-items enabled="no" suppress-cds-updates="yes">
<string mode="prepend">*</string>
<mark>
<content>video</content>
</mark>
</mark-played-items>
</extended-runtime-options>
</server>
<import hidden-files="no">
<scripting script-charset="UTF-8">
<common-script>/usr/share/gerbera/js/common.js</common-script>
<playlist-script>/usr/share/gerbera/js/playlists.js</playlist-script>
<virtual-layout type="builtin">
<import-script>/usr/share/gerbera/js/import.js</import-script>
</virtual-layout>
</scripting>
<mappings>
<extension-mimetype ignore-unknown="no">
<map from="mp3" to="audio/mpeg"/>
<map from="ogx" to="application/ogg"/>
<map from="ogv" to="video/ogg"/>
<map from="oga" to="audio/ogg"/>
<map from="ogg" to="audio/ogg"/>
<map from="ogm" to="video/ogg"/>
<map from="asf" to="video/x-ms-asf"/>
<map from="asx" to="video/x-ms-asf"/>
<map from="wma" to="audio/x-ms-wma"/>
<map from="wax" to="audio/x-ms-wax"/>
<map from="wmv" to="video/x-ms-wmv"/>
<map from="wvx" to="video/x-ms-wvx"/>
<map from="wm" to="video/x-ms-wm"/>
<map from="wmx" to="video/x-ms-wmx"/>
<map from="m3u" to="audio/x-mpegurl"/>
<map from="pls" to="audio/x-scpls"/>
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
<!-- <map from="avi" to="video/avi"/> -->
</extension-mimetype>
<mimetype-upnpclass>
<map from="audio/*" to="object.item.audioItem.musicTrack"/>
<map from="video/*" to="object.item.videoItem"/>
<map from="image/*" to="object.item.imageItem"/>
<map from="application/ogg" to="object.item.audioItem.musicTrack"/>
</mimetype-upnpclass>
<mimetype-contenttype>
<treat mimetype="audio/mpeg" as="mp3"/>
<treat mimetype="application/ogg" as="ogg"/>
<treat mimetype="audio/ogg" as="ogg"/>
<treat mimetype="audio/x-flac" as="flac"/>
<treat mimetype="audio/x-ms-wma" as="wma"/>
<treat mimetype="audio/x-wavpack" as="wv"/>
<treat mimetype="image/jpeg" as="jpg"/>
<treat mimetype="audio/x-mpegurl" as="playlist"/>
<treat mimetype="audio/x-scpls" as="playlist"/>
<treat mimetype="audio/x-wav" as="pcm"/>
<treat mimetype="audio/L16" as="pcm"/>
<treat mimetype="video/x-msvideo" as="avi"/>
<treat mimetype="video/mp4" as="mp4"/>
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
</mimetype-contenttype>
</mappings>
<online-content>
<YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
<favorites user="gerbera"/>
<standardfeed feed="most_viewed" time-range="today"/>
<playlists user="gerbera"/>
<uploads user="gerbera"/>
<standardfeed feed="recently_featured" time-range="today"/>
</YouTube>
</online-content>
</import>
<transcoding enabled="no">
<mimetype-profile-mappings>
<transcode mimetype="video/x-flv" using="vlcmpeg"/>
<transcode mimetype="application/ogg" using="vlcmpeg"/>
<transcode mimetype="application/ogg" using="oggflac2raw"/>
<transcode mimetype="audio/x-flac" using="oggflac2raw"/>
</mimetype-profile-mappings>
<profiles>
<profile name="oggflac2raw" enabled="no" type="external">
<mimetype>audio/L16</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="vlcmpeg" enabled="no" type="external">
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
<buffer size="14400000" chunk-size="512000" fill-size="120000"/>
</profile>
</profiles>
</transcoding>
</config>


-- debconf-show failed
Jérôme Pouiller
2024-07-23 17:50:01 UTC
Permalink
I have same issue here.
--
Jérôme Pouiller
Graham Cobb
2024-09-28 19:00:01 UTC
Permalink
Package: gerbera
Version: 2.2.0+dfsg-1+b2
Followup-For: Bug #1061790

Just to confirm that this still exists in 2.2.0+dfsg-1+b2
Graham Cobb
2024-11-19 23:30:01 UTC
Permalink
Package: gerbera
Version: 2.2.0+dfsg-1+b3
Followup-For: Bug #1061790

I have found a workround for this problem. The following hack makes gerbera work again for me.

As root:

cd /usr/share/gerbera/web/vendor/jquery
ln -s jquery-3.6.0.min.js jquery-3.7.1.min.js
ln -s jquery-3.6.0.min.map jquery-3.7.1.min.map

cd /usr/share/gerbera/web/vendor
ln -s bootstrap bootstrap-4.6.2

If it doesn't work for you, look in the gerbera log for lines which say things like:

2024-11-19 22:50:49.252 error: [server.cc:667] operator()(): Exception: [./src/util/grb_fs.cc:166] FILE* GrbFile::open(const char*, bool) Error: Could not open /usr/share/gerbera/web/vendor/bootstrap-4.6.2/css/bootstrap.min.css: No such file or directory

Then work out which file or directory is present on *your* system that might be the missing file, and
create a softlink to it. Of course, there is no guarantee that making an old file pretend to be
a newer file will work properly but it seems to be working for me.

I have made no attempt to analyse how or why my system has different files in /usr/share/gerbera/web/vendor.
I will note that my version of gerbera has been updated over *many* years (using the debian packages, installed
and upgraded using apt) so maybe the upgrade process is buggy on older installations.

So, not a solution, but maybe a workround for someone needing this to work again.

Graham
Nicholas D Steeves
2024-11-20 00:00:01 UTC
Permalink
Hi Graham,
Post by Graham Cobb
I have found a workround for this problem. The following hack makes gerbera work again for me.
cd /usr/share/gerbera/web/vendor/jquery
ln -s jquery-3.6.0.min.js jquery-3.7.1.min.js
ln -s jquery-3.6.0.min.map jquery-3.7.1.min.map
cd /usr/share/gerbera/web/vendor
ln -s bootstrap bootstrap-4.6.2
[snip analysis]

Good analysis.
Post by Graham Cobb
I will note that my version of gerbera has been updated over *many* years (using the debian packages, installed
and upgraded using apt) so maybe the upgrade process is buggy on older installations.
I didn't investigate if upgrade cruft was implicated because if what
works for you is a hack (that will later break) then:

1. Sid/unstable and testing/trixie have an old copy of node-jquery
(3.6.1+dfsg+~3.5.14-1) and need to be updated, because Debian packages
are supposed to unvendor bundled copies and use ones that have security
support, so node-jquery needs to be updated.

2. Gerbera needs to be fixed to use bootstrap 5.2.3

Alternatively, if what works for you is in fact a workaround, without
negative side-effects, then it won't later break, because Gerbera
doesn't require these specific versions of these javascript libraries.
If that's the case then Gerbera should probably be patched to use
whatever version of jquery and bootstrap that Debian provides; in this
case, Debian's gerbera package shouldn't be updated each time either
jquery or bootstrap change.

If you care about this package then I'd encourage you to Contact Debian
Mentors about getting your fix into the package. This bug might even
qualify for an NMU if it truly totally breaks the UI, and if you didn't
want to become the new maintainer.

Regards,
Nicholas

Loading...