Upgraded home assistant fail to google cast integration which works fine in second last homeassistant version

I have upgraded my home assistant yesterday through dietpi software. In past home assistant my home assistant cast the music file correctly. but latest version fails to do so & in logs it shows following problems.

root@wyse:/mnt/dietpi_userdata/homeassistant# systemctl status home-assistant
● home-assistant.service - Home Assistant (DietPi)
     Loaded: loaded (/etc/systemd/system/home-assistant.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-02-24 16:00:18 MST; 14s ago
   Main PID: 26788 (hass)
      Tasks: 20 (limit: 4496)
     Memory: 128.4M
        CPU: 13.559s
     CGroup: /system.slice/home-assistant.service
             └─26788 /home/homeassistant/.pyenv/versions/3.12.1/bin/python3.12 /home/homeassistant/.pyenv/versions/3.12.1/bin/hass -c /mnt/dietpi_userdata/homeassistant

Feb 24 16:00:26 wyse Home Assistant[26788]:   File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/concurrent/futures/thread.py", line 58, in run
Feb 24 16:00:26 wyse Home Assistant[26788]:     result = self.fn(*self.args, **self.kwargs)
Feb 24 16:00:26 wyse Home Assistant[26788]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 24 16:00:26 wyse Home Assistant[26788]:   File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/subprocess.py", line 1026, in __init__
Feb 24 16:00:26 wyse Home Assistant[26788]:     self._execute_child(args, executable, preexec_fn, close_fds,
Feb 24 16:00:26 wyse Home Assistant[26788]:   File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/subprocess.py", line 1950, in _execute_child
Feb 24 16:00:26 wyse Home Assistant[26788]:     raise child_exception_type(errno_num, err_msg, err_filename)
Feb 24 16:00:26 wyse Home Assistant[26788]: FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Feb 24 16:00:26 wyse Home Assistant[26788]: 2024-02-24 16:00:26.900 WARNING (MainThread) [haffmpeg.tools] Error starting FFmpeg.
Feb 24 16:00:29 wyse Home Assistant[26788]: 2024-02-24 16:00:29.056 ERROR (MainThread) [homeassistant.components.script] Script with alias 'nitnem' failed to setup actions and has been disabled: Unknown device '20d8248d336f60348ea6df34c53a5337'

Did you already tried to install ffmpeg??

Thanks for giving me hint. i have checked " which ffmpeg" command which give me blank. then i install the ffmpeg through dietpi software & installation complete. then again try to integration google cast now system struck at

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for webrtc-noise-gain
ERROR: Could not build wheels for webrtc-noise-gain, which is required to install pyproject.toml-based projects
2024-02-25 08:50:27.733 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package webrtc-noise-gain==1.2.3: error: subprocess-exited-with-error
× Building wheel for webrtc-noise-gain (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [77 lines of output]

we need the whole log, not just a snip

copied log is available here
https://dpaste.org/XNTFD

So it fails because it can not built webrtc-noise-gain, which is needed for the google cast.
Some interesting parts:

ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package webrtc-noise-gain==1.2.3: error: subprocess-exited-with-error

RuntimeError: Unsupported compiler -- at least C++11 support is needed!

I’m not so familiar with this topic, but do you have gcc installed?

gcc -v

gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory

This is the issue. Workaround Fixed: Cannot build pip dependency 'webrtc-noise-gain' required for HA's integrations by pdsakurai · Pull Request #6931 · MichaIng/DietPi · GitHub

1 Like

Thanks,

root@wyse:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-14)
root@wyse:~#
root@wyse:~#
root@wyse:~#
root@wyse:~# which gcc
/usr/bin/gcc

Check out Joulinars post for the solution
https://dietpi.com/forum/t/upgraded-home-assistant-fail-to-google-cast-integration-which-works-fine-in-second-last-homeassistant-version/19417/7?u=jappe

Thanks, these three commands in order allow new homeassistant to google cast integration. so now all things are working as intended.

apt install g++
exec sudo -u homeassistant dash -c '. /home/homeassistant/pyenv-activate.sh; exec pip3 install -U webrtc-noise-gain'
systemctl restart homeassistant

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.