siddhpant / broo

Connect your phone as microphone wirelessly. Supports both PipeWire and PulseAudio.
GNU Affero General Public License v3.0
120 stars 6 forks source link

broo stuck on initializing #11

Closed Inky-boiplays closed 1 year ago

Inky-boiplays commented 1 year ago

I tried running this on ubuntu 22 LTS but broo is stuck on initializing.

Inky-boiplays commented 1 year ago

murmur.txt mumble_client.txt

siddhpant commented 1 year ago

murmur.txt says:

<W>2023-06-06 20:29:16.105 1 => Server: TCP Listen on 0.0.0.0:64738 failed: The bound address is already in use
<W>2023-06-06 20:29:16.106 1 => Stopped
<W>2023-06-06 20:31:10.430 Killing running servers
<W>2023-06-06 20:31:10.430 Shutting down

So something is already running on port 64738. Check if you did not open multiple instances of mumble-server.

You can kill processes with:

$ broo -q  # If broo is running
$ sudo pkill -9 -f mumble  # Kills mumble and mumble-server

Alternate way is to just restart your machine (not the Linux style but ok).

siddhpant commented 1 year ago

Ping. Will close issue after 7 days if no reply.

ErfanBahramali commented 1 year ago

murmur.txt says:

<W>2023-06-06 20:29:16.105 1 => Server: TCP Listen on 0.0.0.0:64738 failed: The bound address is already in use
<W>2023-06-06 20:29:16.106 1 => Stopped
<W>2023-06-06 20:31:10.430 Killing running servers
<W>2023-06-06 20:31:10.430 Shutting down

So something is already running on port 64738. Check if you did not open multiple instances of mumble-server.

You can kill processes with:

$ broo -q  # If broo is running
$ sudo pkill -9 -f mumble  # Kills mumble and mumble-server

Alternate way is to just restart your machine (not the Linux style but ok).


Same

and I tested it and didn't work

OS: Ubuntu 22.04


murmur.out:

``` 2023-08-29 21:12:18.312 ServerDB: Opened SQLite database /home/erfan/.config/broo/murmur.sqlite 2023-08-29 21:12:18.312 ServerDB: Using SQLite's default rollback journal. 2023-08-29 21:12:18.312 Murmur 1.5.0 running on Linux: Ubuntu 22.04.3 LTS [x64]: Booting servers 2023-08-29 21:12:18.313 1 => Server listening on 0.0.0.0:64738 2023-08-29 21:12:18.315 1 => Registering zeroconf service... 2023-08-29 21:12:18.316 1 => Registration needs nonempty 'registername', 'registerpassword' and 'registerurl', must have an empty 'password' and allowed pings. ```

mumble_client.out:

``` 2023-08-29 21:12:21.188 Loading settings from "/home/erfan/.config/Mumble/Mumble/mumble_settings.json" 2023-08-29 21:12:21.193 PulseAudio 15.99.0 from libpulse.so.0 ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock 2023-08-29 21:12:21.262 PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 from libportaudio.so.2 2023-08-29 21:12:21.262 PipeWire 0.3.48 from libpipewire-0.3.so.0 2023-08-29 21:12:21.263 JACK 1.9.20 from libjack.so.0 2023-08-29 21:12:21.264 Theme: "Mumble" 2023-08-29 21:12:21.264 Style: "Lite" 2023-08-29 21:12:21.264 --> qss: ":themes/Default/Lite.qss" 2023-08-29 21:12:21.264 Locale is "en_US" (System: "en_US") 2023-08-29 21:12:21.264 Unable to find bundled translations for locale "en_US" 2023-08-29 21:12:21.336 Database SQLite: "3.37.2" 2023-08-29 21:12:21.342 Updating application palette 2023-08-29 21:12:21.357 GlobalShortcutX: Using XI2 2.4 2023-08-29 21:12:21.357 QObject::connect: No such signal QPlatformNativeInterface::systemTrayWindowChanged(QScreen*) 2023-08-29 21:12:21.369 QMetaObject::connectSlotsByName: No matching signal for on_qtvUsers_customContextMenuRequested(QPoint,bool) 2023-08-29 21:12:21.381 This plugin does not support propagateSizeHints() 2023-08-29 21:12:21.733 SocketRPC: Removing old socket on "/run/user/1000/MumbleSocket" 2023-08-29 21:12:21.736 AudioInput: Opus encoder set for high quality speech 2023-08-29 21:12:21.736 AudioInput: 40000 bits/s, 48000 hz, 480 sample 2023-08-29 21:12:21.737 AudioInput: Initialized mixer for 1 channel 48000 hz mic and 0 channel 48000 hz echo 2023-08-29 21:12:21.737 AudioOutput: Initialized 1 channel 48000 hz mixer 2023-08-29 21:12:21.738 This plugin does not support propagateSizeHints() 2023-08-29 21:12:21.743 This plugin does not support propagateSizeHints() 2023-08-29 21:12:21.743 This plugin does not support propagateSizeHints() ```
siddhpant commented 1 year ago

