51

I can't seem to launch any of my apps in my Android emulator because every ~2 seconds this error pops up, and I believe this is making my app crash...

Note: I've never once tried to record audio, which I think it's trying to do... so why is it displaying this? Though I was trying to open a 3D model into JPCT-AE with an inputstream that never worked!

The error:

04-01 21:02:29.798 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: Micro detection mode: [mDetectionMode: [1]].
04-01 21:02:29.798 2160-2160/com.google.android.googlequicksearchbox:search I/AudioController: Using mInputStreamFactoryBuilder
04-01 21:02:29.805 2160-3055/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Starting detection.
04-01 21:02:29.805 2160-2204/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_starting com.google.android.apps.gsa.staticplugins.z.c@652d8ac
04-01 21:02:29.806 1302-1640/? W/APM_AudioPolicyManager: getInputForAttr() failed opening input: samplingRate 16000, format 1, channelMask 10
04-01 21:02:29.806 2160-2204/com.google.android.googlequicksearchbox:search E/AudioRecord: Could not get audio input for session 441, record source 1999, sample rate 16000, format 0x1, channel mask 0x10, flags 0
04-01 21:02:29.807 2160-2204/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22.
04-01 21:02:29.807 2160-2204/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
04-01 21:02:29.807 2160-2204/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.z.c@652d8ac

                                                                                                     --------- beginning of system
04-01 21:02:29.808 2160-2204/com.google.android.googlequicksearchbox:search E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
04-01 21:02:29.809 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: onReady
04-01 21:02:29.844 2160-2204/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.z.c@652d8ac
04-01 21:02:29.844 2160-3055/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Detection finished
04-01 21:02:29.844 2160-3055/com.google.android.googlequicksearchbox:search W/ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
04-01 21:02:29.845 2160-2353/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Stopping hotword detection.
04-01 21:02:29.846 2160-3055/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
                                                                                              com.google.android.apps.gsa.shared.speech.a.g: Error reading from input stream
                                                                                                  at com.google.android.apps.gsa.staticplugins.recognizer.i.a.a(SourceFile:342)
                                                                                                  at com.google.android.apps.gsa.staticplugins.recognizer.i.a$1.run(SourceFile:1367)
                                                                                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
                                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                                                  at java.lang.Thread.run(Thread.java:761)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
                                                                                               Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
                                                                                                  at com.google.android.apps.gsa.speech.audio.Tee.g(SourceFile:2531)
                                                                                                  at com.google.android.apps.gsa.speech.audio.ap.read(SourceFile:555)
                                                                                                  at java.io.InputStream.read(InputStream.java:101)
                                                                                                  at com.google.android.apps.gsa.speech.audio.al.run(SourceFile:362)
                                                                                                  at com.google.android.apps.gsa.speech.audio.ak$1.run(SourceFile:471)
                                                                                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
                                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
                                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
                                                                                                  at java.lang.Thread.run(Thread.java:761) 
                                                                                                  at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85) 
04-01 21:02:29.846 2160-3055/com.google.android.googlequicksearchbox:search I/AudioController: internalShutdown
04-01 21:02:29.847 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetector: Keeping mic open: false
04-01 21:02:29.847 2160-2160/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #onError(false)
04-01 21:02:29.847 2160-3054/com.google.android.googlequicksearchbox:search I/DeviceStateChecker: DeviceStateChecker cancelled

As I said before, this is popping up every ~2 seconds... What could be causing this? I've tried to restart the emulator multiple times and this keeps coming up!!

EDIT: I've also deleted and recreated the emulator and still same errors

Please help me!! Thanks to all in advance :)

