Hi,
I just spent hours trying to work around the “-9999 Unanticipated host error” issue when attemtpting to record audio on Windows 10. My microphone privacy settings were ok, and I eventually discovered that the cause of my issue was Kaspersky Endpoint Security: I had to add Audacity to the “trusted” apps in the antivirus settings.
This very important info is in this post, but the thread is buried in the many forum pages, despite being locked: it should be put sticky at the top of the forum, or better the important hint on the antivirus issue should be copied in FAQs and docs.
This is the sticky post on the mic access issue, but it does not give any hints regarding antivirus apps.
-9996 Invalid device: > this means that the sound device is not valid, if it is an external sound device:
it may have been unplugged
you may have a faulty or loose connection
you may have a bad lead
the device itself may be faulty.
-9997 Invalid sample rate: > make sure that you have matched the sample rate in Audacity with that set on your device - both for playback and recording.
-9999 Unanticipated host error: > this means means “something is wrong”. And appears to most often be due to either:
A lost connection to a USB audio device.
Recent Windows / Mac update requiring that user gives permission for Audacity to access the microphone.
That’s not in the FAQ now because we see relatively few cases of anti-virus apps blocking access to the audio device. Perhaps it’s only “Kaspersky Endpoint Security” that does so. I’ll certainly keep an eye out for this, and if it looks to be a common problem I’ll add it to the FAQ.
Perhaps you could report the problem to Kaspersky. Let us know if they offer any advice or suggestions.
Well I think they have their rules… I think the Kaspersky app checks if applications come from certified developers, and non-certified apps are by default denied some permissions. Infact, I did not need to allow any permissions for other apps like Skype.
Now that I found it, I see this issue between Audacity and Kaspersky sometimes comes out; for example, other than the forum post I already linked, there is this video: https://www.youtube.com/watch?v=eRcCYgOuSYQ
Anyway, I agree that Kaspersky seems to be the only antivirus doing this. I cannot find any reports for others.
Audacity is digitally signed for both Windows and macOS. Digital signing is more rigorous for macOS as Apple also require that the app it “notarized” and require that the developer signing is a registered Apple developer (and has paid the appropriate fees to Apple).
It’s getting increasingly difficult to make free software for Windows and Apple (especially Apple) as they add more hoops for open source developers to jump through. Even worse for iPhone apps where Apple Store is virtually a monopoly, (and not much better with Google Store and Android), but we don’t yet make a mobile version.
Yes I guess it’s not easy at all.
Anyway here is how Kaspersky sees Audacity.
As you can see, it detects the installer as signed, while it says that the digital signature for Audacity itself is “Missing” (“Mancante” in Italian).
There is a person icon because I had to put the app in the Trusted group to work around this.