Simple Voice Chat

Simple Voice Chat

31M Downloads

Microphone not working in macOS

Nekoyue opened this issue · 89 comments

commented

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

  • Minecraft version: 1.16.4
  • Forge version: 1.16.4-35.1.36
  • Mod version: 1.1.1
  • macOS version: Big Sur 11.1
commented

My friends have an SMP server and we tried to have proximity chat. I have my Mac to the latest version, but no one could hear me even when I was talking. My mic was on and my headset is still in really good condition. So it was either something with the mod, the server or something else entirely. My friends could talk with each other with prox chat, so it’s not a server issue. I’ve tried tweaking the settings multiple times so it would work, but nothing worked.
I’m convinced it’s a mod bug, but I really want it to work since we’re doing CLUE/AMONG US event. Any thing that might be done to fix it?

commented

@FionaM007, you have 2 options for getting this to work, you can either manually add Minecraft to the macOS TCC database by disabling System Integrity Protection with these instructions, but you should read SquirrelCraft's comment and SquirrelCraft's other comment about the significant risks first.

Instead of doing this, you can launch the Minecraft launcher with an app that will request microphone permissions, which is easiest to do with Terminal. You can either paste it into Terminal each time, as bdunogier's comment explains, or you can follow the instructions in IanSmith1337's comment to make a file that launches it from Terminal

commented

Hello all! So I have MacOS High Sierra and i have the same issue. I'm using CurseForge with some other mods. My "Enable microphone testing" button is not available, it is darker then others. Anyone found the solution?

commented

A workaround without having to launch using terminal every time is at https://github.com/GameParrot/minecraft-mac-window-fix

commented

Hello, I tried every possible solution in this thread to make my microphone have permission from disabling SIP (System Integrity Protection) to using the commands in terminal and I still can't work out why the mod can't let me "Enable Microphone Testing"
Minecraft version: 1.16.5 , Mod version: 1.9.10
macOS version: Big Sur 11.2.2 running apple silicon

commented

I do not know if the solution has already been answered, but the one I found is to go to applications and open the contents of the package and run the terminal launcher from the MacOs folder and with that it asked me for the permissions for the microphone and I could speak. (sorry for the writing I don't speak English)

commented

We are currently working on a solution.

commented

Does any previously mentioned solution work for modded launchers (specifically ATLauncher)? I'm pretty sure that it's done correctly server-side, but client-side isn't as good. Enabling mic testing doesn't get any input, everything else works fine (I assume).
Thanks for help.

commented

Brill, Thanks!

commented

Alright, the new workaround solution is being tested. If you want to try it, join the discord and visit the #beta-testing channel.

EDIT: It is now released on CurseForge (Version 2.1.6+)

commented
commented

I do have a great understanding of objective c and java, I will join the discord later, I've forked the project but due to my bad internet it will take me a while to import and get it setup.

commented

To add to this, when using an arm64 build of LWJGL 3 and an arm64 JDK, the app fails to launch completely.

[10:02:32] [Render thread/INFO]: Running MacOS microphone permission check
2021-11-27 10:02:32.222 java[7329:154606] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithUTF8String:]: NULL cString'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018f4dc12c __exceptionPreprocess + 240```
commented

To add to this, when using an arm64 build of LWJGL 3 and an arm64 JDK, the app fails to launch completely.

ARM/M1 is not officially supported by Minecraft. Either run it with rosetta or disable the workaround in the config.

commented

To add to this, when using an arm64 build of LWJGL 3 and an arm64 JDK, the app fails to launch completely.

To add onto the response you already got while this is unsupported it still shouldn't happen.

if you have an understanding of objective c and java please hop into the discord and ping me BreadLoaf#4627 in the #development channel

If not please just disable the macos workaround in the config like @henkelmax said

edit:

it would also be quite useful in figuring out what went wrong here if you could provide the full error

commented

@cbyrneee
that would be great if you could as we cant really solve this due to not having a m1 mac we can of course make random guesses but that is not a good way to solve a problem

https://discord.gg/4dH2zwTmyX

commented

@mjwells2002 ill take a look at it over the next few days

commented

if you would join the discord it would be nice i have my own hunch on the solution but need someone with more knowledge of objective c to ask

commented

With the release of voicechat version 2.1.18 this issue is fixed
a workaround is now included in the mod and m1 compatibility has been fixed

commented

With the release of voicechat version 2.1.18 this issue is fixed
a workaround is now included in the mod and m1 compatibility has been fixed

Is the new version available for 1.16.5?

commented

Is the new version available for 1.16.5?

Nope. 1.16 is not actively updated anymore. You need to use the standalone patcher for that.

commented

Is the new version available for 1.16.5?

Nope. 1.16 is not actively updated anymore. You need to use the standalone patcher for that.

I just tried using it, it throws errors like these:
Exception in thread "AppKit Thread" java.lang.NoSuchMethodError: accessibilityHitTest at java.desktop/sun.lwawt.macosx.LWCToolkit.doAWTRunLoopImpl(Native Method) at java.desktop/sun.lwawt.macosx.LWCToolkit.doAWTRunLoop(LWCToolkit.java:931)

I'm on m1 Mac. MultiMC launcher

commented

You can only run the patcher with java 17. If you need help with it visit the discord.

commented

I am trying to patch my MultiMC launcher on macOS to use voice chat, but when I drag MultiMC.app to the window and press yes, I get an error: "Exit code 1"

commented

