Simple Voice Chat

Simple Voice Chat

31M Downloads

Other players can hear me, but I can't hear them

PocketDaniel opened this issue ยท 12 comments

commented

Trying to set up a server with this voice chat mod. Tested it with a friend - he can hear me, but i can't hear him (I don't even see an icon by his name).

Started digging and i think i found the problem - I have a server inside my local network so my client is, but friend is outside the network. Also when i test with two users INSIDE same local network (server and two clients are on the same network) - everything is working fine.
Note: port is left by default (24454/udp) and it is forwarded.

I assume I need to do something with

"You sometimes also need to bind the voice chat server to a specific IP"
(quote from FAQ)

So i found a config on server and tried putting my external IP into config like so bind_address = "aa.bb.cc.dd"
But than i am getting an error, while starting up a server - Failed to bind to address 'aa.bb.cc.dd'
Just for fun inserted server local IP address - works fine, but obviously this did nothing (why would it... right?)

So at this point I am a bit confused - how do i properly set this up?

commented

The bind_address option is only useful for some server hosters, that have multiple IP aderesses. I think your problem is the actual port forwarding. This is quite tricky in your local network. You need to open the port in your computers firewall and also in your router. You also have to make sure that the port you opened on your router is forwarded to your actual computer. Another problem with hosing it from your local network is that your provider sometimes shares your IPv4 address with other customers, so you would need to use your IPv6 to connect your friends to your server. But I'm guessing, since your friends are able to join your minecraft server, this isn't the case. Maybe chack your router and your firewall that you actually used UDP.

commented

I don't think, that problem is with port. I double checked router and firewall - all seems to be correct - port 24454/UDP.
Also tested it using netcat utility:

  • nc -ul 24454 to start up UDP listener on 24454 port on the server machine
  • nc -u EXTERNAL_SERVER_IP 24454 to start up UDP sender on the client machine (sender is outside local network - Using mobile hotspot for client)

As a result all sent messages were successfully received by the server. So I am pretty sure, that ports are set-up correctly.

Screenshot 2021-01-11 at 19 17 55
Also, checking server logs I see that both players are successfully authenticated in voice chat.

I am using Forge 35.1.31 with MC 1.16.4. This is kind of stupid idea, but maybe there is some kind of incompatibility for those versions? (Stupid, because i assume it would not work at all, even in local network)

Any ideas what could this be?

commented

Also, checking server logs I see that both players are successfully authenticated in voice chat.

This only means that the client was able to send the secret to the server. It doesn't mean the connection from the server to the client works.

But since he can hear you this should not be the issue.

Can you send me the logs of both clients?

I am using Forge 35.1.31 with MC 1.16.4. This is kind of stupid idea, but maybe there is some kind of incompatibility for those versions? (Stupid, because i assume it would not work at all, even in local network)

The voice chat server is basically independent to the minecraft server. It only uses the position data of the players. I don't think there is any incompatibility with your forge version.

commented

Tested mod one more time today - I found this lines that refer to voice chat mod in the client logs:

