Skip to content
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

Websocket connections fail on firefox #2191

Closed
powertomato opened this issue Jan 1, 2024 · 15 comments
Closed

Websocket connections fail on firefox #2191

powertomato opened this issue Jan 1, 2024 · 15 comments
Labels
bug future3 Relates to future3 development needs triage

Comments

@powertomato
Copy link

Describe your problem

The UI only loads partially, dynamic values like volume, CPU temperature ect. display a permanent spinner-icon.
In the dev-console it is apparent that the connection to the websocket ws://192.168.1.222:5556 and *:5557, respectively (where the IP is the IP of the box)

Connection on same machine using chrome browser works.

The only difference I can spot is the header value Sec-Websocket-Extensions on the ws-request:

Firefox: Sec-WebSocket-Extensions: permessage-deflate
Chrome: Sec-Websocket-Extensions: permessage-deflate; client_max_window_bits

What's your hardware set up?

Rock64 with DietPi

Log:

01.01.2024 20:51:01 -   41:daemon.py          - jb.daemon            - MainThread      - INFO     - Starting Jukebox Daemon (Version 3.5.0-alpha)
01.01.2024 20:51:01 -   44:daemon.py          - jb.daemon            - MainThread      - INFO     - Git state: c122387e [2024-01-01] Add NFCPy support  (HEAD -> feature/nfcpy_backend, private/feature/nfcpy_backend) [v3.5.0-alpha-7-gc122387e]
01.01.2024 20:51:01 -  317:cfghandler.py      - jb.cfghandler        - MainThread      - INFO     - (jukebox) Loading yaml file '/home/pi/RPi-Jukebox-RFID/shared/settings/jukebox.yaml'
01.01.2024 20:51:01 -  230:cfghandler.py      - jb.cfghandler        - MainThread      - DEBUG    - (jukebox) Replacing current config data
01.01.2024 20:51:01 -   53:daemon.py          - jb.daemon            - MainThread      - INFO     - Welcome to Jukebox
01.01.2024 20:51:01 -   54:daemon.py          - jb.daemon            - MainThread      - INFO     - Time of start: Mon Jan  1 20:51:01 2024
01.01.2024 20:51:01 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.publishing' as 'publishing'
01.01.2024 20:51:01 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.publishing.republish' as 'publishing.republish' (<class 'function'>)
01.01.2024 20:51:01 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling publishing.initialize()
01.01.2024 20:51:01 -  229:server.py          - jb.pub.server        - MainThread      - DEBUG    - PublishServer initialized (Pyzmq version: 25.1.2; ZMQ version: 4.3.4; has draft API: False)
01.01.2024 20:51:01 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.volume' as 'volume'
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.toggle_output
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.get_outputs
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.publish_volume
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.publish_outputs
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.set_volume
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.get_volume
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.change_volume
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.get_mute
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.mute
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.set_output
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.set_soft_max_volume
01.01.2024 20:51:01 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PulseVolumeControl.get_soft_max_volume
01.01.2024 20:51:01 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling volume.initialize()
01.01.2024 20:51:01 -  249:__init__.py        - jb.pulse             - PulseMon        - INFO     - Start Pulse Monitor Thread
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'batt_status'
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'core.plugins.loaded'
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'core.started_at'
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'core.version'
01.01.2024 20:51:01 -  614:__init__.py        - jb.pulse             - MainThread      - INFO     - Ignoring secondary audio output configuration because it is missing or incomplete
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'host.temperature.cpu'
01.01.2024 20:51:01 -  353:__init__.py        - jb.pulse             - MainThread      - DEBUG    - Configured audio sinks: [PaSink(alias='Built-in speakers', pulse_sink_name='alsa_output.platform-analog-sound.stereo-fallback', volume_limit=100)]
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'host.timer.cputemp'
01.01.2024 20:51:01 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.jingle' as 'jingle'
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'playerstatus'
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'rfid.card_id'
01.01.2024 20:51:01 -  264:server.py          - jb.pub.server        - PubServer       - INFO     - New subscription for topic b'volume.level'
01.01.2024 20:51:01 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.jingle.play' as 'jingle.play' (<class 'function'>)
01.01.2024 20:51:01 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.jingle.play_startup' as 'jingle.play_startup' (<class 'function'>)
01.01.2024 20:51:01 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.jingle.play_shutdown' as 'jingle.play_shutdown' (<class 'function'>)
01.01.2024 20:51:01 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling jingle.initialize()
01.01.2024 20:51:01 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.jingle.alsawave' as 'jingle.alsawave'
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging AlsaWave.play
01.01.2024 20:51:02 -  321:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Decorating class components.jingle.alsawave.AlsaWave for auto-assignment into package 'jingle.alsawave'
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling jingle.alsawave.initialize()
01.01.2024 20:51:02 -  340:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Instantiating decorated class 'components.jingle.alsawave.AlsaWave' and register as 'jingle.alsawave.alsawave'
01.01.2024 20:51:02 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'components.jingle.alsawave.AlsaWave' as 'jingle.alsawave.alsawave'
01.01.2024 20:51:02 -   24:__init__.py        - jb.jingle            - MainThread      - DEBUG    - Register 'wav' in <class 'components.jingle.JingleFactory'>.
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.jingle.jinglemp3' as 'jingle.jinglemp3'
01.01.2024 20:51:02 -  321:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Decorating class components.jingle.jinglemp3.JingleMp3Play for auto-assignment into package 'jingle.jinglemp3'
01.01.2024 20:51:02 -  347:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Auto-tagging all methods and functions of class 'components.jingle.jinglemp3.JingleMp3Play'
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling jingle.jinglemp3.initialize()
01.01.2024 20:51:02 -  340:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Instantiating decorated class 'components.jingle.jinglemp3.JingleMp3Play' and register as 'jingle.jinglemp3.jinglemp3'
01.01.2024 20:51:02 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'components.jingle.jinglemp3.JingleMp3Play' as 'jingle.jinglemp3.jinglemp3'
01.01.2024 20:51:02 -   24:__init__.py        - jb.jingle            - MainThread      - DEBUG    - Register 'mp3' in <class 'components.jingle.JingleFactory'>.
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.playermpd' as 'player'
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.start
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.cancel
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.toggle
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.trigger
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.is_alive
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.get_timeout
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.set_timeout
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.publish
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericTimerClass.get_state
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericMultiTimerClass.start
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging GenericMultiTimerClass.get_state
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.get_player_type_and_version
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.update
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.update_wait
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.play
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.stop
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.pause
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.prev
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.next
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.seek
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.shuffle
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.rewind
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.replay
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.toggle
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.replay_if_stopped
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.repeatmode
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.get_current_song
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.map_filename_to_playlist_pos
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.remove
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.move
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.play_single
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.resume
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.play_card
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.get_single_coverart
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.get_album_coverart
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.get_folder_content
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.play_folder
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.play_album
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.queue_load
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.playerstatus
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.playlistinfo
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.list_all_dirs
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.list_albums
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.list_songs_by_artist_and_album
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging PlayerMPD.get_song_by_url
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling player.initialize()
01.01.2024 20:51:02 -  592:plugs.py           - jb.plugin            - MainThread      - ERROR    - Ignoring failed package load for 'playermpd'
01.01.2024 20:51:02 -  593:plugs.py           - jb.plugin            - MainThread      - ERROR    - Reason: TypeError: expected str, bytes or os.PathLike object, not NoneType
01.01.2024 20:51:02 -  594:plugs.py           - jb.plugin            - MainThread      - ERROR    - Detailed reason:
Traceback (most recent call last):
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 589, in load_all_named
    load(package, load_as, prefix)
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 579, in load
    raise e
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 576, in load
    func()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/components/playermpd/__init__.py", line 689, in initialize
    player_ctrl = PlayerMPD()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/components/playermpd/__init__.py", line 161, in __init__
    self.coverart_cache_manager = CoverartCacheManager(os.path.expanduser(coverart_cache_path))
  File "/usr/lib/python3.9/posixpath.py", line 231, in expanduser
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.rfid.cards' as 'cards'
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.rfid.cards.list_cards' as 'cards.list_cards' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.rfid.cards.delete_card' as 'cards.delete_card' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.rfid.cards.register_card' as 'cards.register_card' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.rfid.cards.register_card_custom' as 'cards.register_card_custom' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.rfid.cards.load_card_database' as 'cards.load_card_database' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.rfid.cards.save_card_database' as 'cards.save_card_database' (<class 'function'>)
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.rfid.reader' as 'rfid'
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.timers' as 'timers'
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.hostif.linux' as 'host'
01.01.2024 20:51:02 -   31:__init__.py        - jb.host.lnx          - MainThread      - INFO     - You don't seem to be on a PI, because loading 'RPi.GPIO' failed: RuntimeError: This module can only be run on a Raspberry Pi!
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.shutdown' as 'host.shutdown' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.reboot' as 'host.reboot' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.jukebox_is_service' as 'host.jukebox_is_service' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.is_any_jukebox_service_active' as 'host.is_any_jukebox_service_active' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.restart_service' as 'host.restart_service' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.get_disk_usage' as 'host.get_disk_usage' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.get_cpu_temperature' as 'host.get_cpu_temperature' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.publish_cpu_temperature' as 'host.publish_cpu_temperature' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.get_ip_address' as 'host.get_ip_address' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.say_my_ip' as 'host.say_my_ip' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.wlan_disable_power_down' as 'host.wlan_disable_power_down' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.get_autohotspot_status' as 'host.get_autohotspot_status' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.stop_autohotspot' as 'host.stop_autohotspot' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.hostif.linux.start_autohotspot' as 'host.start_autohotspot' (<class 'function'>)
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling host.initialize()
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.controls.bluetooth_audio_buttons' as 'bluetooth_audio_buttons'
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.controls.bluetooth_audio_buttons.activate' as 'bluetooth_audio_buttons.activate' (<class 'function'>)
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling bluetooth_audio_buttons.initialize()
01.01.2024 20:51:02 -  592:plugs.py           - jb.plugin            - MainThread      - ERROR    - Ignoring failed package load for 'controls.bluetooth_audio_buttons'
01.01.2024 20:51:02 -  593:plugs.py           - jb.plugin            - MainThread      - ERROR    - Reason: NameError: Plugin object 'ctrl' not registered in package 'player'
01.01.2024 20:51:02 -  594:plugs.py           - jb.plugin            - MainThread      - ERROR    - Detailed reason:
Traceback (most recent call last):
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 589, in load_all_named
    load(package, load_as, prefix)
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 579, in load
    raise e
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 576, in load
    func()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/components/controls/bluetooth_audio_buttons/__init__.py", line 87, in initialize
    button_callbacks[bt_keycode_play] = jukebox.utils.bind_rpc_command({'alias': 'toggle'},
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/utils.py", line 128, in bind_rpc_command
    func, args, kwargs = plugs.dereference(action['package'],
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 662, in dereference
    func = get(package, plugin, method)
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 807, in get
    raise NameError(f"Plugin object '{plugin}' not registered in package '{package}'")
NameError: Plugin object 'ctrl' not registered in package 'player'

01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.gpio.gpioz.plugin' as 'gpio'
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.gpio.gpioz.plugin.on' as 'gpio.on' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.gpio.gpioz.plugin.off' as 'gpio.off' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.gpio.gpioz.plugin.set_value' as 'gpio.set_value' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.gpio.gpioz.plugin.flash' as 'gpio.flash' (<class 'function'>)
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling gpio.initialize()
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.synchronisation.rfidcards' as 'sync_rfidcards'
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging SyncRfidcards.sync_change_on_rfid_scan
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging SyncRfidcards.sync_all
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging SyncRfidcards.sync_card_database
01.01.2024 20:51:02 -  464:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Tagging SyncRfidcards.sync_folder
01.01.2024 20:51:02 -  574:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load initializer: calling sync_rfidcards.initialize()
01.01.2024 20:51:02 -   78:__init__.py        - jb.sync_rfidcards    - MainThread      - INFO     - Sync RFID cards deactivated
01.01.2024 20:51:02 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'components.synchronisation.rfidcards.SyncRfidcards' as 'sync_rfidcards.ctrl'
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.music_cover_art' as 'music_cover_art'
01.01.2024 20:51:02 -  549:plugs.py           - jb.plugin            - MainThread      - INFO     - Loading plugin 'components.misc' as 'misc'
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.rpc_cmd_help' as 'misc.rpc_cmd_help' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_all_loaded_packages' as 'misc.get_all_loaded_packages' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_all_failed_packages' as 'misc.get_all_failed_packages' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_start_time' as 'misc.get_start_time' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_log_debug' as 'misc.get_log_debug' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_log_error' as 'misc.get_log_error' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_version' as 'misc.get_version' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.get_git_state' as 'misc.get_git_state' (<class 'function'>)
01.01.2024 20:51:02 -  281:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting function 'components.misc.empty_rpc_call' as 'misc.empty_rpc_call' (<class 'function'>)
01.01.2024 20:51:02 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling volume.finalize()
01.01.2024 20:51:02 -  456:__init__.py        - jb.pulse             - MainThread      - INFO     - Audio sink is now 'Built-in speakers' :: 'alsa_output.platform-analog-sound.stereo-fallback'
01.01.2024 20:51:02 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'components.volume.PulseVolumeControl' as 'volume.ctrl'
01.01.2024 20:51:02 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling jingle.finalize()
01.01.2024 20:51:02 -  699:plugs.py           - jb.plugin.call       - MainThread      - DEBUG    - Calling: jingle.play_startup(args=(), kwargs=None)
01.01.2024 20:51:02 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling cards.finalize()
01.01.2024 20:51:02 -  699:plugs.py           - jb.plugin.call       - StartJingle     - DEBUG    - Calling: volume.ctrl.get_volume(args=(), kwargs=None)
01.01.2024 20:51:02 -  317:cfghandler.py      - jb.cfghandler        - MainThread      - INFO     - (cards) Loading yaml file '../../shared/settings/cards.yaml'
01.01.2024 20:51:02 -  230:cfghandler.py      - jb.cfghandler        - MainThread      - DEBUG    - (cards) Replacing current config data
01.01.2024 20:51:02 -  699:plugs.py           - jb.plugin.call       - StartJingle     - DEBUG    - Calling: volume.ctrl.set_volume(args=[30], kwargs=None)
01.01.2024 20:51:03 -   42:__init__.py        - jb.jingle            - StartJingle     - DEBUG    - Auto: 'wav' from ../../resources/audio/startupsound.wav.
01.01.2024 20:51:03 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling rfid.finalize()
01.01.2024 20:51:03 -   50:__init__.py        - jb.alsaif            - StartJingle     - DEBUG    - Playing wave file
01.01.2024 20:51:03 -  317:cfghandler.py      - jb.cfghandler        - MainThread      - INFO     - (rfid) Loading yaml file '../../shared/settings/rfid.yaml'
01.01.2024 20:51:03 -  230:cfghandler.py      - jb.cfghandler        - MainThread      - DEBUG    - (rfid) Replacing current config data
01.01.2024 20:51:03 -  101:__init__.py        - jb.rfid(read_00)     - MainThread      - INFO     - For reader config key 'read_00': loading module 'generic_nfcpy'
01.01.2024 20:51:03 -  116:__init__.py        - jb.rfid(read_00)     - MainThread      - DEBUG    - Decoded removal action: player.ctrl.pause()
01.01.2024 20:51:03 -   74:__init__.py        - jb.rfid.cardremove   - read_00CRemover - DEBUG    - CardRemovalTimerClass watchdog started
01.01.2024 20:51:03 -  139:__init__.py        - jb.rfid(read_00)     - read_00Thread   - DEBUG    - Start listening!
01.01.2024 20:51:03 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling timers.finalize()
01.01.2024 20:51:03 -  202:multitimer.py      - jb.multitimers       - MainThread      - DEBUG    - timers.timer_shutdown: State = {'enabled': False, 'remaining_seconds': 0, 'wait_seconds': 3600, 'type': 'GenericTimerClass'}
01.01.2024 20:51:03 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'jukebox.multitimer.GenericTimerClass' as 'timers.timer_shutdown'
01.01.2024 20:51:03 -  202:multitimer.py      - jb.multitimers       - MainThread      - DEBUG    - timers.timer_stop_player: State = {'enabled': False, 'remaining_seconds': 0, 'wait_seconds': 3600, 'type': 'GenericTimerClass'}
01.01.2024 20:51:03 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'jukebox.multitimer.GenericTimerClass' as 'timers.timer_stop_player'
01.01.2024 20:51:03 -  202:multitimer.py      - jb.multitimers       - MainThread      - DEBUG    - timers.timer_fade_volume: State = {'enabled': False, 'wait_seconds_per_iteration': 900, 'iterations': 1, 'type': 'GenericMultiTimerClass'}
01.01.2024 20:51:03 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'jukebox.multitimer.GenericMultiTimerClass' as 'timers.timer_fade_volume'
01.01.2024 20:51:03 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling host.finalize()
01.01.2024 20:51:03 -  202:multitimer.py      - jb.multitimers       - MainThread      - DEBUG    - host.timer.cputemp: State = {'enabled': False, 'wait_seconds_per_iteration': 10, 'type': 'GenericEndlessTimerClass'}
01.01.2024 20:51:03 -  293:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Enlisting an instance of class 'jukebox.multitimer.GenericEndlessTimerClass' as 'host.timer_temperature'
01.01.2024 20:51:03 -  202:multitimer.py      - jb.multitimers       - host.timer.cputemp - DEBUG    - host.timer.cputemp: State = {'enabled': True, 'wait_seconds_per_iteration': 10, 'type': 'GenericEndlessTimerClass'}
01.01.2024 20:51:03 -  624:plugs.py           - jb.plugin            - MainThread      - DEBUG    - Package load finalizer: calling gpio.finalize()
01.01.2024 20:51:03 -  699:plugs.py           - jb.plugin.call       - MainThread      - DEBUG    - Calling: misc.get_all_loaded_packages(args=(), kwargs=None)
01.01.2024 20:51:03 -  699:plugs.py           - jb.plugin.call       - MainThread      - DEBUG    - Calling: misc.get_all_failed_packages(args=(), kwargs=None)
01.01.2024 20:51:03 -  144:daemon.py          - jb.daemon            - MainThread      - INFO     - Loaded plugins: publishing, volume, jingle, jingle.alsawave, jingle.jinglemp3, player, cards, rfid, timers, host, bluetooth_audio_buttons, gpio, sync_rfidcards, music_cover_art, misc
01.01.2024 20:51:03 -  146:daemon.py          - jb.daemon            - MainThread      - ERROR    - Plugins with errors during load: player, bluetooth_audio_buttons
01.01.2024 20:51:03 -   67:server.py          - jb.rpc.server        - MainThread      - INFO     - Init RPC Server (Pyzmq version: 25.1.2; ZMQ version: 4.3.4; has draft API: False)
01.01.2024 20:51:03 -   75:server.py          - jb.rpc.server        - MainThread      - DEBUG    - Connected to address 'inproc://JukeBoxRpcServer'
01.01.2024 20:51:03 -   81:server.py          - jb.rpc.server        - MainThread      - DEBUG    - Connected to address 'tcp://*:5555'
01.01.2024 20:51:03 -   87:server.py          - jb.rpc.server        - MainThread      - DEBUG    - Connected to address 'ws://*:5556'
01.01.2024 20:51:03 -   92:server.py          - jb.rpc.server        - MainThread      - INFO     - All socket connections initialized
01.01.2024 20:51:03 -  229:daemon.py          - jb.daemon            - MainThread      - INFO     - Start-up time: 2147.731 ms
01.01.2024 20:51:03 -  104:server.py          - jb.rpc.server        - MainThread      - INFO     - RPC Servers started
01.01.2024 20:51:03 -   79:multitimer.py      - jb.multitimers       - host.timer.cputemp - DEBUG    - Start timer 'host.timer.cputemp in endless mode
01.01.2024 20:51:03 -   19:readerbase.py      - jb.rfid.new(read_00) - read_00Thread   - INFO     - Initializing reader 'Generic NFCPY NFC Reader Module' from '/home/pi/RPi-Jukebox-RFID/src/jukebox/components/rfid/hardware/generic_nfcpy/generic_nfcpy.py'
01.01.2024 20:51:03 -   20:readerbase.py      - jb.rfid.new(read_00) - read_00Thread   - DEBUG    - Reader object is <components.rfid.hardware.generic_nfcpy.generic_nfcpy.ReaderClass object at 0xffff79df3430> for reader config key 'read_00'
01.01.2024 20:51:03 -  148:__init__.py        - nfc.clf              - read_00Thread   - INFO     - searching for reader on path usb
01.01.2024 20:51:04 -  151:__init__.py        - nfc.clf              - read_00Thread   - INFO     - using ACS ACR122U PN532v1.6 at usb:001:002
01.01.2024 20:51:04 -  155:__init__.py        - jb.rfid(read_00)     - read_00Thread   - DEBUG    - card_removal_timer_thread.native_id = 281472726135264
01.01.2024 20:51:04 -   69:generic_nfcpy.py   - jb.rfid.new(read_00) - read_00Thread   - DEBUG    - Wait for card
01.01.2024 20:51:04 -  699:plugs.py           - jb.plugin.call       - StartJingle     - DEBUG    - Calling: volume.ctrl.set_volume(args=[40], kwargs=None)
@powertomato powertomato added bug future3 Relates to future3 development needs triage labels Jan 1, 2024
@s-martin
Copy link
Collaborator

s-martin commented Jan 1, 2024

@powertomato, which branch/version are you using?

@pabera, is this

  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 807, in get
    raise NameError(f"Plugin object '{plugin}' not registered in package '{package}'")
NameError: Plugin object 'ctrl' not registered in package 'player'

fixed by #2179?

@AlvinSchiller
Copy link
Collaborator

AlvinSchiller commented Jan 1, 2024

Firefox support in genereal should be fixed with the last release.
Though the Release is not tested and officially supported for Rock64 or dietpi.

Did you update to 3.5.0-develop or made a new installation? Can you share your jukebox.yaml and installation log?

@AlvinSchiller
Copy link
Collaborator

ZMQ version: 4.3.4; has draft API: False

The correct version should be 4.3.5 with draft API. That's the reason Firefox is not working.
The installation log would be needed to investigate why this version is installed.

@pabera
Copy link
Collaborator

pabera commented Jan 1, 2024

NameError: Plugin object 'ctrl' not registered in package 'player'

This shouldn't be a Firefox issue. It's usually a hint that the jukebox-daemon or the MPD is not running.

It's what your stack trace also reports.

01.01.2024 20:51:02 -  592:plugs.py           - jb.plugin            - MainThread      - ERROR    - Ignoring failed package load for 'playermpd'
01.01.2024 20:51:02 -  593:plugs.py           - jb.plugin            - MainThread      - ERROR    - Reason: TypeError: expected str, bytes or os.PathLike object, not NoneType
01.01.2024 20:51:02 -  594:plugs.py           - jb.plugin            - MainThread      - ERROR    - Detailed reason:
Traceback (most recent call last):
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 589, in load_all_named
    load(package, load_as, prefix)
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 579, in load
    raise e
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 576, in load
    func()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/components/playermpd/__init__.py", line 689, in initialize
    player_ctrl = PlayerMPD()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/components/playermpd/__init__.py", line 161, in __init__
    self.coverart_cache_manager = CoverartCacheManager(os.path.expanduser(coverart_cache_path))
  File "/usr/lib/python3.9/posixpath.py", line 231, in expanduser
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

The issue is related to the recent PR #2177. Maybe there is a bug which we have not captured yet.

Can you check if your jukebox.yaml has the following 2 lines added?

@powertomato
Copy link
Author

Since I deleted the original installation log (sorry), I reran the setup-script. Here are the logs that resulted from that:

INSTALL-1704151233.log
app.log
jukebox.yaml.txt

All the Errors are now gone from the log. But the Firefox issue persists.

Note:
The setup is using my fork, which branched from commit 3a904b5 (future3/develop)
The only changes are an addition of a card-reader backend (see PR #2190)

@powertomato
Copy link
Author

ZMQ version: 4.3.4; has draft API: False

The correct version should be 4.3.5 with draft API. That's the reason Firefox is not working. The installation log would be needed to investigate why this version is installed.

This was the issue. I removed pyzmq and rerun the setup, now the correct version was built and the webapp works in firefox too.

So the only problem I see is, the setup should check for the correct pyzmq version, not only if pyzmq is installed.

@AlvinSchiller
Copy link
Collaborator

AlvinSchiller commented Jan 2, 2024

There are different problems here:

  • Your pyzmq was installed with the wrong libzmq version (4.3.4) and without draft support. Thats why firefox is not working.
  • Your playermpd couldn't be initialised ERROR - Ignoring failed package load for 'playermpd'. As @pabera wrote in his comment this is propably caused due to the missing config entry in your jukebox.yaml.

pyzmq

  • Its currently not supported to rerun the installation script, so this installation log is sadly not getting us closer to the initial problem (additionally the pyzmq installation was skipped as it was already installed). Can you recall if you chose the same options in the initial installation? e.g. webapp, node, ...?
  • The logs write out your kernel architecture as "aarch64". This should abort the installation as it is currently not supported either. Did you manually change the script after it was downloaded on your device?

playermpd

  • Did you copy the config from an old installation or was your initial installation prior this commit (< 22.12.23) and you updated later? Otherwise i dont know why it should be missing. You fork has the commit included.

@AlvinSchiller
Copy link
Collaborator

All the Errors are now gone from the log.

Thats strange, as the entry is still missing in your jukebox.yaml. So this should not behave different.

This was the issue. I removed pyzmq and rerun the setup, now the correct version was built and the webapp works in firefox too.

Good to know :) Strange it was a wrong version in the first place. Do you maybe have a second sd card to test a fresh installation?

So the only problem I see is, the setup should check for the correct pyzmq version, not only if pyzmq is installed.

Agree, we should evaluate if this can be easily tested. The problem is its not the pyzmq version itself, but the dependency to libzmq its build with.

@s-martin
Copy link
Collaborator

s-martin commented Jan 2, 2024

@pabera @AlvinSchiller
I was wondering, if we find a mechanism to add config entries with default values to jukebox.yml, if the entry is not there yet.

Especially the cover art cache isn't something a user would need to customize, but usually could go with a default entry.

In general this could help us to make the installation process more "updateable".
Right now it's "flash the card", but if something goes wrong many users will try to rerun the script anyway.

@s-martin
Copy link
Collaborator

s-martin commented Jan 2, 2024

Good to know :) Strange it was a wrong version in the first place. Do you maybe have a second sd card to test a fresh installation?

So the only problem I see is, the setup should check for the correct pyzmq version, not only if pyzmq is installed.

Agree, we should evaluate if this can be easily tested. The problem is its not the pyzmq version itself, but the dependency to libzmq its build with.

Do we need to pin the versions of libzmq and pyzmq?
Could also help with #2167

@AlvinSchiller
Copy link
Collaborator

I was wondering, if we find a mechanism to add config entries with default values to jukebox.yml, if the entry is not there yet.

I've done something similiar for the reader config, only there the check is for the file existing. Could also be possible for single entries?

@AlvinSchiller
Copy link
Collaborator

Do we need to pin the versions of libzmq and pyzmq?

libzmq cant be pinned, as a prebuild bundle is used or it needs to be build locally. And i think thats also true for pyzmq as it needs to be build against the local libzmq to support draft API.

@s-martin
Copy link
Collaborator

s-martin commented Jan 2, 2024

I was wondering, if we find a mechanism to add config entries with default values to jukebox.yml, if the entry is not there yet.

I've done something similiar for the reader config, only there the check is for the file existing. Could also be possible for single entries?

Yeah, something like that.

In the past I had a project, which had a mechanism for creating default values, if the parameters or values weren't in the actual file. Made it also easier to always create a config file matching the code instead of making sure the shipped file matches the code. But this was for ini files :-/

@s-martin
Copy link
Collaborator

Should be fixed with #2272

See release 3.5.2

@s-martin
Copy link
Collaborator

s-martin commented Mar 3, 2024

Closing now as completed.

Feel free to reopen, if the issue persists for you.

@s-martin s-martin closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug future3 Relates to future3 development needs triage
Projects
None yet
Development

No branches or pull requests

4 participants