Microphone.GetPosition(null) hangs forever

I’m making a small unity project and things were going well until I had to deal with the microphone. Here’s what I’m using to get Microphone input:

GameObject.FindWithTag("AppManager").GetComponent<AppManager>().recording.clip =Microphone.Start(null, false, 1, 44100);
 while (!(Microphone.GetPosition(null) > 0)) { }
 Debug.Log("recording has started");

… which hangs endlessly until I have to force stop Unity from task manager.

I’ve gotten all permissions I need using the recommended way by Unity here, but it’s still giving me the same problems.

Any help?

Why dont you try to set

Microphone.Start(null, false, 0, 44100);

which is infinite playback and when not needed just run

Microphone.End()

Also never NEVER NEVER use loops like that. Try something like :
float timer;

while (!(Microphone.GetPosition(null) > 0) && timer <  1000)
{
    timer += Time.deltaTime;
}

if (timer >= 1000)
{
    Debug.logerror("Failed to play from mic....");
}
else { ... }