get_volume, get_mute, get_playback_state and get_current_track (napalm_sonos/sonos_driver.py ~310-345) return a default when the driver is not connected (self._device is None) and swallow every exception (# Broad catch: SoCo transport errors are unpredictable): volume 0, mute False, state "STOPPED", track {}. A speaker that is unreachable reads as a silent, stopped speaker. The setters (set_volume, set_mute, play, …) silently do nothing when not connected.
get_playback_state is worse: it calls self._device.get_playback_state() (line 316), and SoCo has no such method (none in soco 0.31.2, the version in netOrk's venv; the state is get_current_transport_info()["current_transport_state"]). The AttributeError is swallowed, so the getter returns "STOPPED" for every speaker. The unit test mocks the device with a MagicMock that invents the method (tests/test_sonos.py:29), which is why it passes.
Expected
Not connected → ConnectionClosedException; a failed read raises (wrapped with the cause).
Tests use MagicMock(spec=soco.SoCo) so a call to a method SoCo lacks fails.
Priority: P4 — netOrk does not call these getters today; they report wrong values for any other user.
Found during the bug sweep of 2026-11-01.
## What happens
`get_volume`, `get_mute`, `get_playback_state` and `get_current_track` (`napalm_sonos/sonos_driver.py` ~310-345) return a default when the driver is not connected (`self._device is None`) and swallow every exception (`# Broad catch: SoCo transport errors are unpredictable`): volume `0`, mute `False`, state `"STOPPED"`, track `{}`. A speaker that is unreachable reads as a silent, stopped speaker. The setters (`set_volume`, `set_mute`, `play`, …) silently do nothing when not connected.
`get_playback_state` is worse: it calls `self._device.get_playback_state()` (line 316), and SoCo has no such method (none in soco 0.31.2, the version in netOrk's venv; the state is `get_current_transport_info()["current_transport_state"]`). The `AttributeError` is swallowed, so the getter returns `"STOPPED"` for every speaker. The unit test mocks the device with a `MagicMock` that invents the method (`tests/test_sonos.py:29`), which is why it passes.
## Expected
- Not connected → `ConnectionClosedException`; a failed read raises (wrapped with the cause).
- `get_playback_state` reads `get_current_transport_info()["current_transport_state"]`.
- Tests use `MagicMock(spec=soco.SoCo)` so a call to a method SoCo lacks fails.
Priority: P4 — netOrk does not call these getters today; they report wrong values for any other user.
Found during the bug sweep of 2026-11-01.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
get_volume,get_mute,get_playback_stateandget_current_track(napalm_sonos/sonos_driver.py~310-345) return a default when the driver is not connected (self._device is None) and swallow every exception (# Broad catch: SoCo transport errors are unpredictable): volume0, muteFalse, state"STOPPED", track{}. A speaker that is unreachable reads as a silent, stopped speaker. The setters (set_volume,set_mute,play, …) silently do nothing when not connected.get_playback_stateis worse: it callsself._device.get_playback_state()(line 316), and SoCo has no such method (none in soco 0.31.2, the version in netOrk's venv; the state isget_current_transport_info()["current_transport_state"]). TheAttributeErroris swallowed, so the getter returns"STOPPED"for every speaker. The unit test mocks the device with aMagicMockthat invents the method (tests/test_sonos.py:29), which is why it passes.Expected
ConnectionClosedException; a failed read raises (wrapped with the cause).get_playback_statereadsget_current_transport_info()["current_transport_state"].MagicMock(spec=soco.SoCo)so a call to a method SoCo lacks fails.Priority: P4 — netOrk does not call these getters today; they report wrong values for any other user.
Found during the bug sweep of 2026-11-01.