Mopidy Discourse

Mopidy-File doesn't open local files on Fedora 35

Mopidy cannot open local files, there is following error message in output:

INFO     2021-11-18 18:05:20,723 [7147:MpdSession-17 (_actor_loop)] mopidy_mpd.session
  New MPD connection from [::ffff:127.0.0.1]:53552

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.776: gst_element_query: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.776: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.777: gst_element_iterate_src_pads: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.777: gst_iterator_next: assertion 'it != NULL' failed

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.777: gst_iterator_free: assertion 'it != NULL' failed

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.777: gst_element_class_get_pad_template_list: assertion 'GST_IS_ELEMENT_CLASS (element_class)' failed
ERROR    2021-11-18 18:05:30,777 [7147:MainThread] mopidy.audio.gst
  GStreamer error: Source element is invalid.

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.778: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:7147): GStreamer-CRITICAL **: 18:05:30.778: gst_bin_remove: assertion 'GST_IS_ELEMENT (element)' failed
WARNING  2021-11-18 18:05:30,778 [7147:Audio-2 (_actor_loop)] mopidy.audio.actor
  Setting GStreamer state to GST_STATE_PLAYING failed
WARNING  2021-11-18 18:05:30,779 [7147:Core-9 (_actor_loop)] mopidy.core.tracklist
  Track is not playable: file:///home/lfurman/Music/Fun/saral.mp3

Mopidy is running as my user on terminal, same error when started as local user service (systemd --user start mopidy.service)

My suspicion is that this might be related to F34-> 35 migration and Python update from 3.9 to 3.10

Other players play files without issues. also testing with gst-launch-1.0 works (although not sure how to emulate Mopidy GStreamer pipeline)

EDIT: Use code formatting

Never seen this error before. You can try the Mopidy audio pipeline directly with the command at Troubleshooting — Mopidy 3.2.0-3-gb10f3115 documentation (it says it’s for scanning but it’s all the same) but not sure if this will help.

Yes - audio scan succeeds, bu playback wont - with GST_DEBUG=3 mopidy -v I get this on current develop branch:

DEBUG    2021-11-19 09:55:11,815 [12275:Audio-2 (_actor_loop)] mopidy.audio.gst
  Got source-setup signal: element=GstFileSrc

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.815: gst_element_query: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.815: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed
WARNING  2021-11-19 09:55:11,817 [12275:Audio-2 (_actor_loop)] py.warnings
  /home/lfurman/mopidy-dev/mopidy/mopidy/audio/actor.py:798: Warning: g_value_set_object: assertion 'G_IS_OBJECT (v_object)' failed
  result = self._playbin.set_state(state)

WARNING  2021-11-19 09:55:11,817 [12275:Audio-2 (_actor_loop)] py.warnings
  /home/lfurman/mopidy-dev/mopidy/mopidy/audio/actor.py:798: Warning: g_object_class_find_property: assertion 'G_IS_OBJECT_CLASS (class)' failed
  result = self._playbin.set_state(state)