[22:27:44] [Netty Client IO #1/INFO] [voicechat/]: Setting sample rate to 16000.0 Hz and data length to 1280 bytes
...
[22:29:27] [Render thread/INFO] [voicechat/]: Connecting to server: 'SERVER_LOCAL_IP:24454' // 'SERVER_EXTERNAL_IP:24454' for EXTERNAL_CLIENT
[22:29:27] [Render thread/WARN] [minecraft/ClientPlayNetHandler]: Unknown custom packet identifier: voicechat:default
[22:29:27] [VoiceChatAuthenticationThread/INFO] [voicechat/]: Trying to authenticate voice connection
[22:29:27] [VoiceChatClientThread/INFO] [voicechat/]: Server acknowledged authentication

And they are similar for both users. Only thing that popping out for me is this warning - Unknown custom packet identifier: voicechat:default. Can it be the cause of the problems?

P.S. Attached full logs in case I missed some important information there.
CLIENT_FROM_EXTERNAL_NETWORK.txt
CLIENT_FROM_LOCAL_NETWORK.txt

commented

And they are similar for both users. Only thing that popping out for me is this warning - Unknown custom packet identifier: voicechat:default. Can it be the cause of the problems?

No this is normal.

Maybe the problem is the mobile hotspot. Can you try it with a normal internet connection?

Can you make sure you selected the right sound output device and your friend has selected the right microphone.
You can test it with the microphone testing button in the V menu.

EDIT: I saw that you tried netcat. Did you try to send text from the client to the server and from the server to the client? I've seen some issues of this only working in a single direction.

commented

- Mobile hotspot
Previous test was done with normal internet connection. Did one more today (also using normal internet connection).

- Right sound output & right microphone
Tired all the options - default device, particular device - I still can't hear him. While testing microphone - we both can hear ourselves, which makes me feel like microphone is working. Question is about speakers - does microphone testing proves that speakers work correctly?

- Netcat
This is a good point - I did try sending only from client to server. But in order to try to send messages from server to client - doesn't this mean, that client also needs to forward 24454 port, because it is a server, who will be instantiating connection and "knocking" on clients 24454 port?
And also, as i understand data from server is being sent to the external user (friend can hear me, while being outside from local network). Therefore i assume server -> client direction works. Also my previous netcat test proves, that client -> server direction works, because in my test i was sending messages from the client (who is outside local network) to the server. Further more, isn't user authentication is a two way process, that happens over 24454 port? If it is successful, than this means both directions works, isn't it right?

EDIT: Nevermind, netcat listener also can send messages to the client... My bad :D And yes, everything is fine - can send data both ways: server -> external_client and external_client -> server

- Idea
In near future (more likely this weekend) I will try to test it with one more person to check if external_user_1 <-> external_user_2 voice chat will work and will I be able to hear either of them while being a local_user. This way I think we can narrow down the "problem scope".

- Idea 2 (Edit)
May this be a problem with firewall on one of the clients (not the server)?

commented

In near future (more likely this weekend) I will try to test it with one more person to check if external_user_1 <-> external_user_2 voice chat will work and will I be able to hear either of them while being a local_user. This way I think we can narrow down the "problem scope".

Yes, that would be great.

May this be a problem with firewall on one of the clients (not the server)?

But why would netcat work then?

commented

But why would netcat work then?

Yes, makes sense - it wouldn't. But it works...
Ok, thanks for your time and help so far. Will be back as soon as we test it with more than 2 people

commented

I added a command in the latest version to assist in testing the connection of clients:

/voicechat test <PLAYERNAME>

This command sends a packet to the client and the client sends it back to the server.
If the request times out, you can see in the clients logs if it arrived or not.

Let me know if you have any questions about this.

commented

So we tested voice chat one more time and indeed MacOS seems to be an issue here. We were 4 people - 2 on macs and 2 on windows. On windows everything works properly, but on mac - we can speak and windows guys can hear us, but we can't hear anyone back (nor Windows guys, nor other mac guy). I tried to ping everybody with command you added earlier - windows PC does respond within +- 10ms, but pinging macs result in timeout. Then I restarted my mac to boot into windows and tried from there and it works perfectly - i can hear everybody and can speak to them, so it is not a network configuration issue.

FYI: I use Java 1.8.0_222 (Java versions are a bit confusing to me, but I assume it is JRE - Java Runtime Environment) with macOS 10.15.7 Catalina. I also have Java 11 and 15 (I assume those are JDK - development kits), but my "mod-pack" doesn't want to work with those versions, because other mods are crashing with various errors. Basically Java 1.8.0_222 is the only working Java version for me at this point.

So what do you think about it? Are there any other options to fix this (besides ditching macOS and use windows :D )?
If I am not mistaken last JRE version is 1.8.0_271 and I can try updating, but will it help?

commented

You could try using OpenJDK 15 with Forge 35.1.37+. But I'm not entirely sure that it will even start without crashing. I will investigate this issue further. I will let you guys know if I find anything out.

commented

It should be fixed with the latest version. Please let me know if it works. You might have to change a config value if it doesn't work.