hewiefreeman
  • 1,137
  • 1
  • 14
  • 31
  • How about resetting the emulator to factory default, or just delete it and recreate it. – lionscribe Apr 02 '17 at 05:31
  • Tried that before, still getting the error in my logcat :/ – hewiefreeman Apr 02 '17 at 06:54
  • I have the same problem. What version of Android Studio are you running? This is very annoying. I hope we can get to the bottom of this. I have ```Android Studio 2.3.1 Build #AI-162.3871768, built on April 1, 2017 JRE: 1.8.0_112-release-b06 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o``` – jungledev Apr 15 '17 at 02:33
  • 1
    My Nexus 6 AVD is suffering from this problem. Tried wiping data, no change. I created a Nexus 5x AVD and it appears to work fine. Then switched back to the Nexus 6 and it's also working fine. No idea. – bronson May 06 '17 at 22:39

5 Answers5

54

Android is trying to listen on the microphone, which isn't available on the emulator, so it fills logcat with useless stack traces. To stop this, go to the Settings app in Android, and click:

  1. Apps and notifications
  2. App permissions
  3. Microphone

Then disallow microphone use for all the apps.

Yusuf X
  • 14,513
  • 5
  • 35
  • 47
  • Thanks so much! That was very annoying >_ – hewiefreeman Jun 07 '17 at 01:42
  • 5
    Well, I'm still getting this error on the Android Emulator with the newest sdk. This worked on my physical device, but it isn't running the newest version of Android like the emulator. Any advice? – hewiefreeman Jun 28 '17 at 21:44
  • 2
    does this mean that google listens in on all user's microphone input streams periodically for their use. – Harshit Laddha Sep 20 '17 at 14:28
  • 9
    This is the correct answer - one thing to note is that I had to click the 'three dots' in the top right and click "Show system" in order to disallow access for the *Google Play Services*, which is what was spawning this error. – Xcalibur Nov 14 '17 at 15:17
  • 2
    @deadman yes, it does. How do you think google search comes up by one saying "hey google"? – hewiefreeman Nov 28 '17 at 06:36
  • I tried this and it did not work. Turned out I simply need to close all emulators -- I accidentally launched one with Android Studio. When I did that those messages stopped being produced. – Alyoshak Jan 15 '18 at 23:53
33

Although disabling Microphone removed some of the errors , Disabling Quick Search App worked for me as suggested by OOI .

Settings >> Apps & Notifications >> All Apps >> Google

enter image description here

clemens
  • 16,716
  • 11
  • 50
  • 65
1nullpointer
  • 1,212
  • 1
  • 13
  • 19
7

That com.google.android.googlequicksearchbox is Google app.

Simply disabling it in Settings worked for me.

ooi
  • 1,062
  • 12
  • 8
7

Here's how to disable the hotword detection ("Ok Google") app in the emulator:

./adb shell "su root pm disable com.google.android.googlequicksearchbox"
atyachin
  • 1,103
  • 1
  • 12
  • 14
1

In my case I fixed this first time by adding:

<uses-permission android:name="android.permission.RECORD_AUDIO" />

in AndroidManifest.xml

and updating the google.android.gms packages used in the project to the latest version in build.gradle file:

compile('com.google.android.gms:play-services-analytics:11.0.4') {
    force = true;
}
compile('com.google.android.gms:play-services-ads:11.0.4') {
    force = true;
}
compile('com.google.android.gms:play-services-gcm:11.0.4') {
    force = true;
}

UPDATE: Later, after an update of RN from 0.45 RN to 0.53 I found that the RECORD_AUDIO can be removed (if not used) with adding play-services-location and the play-services-base as below:

compile('com.google.android.gms:play-services-analytics:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-ads:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-gcm:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-location:11.0.4') {
    force = true;
}

compile('com.google.android.gms:play-services-base:11.0.4') {
    force = true;
}
Florin Dobre
  • 9,872
  • 3
  • 59
  • 93
  • 4
    It's not my apps causing the error, it's **com.google.android.googlequicksearchbox** trying to access the mic. And I can't seem to disallow mic usage from that package. – hewiefreeman Aug 03 '17 at 02:39