(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.817: gst_element_iterate_src_pads: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.817: gst_iterator_next: assertion 'it != NULL' failed

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.817: gst_iterator_free: assertion 'it != NULL' failed

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.817: gst_element_class_get_pad_template_list: assertion 'GST_IS_ELEMENT_CLASS (element_class)' failed
0:00:29.760731236 12275 0x7fa03402b860 WARN            uridecodebin gsturidecodebin.c:2343:setup_source:<uridecodebin0> error: Source element is invalid.
ERROR    2021-11-19 09:55:11,818 [12275:MainThread] mopidy.audio.gst
  GStreamer error: Source element is invalid.
DEBUG    2021-11-19 09:55:11,818 [12275:MainThread] mopidy.audio.gst
  Got ERROR bus message: error=GLib.Error('Source element is invalid.', 'gst-core-error-quark', 1) debug='../gst/playback/gsturidecodebin.c(2343): setup_source (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0'

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.818: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(mopidy:12275): GStreamer-CRITICAL **: 09:55:11.818: gst_bin_remove: assertion 'GST_IS_ELEMENT (element)' failed
DEBUG    2021-11-19 09:55:11,818 [12275:Audio-2 (_actor_loop)] mopidy.audio.gst
  Changing state to GST_STATE_PLAYING: result=GST_STATE_CHANGE_FAILURE
DEBUG    2021-11-19 09:55:11,818 [12275:MainThread] mopidy.audio.gst
  Changing state to GST_STATE_NULL: result=GST_STATE_CHANGE_SUCCESS
WARNING  2021-11-19 09:55:11,818 [12275:Audio-2 (_actor_loop)] mopidy.audio.actor
  Setting GStreamer state to GST_STATE_PLAYING failed
WARNING  2021-11-19 09:55:11,819 [12275:Core-6 (_actor_loop)] mopidy.core.tracklist
  Track is not playable: file:///home/lfurman/Music/Fun/saral.mp3
DEBUG    2021-11-19 09:55:11,819 [12275:Core-6 (_actor_loop)] mopidy.listener

Another datapoint: this is definitely related to F35 upgrade: Created test F34 container with default Mopidy config and Mopidy-File worked correctly. Maybe there should be tests for Python 3.10 as it is already used in F35?

EDIT: Tested on devel branch and tests using Python 3.10 fail with exact same error message as shown in replies above.

Maybe there should be tests for Python 3.10 as it is already used in F35?

We don’t track Fedora releases. And we don’t actively try and support what’s in GStreamer development release either. What version of GStreamer was in Fedora 34?

Are there issues with non-local files? i.ee HTTP streaming? Puzzled why the scan would work but this full-on meltdown during playback.

Curiously, Spotify tracks play OK; GStreamer versions are as follows:

❯ rpm -qa | grep gstreamer1
gstreamer1-1.19.3-1.fc35.x86_64
gstreamer1-plugins-ugly-free-1.19.3-1.fc35.x86_64
gstreamer1-plugins-good-1.19.3-1.fc35.x86_64
gstreamer1-plugins-good-qt-1.19.3-1.fc35.x86_64
gstreamer1-plugin-openh264-1.19.1-1.fc35.x86_64
gstreamer1-plugins-bad-free-1.19.3-1.fc35.x86_64
gstreamer1-plugins-good-gtk-1.19.3-1.fc35.x86_64
gstreamer1-plugins-bad-freeworld-1.19.1-3.fc35.x86_64
gstreamer1-plugins-bad-free-fluidsynth-1.19.3-1.fc35.x86_64
gstreamer1-vaapi-1.19.3-1.fc35.x86_64
python3-gstreamer1-1.19.3-1.fc35.x86_64
gstreamer1-devel-1.19.3-1.fc35.x86_64
gstreamer1-plugins-bad-free-devel-1.19.3-1.fc35.x86_64
gstreamer1-plugins-good-extras-1.19.3-1.fc35.x86_64
gstreamer1-plugins-fc-0.2-25.fc35.x86_64
gstreamer1-plugins-bad-free-extras-1.19.3-1.fc35.x86_64
gstreamer1-plugins-bad-free-zbar-1.19.3-1.fc35.x86_64
gstreamer1-plugins-bad-free-wildmidi-1.19.3-1.fc35.x86_64
gstreamer1-plugins-entrans-docs-1.4.1-1.fc35.noarch
gstreamer1-plugins-entrans-1.4.1-1.fc35.x86_64
gstreamer1-plugins-ugly-1.19.1-3.fc35.x86_64
gstreamer1-libav-1.19.1-2.fc35.x86_64
gstreamer1-plugins-base-1.19.3-1.fc35.x86_64
gstreamer1-plugins-base-tools-1.19.3-1.fc35.x86_64
gstreamer1-plugins-base-devel-1.19.3-1.fc35.x86_64

mopidy deps reports following:

❯ mopidy deps
Executable: /usr/bin/mopidy
Platform: Linux-5.14.18-300.fc35.x86_64-x86_64-with-glibc2.34
Python: CPython 3.10.0 from /usr/lib64/python3.10
Mopidy: 3.2.0 from /usr/lib/python3.10/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.10/site-packages
  requests: 2.26.0 from /usr/lib/python3.10/site-packages
    urllib3: 1.26.6 from /usr/lib/python3.10/site-packages
    charset-normalizer: 2.0.4 from /usr/lib/python3.10/site-packages
    idna: 3.2 from /usr/lib/python3.10/site-packages
  setuptools: 57.4.0 from /usr/lib/python3.10/site-packages
  tornado: 6.1 from /usr/lib64/python3.10/site-packages
Mopidy-MPRIS: 3.0.3 from /home/lfurman/.local/lib/python3.10/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.10/site-packages
  setuptools: 57.4.0 from /usr/lib/python3.10/site-packages
  Mopidy: 3.2.0 from /usr/lib/python3.10/site-packages
  pydbus: 0.6.0 from /usr/lib/python3.10/site-packages
Mopidy-Spotify: 4.1.1 from /home/lfurman/.local/lib/python3.10/site-packages
  pyspotify: 2.1.3 from /home/lfurman/.local/lib/python3.10/site-packages
    setuptools: 57.4.0 from /usr/lib/python3.10/site-packages
    cffi: 1.14.6 from /usr/lib64/python3.10/site-packages
      pycparser: 2.20 from /usr/lib/python3.10/site-packages
        ply: 3.11 from /usr/lib/python3.10/site-packages
  setuptools: 57.4.0 from /usr/lib/python3.10/site-packages
  Mopidy: 3.2.0 from /usr/lib/python3.10/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.10/site-packages
  requests: 2.26.0 from /usr/lib/python3.10/site-packages
    urllib3: 1.26.6 from /usr/lib/python3.10/site-packages
    charset-normalizer: 2.0.4 from /usr/lib/python3.10/site-packages
    idna: 3.2 from /usr/lib/python3.10/site-packages
Mopidy-MPD: 3.2.0 from /usr/lib/python3.10/site-packages
  Mopidy: 3.2.0 from /usr/lib/python3.10/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.10/site-packages
  setuptools: 57.4.0 from /usr/lib/python3.10/site-packages
GStreamer: 1.19.3.0 from /usr/lib64/python3.10/site-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.42.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
        mad

EDIT: Also opened https://github.com/mopidy/mopidy/issues/2027 on Github to track this to have it also there.

Also, GObject libraries are updated:

❯ rpm -qa | grep gobject
cairo-gobject-1.17.4-4.fc35.x86_64
gobject-introspection-1.70.0-1.fc35.x86_64
libvirt-gobject-4.0.0-3.fc35.x86_64
avahi-gobject-0.8-14.fc35.x86_64
libeasyfc-gobject-0.14.0-10.fc35.x86_64
python3-gobject-base-3.42.0-1.fc35.x86_64
python3-gobject-3.42.0-1.fc35.x86_64

This is mopidy deps from Fedora 34 container:

Executable: /usr/bin/mopidy
Platform: Linux-5.14.18-300.fc35.x86_64-x86_64-with-glibc2.33
Python: CPython 3.9.7 from /usr/lib64/python3.9
Mopidy: 3.2.0 from /usr/lib/python3.9/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.9/site-packages
  requests: 2.25.1 from /usr/lib/python3.9/site-packages
    idna: 2.10 from /usr/lib/python3.9/site-packages
    chardet: 4.0.0 from /usr/lib/python3.9/site-packages
    urllib3: 1.25.10 from /usr/lib/python3.9/site-packages
  setuptools: 53.0.0 from /usr/lib/python3.9/site-packages
  tornado: 6.1 from /usr/lib64/python3.9/site-packages
Mopidy-Spotify: 4.1.1 from /home/lfurman/.local/lib/python3.9/site-packages
  Mopidy: 3.2.0 from /usr/lib/python3.9/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.9/site-packages
  requests: 2.25.1 from /usr/lib/python3.9/site-packages
    idna: 2.10 from /usr/lib/python3.9/site-packages
    chardet: 4.0.0 from /usr/lib/python3.9/site-packages
    urllib3: 1.25.10 from /usr/lib/python3.9/site-packages
  setuptools: 53.0.0 from /usr/lib/python3.9/site-packages
  pyspotify: 2.1.3 from /home/lfurman/.local/lib/python3.9/site-packages
    cffi: 1.15.0 from /home/lfurman/.local/lib/python3.9/site-packages
      pycparser: 2.21 from /home/lfurman/.local/lib/python3.9/site-packages
    setuptools: 53.0.0 from /usr/lib/python3.9/site-packages
Mopidy-MPRIS: 3.0.3 from /home/lfurman/.local/lib/python3.9/site-packages
  pydbus: 0.6.0 from /home/lfurman/.local/lib/python3.9/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.9/site-packages
  Mopidy: 3.2.0 from /usr/lib/python3.9/site-packages
  setuptools: 53.0.0 from /usr/lib/python3.9/site-packages
Mopidy-MPD: 3.2.0 from /usr/lib/python3.9/site-packages
  Mopidy: 3.2.0 from /usr/lib/python3.9/site-packages
  Pykka: 2.0.2 from /usr/lib/python3.9/site-packages
  setuptools: 53.0.0 from /usr/lib/python3.9/site-packages
GStreamer: 1.18.4.0 from /usr/lib64/python3.9/site-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.40.1
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
        mad