henkelmax / simple-voice-chat

A working voice chat in Minecraft!
https://modrepo.de/minecraft/voicechat/wiki
456 stars 112 forks source link

Microphone not working in macOS #24

Closed Nekoyue closed 2 years ago

Nekoyue commented 3 years ago

Bug description The microphone is not working in macOS. The mod can detect the microphone interface, just no input sound. This bug is probably due to macOS's privacy system. Normally an app needs to request microphone permission before using it, but this mod doesn't.

Versions

PocketDaniel commented 3 years ago

I am using MacOS too and microphone is working for me - it asks for permission, but kinda at unexpected moment - when you are disabling microphone testing in voice chat menu.

And for me, microphone is working, because ppl I tested this mod with can hear me. I personally have different issue, where I can't hear ppl (you can read more about it here -> #23).

And I am using the same versions as you except i still use previous MacOs version - Catalina. Mby this is the case for you. Did you try to allow microphone usage in MacOS settings manually?

P.S. About my issue (#23) - I think it also can be related to MacOS, but i am not sure. Will test it later today

henkelmax commented 3 years ago

I tried it with a friend of mine. He is also using Big Sur. I think there is something that has changed in the latest version of MacOS. I read some discussions about this, and it seems to be related to the Java version. You could try starting Minecraft with the latest JDK, or you could use OpenJDK. My friend already tried Java 8 and Java 11 and both didn't work. At this time forge wouldn't work with Java 15, but the latest version should support it now (https://github.com/MinecraftForge/MinecraftForge/commit/dd10933ab0a973db5730caeae875d3aa3577abd6).

Max094Reikeb commented 3 years ago

I have this problem too. Minecraft doesn't ask for permission to access the microphone, and no one can hear me. I have put the microphone of my Mac as microphone, and I tried to put an other microphone linked in bluetooth at my Mac as microphone but both don't work. Any solution to fix this problem?

henkelmax commented 3 years ago

As I already said, I don't have a mac, so its very hard to find a solution blindly. Have you tried what I said with Java 15?

Max094Reikeb commented 3 years ago

As I already said, I don't have a mac, so its very hard to find a solution blindly. Have you tried what I said with Java 15?

No, I have Java 8 How do I use Java 15 with Minecraft?

henkelmax commented 3 years ago

Install it and set the Java executable path in your Minecraft profile options to the Java 15 executable. For more information use Google.

Max094Reikeb commented 3 years ago

I downloaded Java 15 but can't figure out how to launch Minecraft with it...

Max094Reikeb commented 3 years ago

I'm trying to launch Minecraft with Java 15 JDK but it crashes everytime

henkelmax commented 3 years ago

That's possible. Forge support for java 15 is very early.

Harleyoc1 commented 3 years ago

I’ve been able to run this with Java 15 and microphone still doesn’t appear to be working. I’m willing to do some testing to help try to find a fix for this.

Since this seems to be an issue with permissions theoretically it could be fixed by forcing a request for access to the microphone, but have’t found any way of doing this so far.

Update: I decided to make a JavaFX application that records mic input in the same way and that requests access first, so not sure why it’s not requesting it in this mod.

henkelmax commented 3 years ago

I've read about this. I think this is caused by Minecraft technically being a headless java instance. It somehow behaves differently than for example a JavaFX application.

duplador commented 3 years ago

So do you know a solution for this problem? I have the same problem and dont know what to do...

mfantastic8 commented 3 years ago

Looking for solution. https://docs.google.com/document/d/1DvRBN11Dl-ClJ7T-fpYyPBfk39TYott33biHYsLXaTM/edit Found this one and it doesn't worked.

ryandeardorff commented 3 years ago

I was able to get this to work on a couple of friends' mac computers by having them boot the game via terminal as a workaround. (Or rather, specifically it was through launching technic launcher via terminal, and launching the game, as it was a part of a modpack on there). It requested mic permissions fine that way and functions perfectly fine it seems.

henkelmax commented 3 years ago

That's nice. Can you tell me how exactly you did it?

ryandeardorff commented 3 years ago

All it took was making sure they had java installed (I had them installing openjdk 8), then running it through terminal/the command line java -jar Documents/TechnicLauncher.jar -- I also instructed them to move the Technic launcher jar file to documents. I actually sent it to them as a .command file for convenience, but that was essentially it. I believe it requested mic permissions under the "terminal" process when the permissions popup appeared.

mfantastic8 commented 3 years ago

image

henkelmax commented 3 years ago

All it took was making sure they had java installed (I had them installing openjdk 8), then running it through terminal/the command line java -jar Documents/TechnicLauncher.jar -- I also instructed them to move the Technic launcher jar file to documents. I actually sent it to them as a .command file for convenience, but that was essentially it. I believe it requested mic permissions under the "terminal" process when the permissions popup appeared.

Thanks for letting me know. I will try this out.

narenragu commented 3 years ago

Has a fix been found that works without technic launcher?

henkelmax commented 3 years ago

Has a fix been found that works without technic launcher?

The issue is still open, so obviously no.

bdunogier commented 3 years ago

Hi there. After experiencing the same issue (Catalina 10.15.7) and going through this thread, I have tried launching the native launcher from the command line (/Applications/Minecraft.app/Contents/MacOS/launcher). In the log, it said [JRSAppKitAWT markAppIsDaemon]: Process manager already initialized: can't fully enable headless mode which sounded quite good to me given what is said above.

As soon as I toggled microphone testing, it asked for permission, and the microphone worked.

Southpaw1496 commented 3 years ago

Hi there. After experiencing the same issue and going through this thread, I have tried launching the native launcher from the command line (/Applications/Minecraft.app/Contents/MacOS/launcher). In the log, it said [JRSAppKitAWT markAppIsDaemon]: Process manager already initialized: can't fully enable headless mode which sounded quite good to me given what is said above.

As soon as I toggled microphone testing, it asked for permission, and the microphone worked.

The question is, how do you "toggle microphone testing"?

bdunogier commented 3 years ago

Open the options (v), Enable microphone testing ?

Southpaw1496 commented 3 years ago

Open the options (v), Enable microphone testing ?

Ah, I understand now, I thought you were talking about a macOS setting.

Can confirm this works for me as well, though should only be treated as a workaround because you have to launch through the terminal. If this is a bug on Mojang's end I doubt they will fix it because none of the vanilla game functions require requesting any permissions in this way.

bdunogier commented 3 years ago

Can confirm this works for me as well, though should only be treated as a workaround because you have to launch through the terminal.

I agree. I was hoping that launching it from the terminal once to grant permissions would be enough, but no, it doesn't seem so :( At least it is simpler than then Technic Launcher, as you can just use the regular one.

If this is a bug on Mojang's end I doubt they will fix it because none of the vanilla game functions require requesting any permissions in this way.

Yep, it isn't very likely. It may still be worth reporting though.

Southpaw1496 commented 3 years ago

If this is a bug on Mojang's end I doubt they will fix it because none of the vanilla game functions require requesting any permissions in this way.

Yep, it isn't very likely. It may still be worth reporting though.

Would you report it as not being able to request permissions specifically or as something to do with launching in a headless environment?

bdunogier commented 3 years ago

Would you report it as not being able to request permissions specifically or as something to do with launching in a headless environment?

I'd say hardware permissions specifically, and then I'd specify that starting the launcher from the terminal prevents the process from going headless, and seems to work around the issue.

Southpaw1496 commented 3 years ago

Would you report it as not being able to request permissions specifically or as something to do with launching in a headless environment?

I'd say hardware permissions specifically, and then I'd specify that starting the launcher from the terminal prevents the process from going headless, and seems to work around the issue.

The other problem is how do we get people to reproduce it? We can't ask people to install mods and there's no functionality in the vanilla game that requires requesting hardware permissions.

bdunogier commented 3 years ago

Well, we can't do miracles, but I think it's still worth a try.

sgeef commented 3 years ago

@henkelmax I'm just referencing this other GitHub thread as it's having the same issue and they are trying to find a solution as well. This way we can potentially benefit from both investigations: https://github.com/adoptium/adoptium-support/issues/222

henkelmax commented 3 years ago

Thank you!

ianfreya8 commented 3 years ago

how can you install this for java 1.8.9?

Southpaw1496 commented 3 years ago

how can you install this for java 1.8.9?

You can't, it is only available for 1.16.5 and I doubt it will ever be available for 1.8.9

ianfreya8 commented 3 years ago

okay then how can you install it because i cant install mods unless it is on something like badlion or lunar client

Southpaw1496 commented 3 years ago

Random GitHub issues are not the place to ask for support.

Also, this mod only works when installed on both the server and client and can be complicated, it's definitely not the sort of thing to try if you don't know what you're doing.

ianfreya8 commented 3 years ago

okay then it will not work on hypixel minecraft server correct?

Southpaw1496 commented 3 years ago

Definitely not.

ianfreya8 commented 3 years ago

okay thanks.

PhysicalProblems commented 3 years ago

Tried launching from terminal, still doesnt work.

Newtboy commented 3 years ago

I can't get my terminal to mention anything about headless mods at all. I still cannot get it to use the microphone, should I allow Minecraft to have access to control my computer, or am I doing something wrong?

qwertyfoodman commented 3 years ago

Hi there. After experiencing the same issue (Catalina 10.15.7) and going through this thread, I have tried launching the native launcher from the command line (/Applications/Minecraft.app/Contents/MacOS/launcher). In the log, it said [JRSAppKitAWT markAppIsDaemon]: Process manager already initialized: can't fully enable headless mode which sounded quite good to me given what is said above.

As soon as I toggled microphone testing, it asked for permission, and the microphone worked.

So I've made it so Minecraft has access to the microphone via a different method (as this one does not work for me), but voice chat seems to be ignoring that. Any way to fix that? Yes, I have the input device set correctly, And I am on macOS Big Sur.

Newtboy commented 3 years ago

Hi, I got mine to work after i gave it these perms(photo) I then launched it through terminal( /Applications/Minecraft.app/Contents/MacOS/launcher ), and lo and behold, Java asked to use the microphone!

Screen Shot 2021-06-03 at 7 15 57 PM

(under full disc access in privacy)

IanSmith1337 commented 3 years ago

Hey all! Having a similar issue on Mojave. I can give complete specs if needed, but the workaround is working so far.

lilingxi01 commented 3 years ago

Having the same issue!

Using terminal command /Applications/Minecraft.app/Contents/MacOS/launcher to launch was okay and it would ask the microphone permission, but after I gave the permission and tried to relaunch from the basic launcher, it did not work again.

So sadly, the workaround is to launch the game from the terminal every time.

IanSmith1337 commented 3 years ago

So, in response to the many people here who have to open the terminal to launch MC with this mod properly, I crafted a simple mod script to launch the launcher from the command line. All one has to do is throw the following code into a file called "MC.sh", save it, run the command "chmod a+x MC.sh" in the same folder that the file exists in, and it will work like a desktop shortcut, able to be double-clicked to open.

The Code:

#!/bin/sh /Applications/Minecraft.app/Contents/MacOS/launcher

StupidRepo commented 3 years ago

Frick sake man, I am having this issue too. Hoping that @IanSmith1337's solution works.

Haha it did! Woo hoo!

shawndean0 commented 3 years ago

I'm currently launching Minecraft through the CurseForge launcher on MacOS Big Sur and it appears that it is not requesting permissions to use the microphone for the Simple Voice Chat mod. Launching the native launcher through the terminal is not an option for me as I have to launch the game through CurseForge due to my modpack. Is there another workaround for my situation?

Janice999 commented 3 years ago

I'm currently launching Minecraft through the CurseForge launcher on MacOS Big Sur and it appears that it is not requesting permissions to use the microphone for the Simple Voice Chat mod. Launching the native launcher through the terminal is not an option for me as I have to launch the game through CurseForge due to my modpack. Is there another workaround for my situation?

Same issue for me here too! I'm using MacOS Catalina

henkelmax commented 3 years ago

Has someone tested if it works with 1.17? Since it is using java 16, it might work there.

SmallPepperZ commented 3 years ago

Has someone tested if it works with 1.17? Since it is using java 16, it might work there.

It does work with MultiMC on Java 16, but not with the vanilla launcher. The terminal workaround does still seem to work.