ok, i fixed the first error by closing MultiMC and trying again, but now it spits out a new error: "Exit code 141"

commented

I'm not gonna read all these comments so this may have already been suggested BUT my solution was to use @IanSmith1337 's proposed solution and instead of creating a file I created a shortcut (Run Shell Script) and copied the code into it, now I can ask siri to open Minecraft aswell :)

commented

im on version 1.18.1 on MultiMC, I can start the game up but it seems to not be able to find my mic. I have selected the correct input but it stil doesn't work, do I need the standalone patcher or is there some other method.

commented

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

commented

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 (MinecraftForge/MinecraftForge@dd10933).

commented

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?

commented

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?

commented

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?

commented

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

commented

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

commented

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

commented

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

commented

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.

commented

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.

commented

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

commented

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

commented

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

commented

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.

commented

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.

commented

image

commented

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.

commented

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?

commented

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.

commented

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)

commented

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

commented

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.

commented

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

commented

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

Haha it did! Woo hoo!

commented

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?

commented

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

commented

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

commented

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.

commented

Slightly simpler fix for this download this zip file extract it somewhere and use the .command file to run the Minecraft launcher (just double click it)
Minecraft-Microphone-Workaround.command.zip

commented

I’ve tried the command (/applications/Minecraft.app..etc.) in my terminal but it won’t work. It just says not found.

commented

I’ve tried the command (/applications/Minecraft.app..etc.) in my terminal but it won’t work. It just says not found.

You need the vanilla launcher installed in order for this to work.

commented

I’ve tried the command (/applications/Minecraft.app..etc.) in my terminal but it won’t work. It just says not found.

You need the vanilla launcher installed in order for this to work.

I do

commented

I’ve tried the command (/applications/Minecraft.app..etc.) in my terminal but it won’t work. It just says not found.

You need the vanilla launcher installed in order for this to work.

I do

I just reinstalled it and tried. And it’s saying the same thing.

commented

@CrystalE8ght Please visit the Discord for more help. The GitHub issue page is not the right place for this.

commented

@CrystalE8ght Please visit the Discord for more help. The GitHub issue page is not the right place for this.

Gotcha, I’ll go back over there and wait for no one to help me.

commented

@CrystalE8ght Please visit the Discord for more help. The GitHub issue page is not the right place for this.

Gotcha, I’ll go back over there and wait for no one to help me.

That's really rude. We are spending our whole day helping everyone we can on that discord!

commented

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.

I'm using MultiMC on Java 16 with Fabric (not Forge) and whether I run it via the app or through terminal, I cannot get it to request access to the mic. When I do it with the vanilla launcher, it works with the terminal workaround. So even with Terminal now appearing in the microphone permission list, MultiMC appears to work slightly differently in that regard and it won't pick up my microphone's audio.

Minecraft version: 1.17
Fabric Loader: 0.11.6
Mod version: 1.2.3
macOS version: Big Sur 11.4

commented

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

hi, I tried this option and it worked completely fine for me, and on another mac I tried it on. I strongly encourage anyone to try this. it adds Minecraft to the microphone panel in security and privacy settings, now when I open Minecraft through the vanilla launcher I can play totally normally with this mod (great mod btw) I have found no issues yet, it seems to be working fine

OS: macOS Mojave;
Minecraft Version: 1.16.5 (but I think it should work for any other version)
Mod Loader: Fabric
Mods: Simple Voice Chat, Dynamic FPS, Sulkerboxtooltip, Mod Menu, Optifine, Phosphor, Fabric API, Optifabric

commented

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

@Harold-Brooks

I also found this however this could be pretty dangerous if you typo something. Also stuff like this could void your Apple Support if you start mucking around and break something. Technically this is the database that gets updated when an app registers with OS with the microphone entitlement, then you can toggle in on/off.

Just for fun I will grab a spare Mac and see what happens when you do type nothing wrong.

On the point of this issue, I am not sure If there is anything the mod author can do, as I do not believe java apps them self can request access. Since this runs under the java app of Minecraft that is why the hack works since the Minecraft launcher spawns the java process. So unless Apple has or creates some API for other non-MacOS signed apps to register, OR Minecraft (Microsoft) adds the mic entitlement I think we may have to hack it or the terminal workarounds.

commented

Also for those you see this and want to try the hack above. There be dragons! At least let me explain what you are doing and the risks you take.

What you are doing is first using the csrutil command in safe mode to disable the system Integrity protection. This allows you to make the changes (manually add Minecraft to that window). With this system disabled malware could also do some things as well. I would recommend you scan you Mac with malware/antivirus to ensure you do not have malware already lurking BEFORE trying this. Also make sure your Mac is NOT connected to WIFI/ internet until you re-enable the system integrity protection. Lastly I would have the commands you need in a text file on your desktop so you can copy/paste so you do not make a typo!

Now you know the risks, you can make a choice if it's worth it or not.

commented

Has a fix been found that works without technic launcher?

commented

Has a fix been found that works without technic launcher?

The issue is still open, so obviously no.

commented

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.

commented

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"?

commented

Open the options (v), Enable microphone testing ?

commented

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.

commented

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.

commented

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.

commented

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.

commented

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?

commented

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

commented

@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: adoptium/adoptium-support#222

commented

Thank you!

commented

how can you install this for java 1.8.9?

commented

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

commented

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

commented

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.

commented

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

commented

Definitely not.

commented

okay thanks.

commented

Tried launching from terminal, still doesnt work.