@ErfanBahramali In your case, it seems like the client isn't joining. Did you setup correctly, maybe it is prompting for certificate?

You can use p option and generate certificate, and then try again.

ErfanBahramali commented 1 year ago

@ErfanBahramali In your case, it seems like the client isn't joining. Did you setup correctly, maybe it is prompting for certificate?

You can use p option and generate certificate, and then try again.


I still didn't succeed 🚶‍♂️☹️

images:

![Screenshot from 2023-08-30 17-06-54](https://github.com/siddhpant/broo/assets/77061285/aa4cc8b5-eb44-49e0-b5e4-e86fc49db4be) ![Screenshot from 2023-08-30 17-07-25](https://github.com/siddhpant/broo/assets/77061285/2b766643-31c6-41ca-af2f-f382fef3253f) ![Screenshot from 2023-08-30 17-07-54](https://github.com/siddhpant/broo/assets/77061285/9b93f5af-2717-4a56-8a19-6432bcfc9a7b) ![photo_2023-08-30_17-23-23](https://github.com/siddhpant/broo/assets/77061285/dca50f12-e9de-48a4-8a25-7dbd629e5806)

murmur.out:

``` 2023-08-30 17:07:30.372 ServerDB: Opened SQLite database /home/erfan/.config/broo/murmur.sqlite 2023-08-30 17:07:30.372 ServerDB: Using SQLite's default rollback journal. 2023-08-30 17:07:30.372 Murmur 1.5.0 running on Linux: Ubuntu 22.04.3 LTS [x64]: Booting servers 2023-08-30 17:07:30.373 1 => Server listening on 0.0.0.0:64738 2023-08-30 17:07:30.374 1 => Registering zeroconf service... 2023-08-30 17:07:30.376 1 => Registration needs nonempty 'registername', 'registerpassword' and 'registerurl', must have an empty 'password' and allowed pings. ```

mumble_client.out:

``` 2023-08-30 17:07:33.266 Loading settings from "/home/erfan/.config/Mumble/Mumble/mumble_settings.json" 2023-08-30 17:07:33.272 PulseAudio 15.99.0 from libpulse.so.0 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock 2023-08-30 17:07:33.568 PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 from libportaudio.so.2 2023-08-30 17:07:33.568 PipeWire 0.3.48 from libpipewire-0.3.so.0 2023-08-30 17:07:33.569 JACK 1.9.20 from libjack.so.0 2023-08-30 17:07:33.570 Theme: "Mumble" 2023-08-30 17:07:33.570 Style: "Lite" 2023-08-30 17:07:33.570 --> qss: ":themes/Default/Lite.qss" 2023-08-30 17:07:33.570 Locale is "en_US" (System: "en_US") 2023-08-30 17:07:33.570 Unable to find bundled translations for locale "en_US" 2023-08-30 17:07:33.616 Database SQLite: "3.37.2" 2023-08-30 17:07:33.622 Updating application palette 2023-08-30 17:07:33.633 GlobalShortcutX: Using XI2 2.4 2023-08-30 17:07:33.633 QObject::connect: No such signal QPlatformNativeInterface::systemTrayWindowChanged(QScreen*) 2023-08-30 17:07:33.645 QMetaObject::connectSlotsByName: No matching signal for on_qtvUsers_customContextMenuRequested(QPoint,bool) 2023-08-30 17:07:33.656 This plugin does not support propagateSizeHints() 2023-08-30 17:07:33.978 AudioInput: Opus encoder set for high quality speech 2023-08-30 17:07:33.978 AudioInput: 40000 bits/s, 48000 hz, 480 sample 2023-08-30 17:07:33.979 AudioInput: Initialized mixer for 1 channel 48000 hz mic and 0 channel 48000 hz echo 2023-08-30 17:07:33.979 AudioOutput: Initialized 1 channel 48000 hz mixer 2023-08-30 17:07:33.979 This plugin does not support propagateSizeHints() 2023-08-30 17:07:33.982 This plugin does not support propagateSizeHints() 2023-08-30 17:07:33.982 This plugin does not support propagateSizeHints() ```
siddhpant commented 1 year ago

@ErfanBahramali On mobile it is failing because you're specifying localhost IP. Localhost for mobile is the mobile itself. You need to give the computer's IP (which Broo shows at the end, but since it is being stuck, it did not reach that point).

The script is stuck because the script expects a message in the log (hence you see tail in the task manager), which happens when the mumble client on PC connects to the mumble server. See line 70.

Can you tell your Mumble version? Also, can you try the setup again and this time installing from source?

Here is my mumble_client.out for reference. ``` 2023-08-30 20:09:28.976 Loading settings from "/home/yoojer/.config/Mumble/Mumble/mumble_settings.json" 2023-08-30 20:09:28.983 PulseAudio 16.1.0 from libpulse.so.0 ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock 2023-08-30 20:09:29.057 PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 from libportaudio.so.2 2023-08-30 20:09:29.058 PipeWire 0.3.78 from libpipewire-0.3.so.0 2023-08-30 20:09:29.058 JACK 1.9.21 from libjack.so.0 2023-08-30 20:09:29.058 Theme: "Mumble" 2023-08-30 20:09:29.058 Style: "Dark" 2023-08-30 20:09:29.058 --> qss: ":themes/Default/Dark.qss" 2023-08-30 20:09:29.058 Locale is "en_IN" (System: "en_IN") 2023-08-30 20:09:29.058 Unable to find bundled translations for locale "en_IN" 2023-08-30 20:09:29.087 Database SQLite: "3.42.0" 2023-08-30 20:09:29.089 Updating application palette 2023-08-30 20:09:29.101 GlobalShortcutX: Using XI2 2.4 2023-08-30 20:09:29.101 QObject::connect: No such signal QPlatformNativeInterface::systemTrayWindowChanged(QScreen*) 2023-08-30 20:09:29.169 QMetaObject::connectSlotsByName: No matching signal for on_qtvUsers_customContextMenuRequested(QPoint,bool) 2023-08-30 20:09:29.199 This plugin does not support propagateSizeHints() 2023-08-30 20:09:31.531 AudioInput: Opus encoder set for low quality speech 2023-08-30 20:09:31.531 AudioInput: 8000 bits/s, 48000 hz, 480 sample 2023-08-30 20:09:31.534 AudioInput: Initialized mixer for 1 channel 48000 hz mic and 0 channel 48000 hz echo 2023-08-30 20:09:31.535 AudioOutput: Initialized 2 channel 48000 hz mixer 2023-08-30 20:09:31.535 This plugin does not support propagateSizeHints() 2023-08-30 20:09:31.556 Database SQLite: "3.42.0" 2023-08-30 20:09:31.556 OpenSSL Support: 1 (OpenSSL 3.0.10 1 Aug 2023) 2023-08-30 20:09:31.605 AudioInput: Noise canceller disabled warning: The VAD has been replaced by a hack pending a complete rewrite 2023-08-30 20:09:31.667 ServerHandler: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA" 2023-08-30 20:09:31.688 PulseAudio: Sinks or inputs changed (inserted or removed sound card) ```
Here's how successful run looks like, if you are curious. ![image](https://github.com/siddhpant/broo/assets/25429745/851910d5-2ef3-4c60-9f66-f09505c453c8)
siddhpant commented 1 year ago

Oh of course, the murmur log says it is 1.5. So it should ideally work. The script was made earlier, and I'm on 1.6 right now and it still works.

Run mumble-server -ini ~/.config/broo/murmur.ini in one terminal.

In another terminal, run mumble "mumble://127.0.0.1" --verbose.

What do you observe?


Also, if you didn't install from an APT repo, reinstalling from source won't hurt. Maybe picked up a bug?

ErfanBahramali commented 1 year ago

image

siddhpant commented 1 year ago

Damn.

Try the following commands one by one (in place of the mumble command as mentioned earlier). Do you get similar output? (That ServerHandler line is the key)

$ mumble "mumble://127.0.0.1" -platform offscreen

$ mumble "mumble://127.0.0.1" --verbose -platform offscreen
ErfanBahramali commented 1 year ago

Damn.

Try the following commands one by one (in place of the mumble command as mentioned earlier). Do you get similar output? (That ServerHandler line is the key)

$ mumble "mumble://127.0.0.1" -platform offscreen

$ mumble "mumble://127.0.0.1" --verbose -platform offscreen

- mumble "mumble://127.0.0.1" -platform offscreen - :

Screenshot from 2023-09-01 02-27-03

- mumble "mumble://127.0.0.1" --verbose -platform offscreen - :

Screenshot from 2023-09-01 02-28-05

siddhpant commented 1 year ago

Damn wth, this is weird!

Does updating to mumble from master branch solve it? The setup script can install from upstream repo for you. Please try that.

siddhpant commented 1 year ago

I was thinking about this. It'd be pretty weird for it to be a mumble bug. I used to use 1.5 too. Is this happening because of QT's offscreen platform unable to make the connection?

$ ldd /usr/local/bin/mumble | grep Qt
    libQt5Network.so.5 => /lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007f4b3cc55000)
    libQt5Xml.so.5 => /lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007f4b3e186000)
    libQt5Sql.so.5 => /lib/x86_64-linux-gnu/libQt5Sql.so.5 (0x00007f4b3d824000)
    libQt5Svg.so.5 => /lib/x86_64-linux-gnu/libQt5Svg.so.5 (0x00007f4b3d7cc000)
    libQt5Widgets.so.5 => /lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f4b3c400000)
    libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f4b3bc00000)
    libQt5TextToSpeech.so.5 => /lib/x86_64-linux-gnu/libQt5TextToSpeech.so.5 (0x00007f4b3e162000)
    libQt5DBus.so.5 => /lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007f4b3cbc4000)
    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f4b3b600000)

