Can't connect - The connection is down or something is blocking it

Description

3 days ago, I switched distros from manjaro to endeavourOS, and since then I couldn’t connect to audiorelay.
Here is a list of things that i’ve tested and didn’t help:
-Rebooting the pc, phone and router
-Adding tcp:udp ports and/or disabling firewall
-Testing an older version of the app
-Connecting to the phone (It connected, but disconnected every 1-2 seconds)
-USB Tethering
-Doing everything in the FAQ section

Devices

Phone:
Android 9
Xiaomi Redmi 8
AudioRelay 0.25.5

PC:
Linux x86_64, EndeavourOS
*AudioRelay 0.25.6 (older build version: 0.25.4) *

The same thing has happened to me for 2 months :((

@irwing Could you please post the logs of the PC app? There’s maybe an error not surfaced by the user interface.

On the Android app, do you see your PC in the server’s list?

From your PC, please try to connect to the localhost or 127.0.0.1 address to check that AudioRelay works OK without involving the network. (This could create some nasty sound, don’t play any audio or lower the volume)

@Matthew_Andree_Futte Are you also using EndeavourOS?

Sorry for the delay. Had to give my phone to my brother because his phone broke.

I tried connecting to localhost from PC: it worked. And yes, I do see my pc listed in the server’s list.
Here is my logs:

2022-08-06 16:00:30,223 INFO Version: 0.25.4, os: Linux, osVersion: 5.18.14-arch1-1
2022-08-06 16:00:30,794 INFO Initializing locale to en
2022-08-06 16:00:30,876 INFO Network addresses: NetworkInfo(broadcastAddresses=[192.168.100.255], localAddresses=[192.168.100.2, 192.168.100.6])
2022-08-06 16:00:30,894 INFO Starting the server...
2022-08-06 16:00:30,914 INFO Waiting for devices from PortAudio...
2022-08-06 16:00:30,934 INFO Status initializing
2022-08-06 16:00:30,937 INFO Portaudio version: PortAudio V19.7.0-devel, revision unknown
2022-08-06 16:00:30,943 INFO Checking for update...
ALSA lib pcm_dmix.c:999:(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
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 927
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 927
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 927
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 system:capture_1 to audiorelay.C.30993.2:in_000
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1822
2022-08-06 16:00:31,573 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,574 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,574 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,576 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,576 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,576 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,576 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,578 WARN Unknown PortAudio type: 16
2022-08-06 16:00:31,579 INFO Status initialized
2022-08-06 16:00:31,727 INFO Found update for 0.25.6
2022-08-06 16:00:32,088 INFO Showing main window...

There’s not much in there unfortunately. If that’s not already the case, could you please get the logs after you tried to connect to the PC?

The app found 2 IP addresses, have you tried to manually connect from your phone via both of them? (192.168.100.2, 192.168.100.6)
Maybe it’ll work only via ethernet and not on Wi-Fi?

You could try another test: instead of localhost, connect the PC to itself with these IP addresses.

Right now, this all seems like a firewall issue:

  • You can connect to localhost, which implies that AudioRelay works correctly
  • Since you can see your PC, it means that broadcast packets are correctly sent from your PC (via UDP on port 59200)
  • Your phone can’t connect, meaning that the PC/router doesn’t allow incoming connections (TCP 59100)
  • Your PC can connect to the phone, meaning that outgoing connections work (TCP 59100)

I got it working.
My issue was that I installed ufw as a firewall protection, and I didn’t know that endeavourOS had firewalld built in it. I removed both of them and its working now.
Huge thanks for helping, sorry for taking your time.

Nice, thanks for the update!

@Matthew_Andree_Futte As written above, please check if it’s due to a firewall.