Anyways, do try installing mumble from master.

siddhpant commented 1 year ago

NB: The author of the PR referenced above has the same problem (mumble not connecting offscreen).

siddhpant commented 1 year ago

Back to this.

The multiple warning messages This plugin does not support propagateSizeHints() at the end when using -platform offscreen might indicate something. I have only one.

siddhpant commented 1 year ago

If anyone is comfortable with programming and faces this issue, please comment here if you can help. CC: @ernesto-glz

If this last ditch effort fails (highly likely tbh), I'll go ahead and add testing during setup in order to disable offscreen for those who don't support.

This is a very weird bug in QT (which does not happen for me and many others), the offscreen may not be connecting to network in this case. While we are not QT devs, superficially examining it won't hurt, and this can serve as a record for other people which can potentially fix it.


In Mumble source code src/mumble/MainWindow.cpp, there is void MainWindow::customEvent(QEvent *evt) { and void MainWindow::openUrl(const QUrl &url) {. Does your application reach there?

(Sprinkle print statements in the function, like qWarning("Inside customEvent() 1");, compile with make -j`nproc` in the build directory, and check with ./mumble "mumble://127.0.0.1" -platform offscreen)

Full steps Copied from `setup_broo`. ```console $ cd /tmp $ git clone https://github.com/mumble-voip/mumble.git --depth 1 $ cd mumble $ git submodule update --init --recursive --depth 1 $ mkdir build && cd build $ export CMAKE_BUILD_PARALLEL_LEVEL=`nproc` $ release_id=$(python "../scripts/mumble-version.py") $ version="$release_id~git$(git rev-parse --short HEAD)+broo" $ cmake \ -DBUILD_NUMBER=0 \ -DRELEASE_ID=$release_id \ -DCMAKE_UNITY_BUILD=ON \ -Dalsa=OFF \ -Dcrash-report=OFF \ -Doptimize=ON \ -Dpackaging=ON \ -Dplugins=OFF \ -Dqtspeech=ON \ -Dtranslations=OFF \ -Dwasapi=OFF \ -Dxboxinput=OFF \ .. # Build $ make -j`nproc` # Run mumble-server in a separate terminal $ mumble-server -ini ~/.config/broo/murmur.ini -fg # Run and test compiled mumble $ ./mumble "mumble://127.0.0.1" -platform offscreen ```
ernesto-glz commented 1 year ago

@siddhpant I have a new PC and this has never happened since I installed a new Fedora 38 on it. Anyway, I did the tests and those 2 events are being triggered and executed correctly but since I can't reproduce the problem this I don't think will be of much help.

siddhpant commented 1 year ago

@ernesto-glz cool, thanks!

siddhpant commented 1 year ago

Added a timeout test during setup. The command will timeout if it is stuck, so we configure it to show the GUI and not use the offscreen mode. This does cause the GUI to show up, but cannot be helped, as I cannot test the issue as I cannot reproduce it.