Photon microphone failed. Falling back to Unity microphone

AndroidPlayer(samsung_SM-A705FN@192.168.1.2) [Voice Connection and Recorder.Recorder] 2020-12-19T18:15:53:[PV] UnityAndroidAudioInAEC: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.exitgames.photon.audioinaec.AudioInAEC$DataCallback

AndroidPlayer(samsung_SM-A705FN@192.168.1.2) [Voice Connection and Recorder.Recorder] 2020-12-19T18:15:53:Photon microphone input source creation failure: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.exitgames.photon.audioinaec.AudioInAEC$DataCallback
at UnityEngine.AndroidJNISafe.CheckException () [0x0008d] in /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe.cs:24

AndroidPlayer(samsung_SM-A705FN@192.168.1.2) [Voice Connection and Recorder.Recorder] 2020-12-19T18:15:53:Photon microphone failed. Falling back to Unity microphone

Comments

  • Weaglf
    Weaglf
    edited December 2020
    error.png

    Debug Logs -> https://ibb.co/2PBcNwb

    (Do not mind the "provide appId" log, it was just to test)
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2020
    Hi @Weaglf,

    Thank you for choosing Photon!

    Second post w/ screenshot containing logs is not really useful.
    From the first post's errors, it looks like the native Android plugin is missing from your apk somehow.
    Make sure "Assets\Photon\PhotonVoice\PhotonVoiceLibs\Android\libs" are included in your build, especially "audioinaec.aar".

    In any case, recording or audio input can still happen but instead of the Photon implementation it will use Unity's Microphone API.

    What Photon Voice version is this?
    What Unity version is this?
    Does this happen on different devices?
    Does this happen w/ demo scenes?
    What is your Android build settings?
    What is the Android version?
  • Weaglf
    Weaglf
    edited December 2020
    JohnTube wrote: »
    Hi @Weaglf,

    Thank you for choosing Photon!

    Second post w/ screenshot containing logs is not really useful.
    From the first post's errors, it looks like the native Android plugin is missing from your apk somehow.
    Make sure "Assets\Photon\PhotonVoice\PhotonVoiceLibs\Android\libs" are included in your build, especially "audioinaec.aar".

    In any case, recording or audio input can still happen but instead of the Photon implementation it will use Unity's Microphone API.

    What Photon Voice version is this?
    What Unity version is this?
    Does this happen on different devices?
    Does this happen w/ demo scenes?
    What is your Android build settings?
    What is the Android version?

    Hi @JohnTube

    Thanks for helping!

    PUN: 2.26.1
    Photon lib: 4.1.4.8
    Unity version: 2019.4.16f1
    Yes happens with demo scene too.
    My Android version is 10

    How can I make sure audioinaec.aar is included in the build? Import settings are:
    https://ibb.co/zQw2Dsy

    Android Build Settings:
    https://ibb.co/ysXJQhs
  • Weaglf
    Weaglf
    edited December 2020
    Build settings: https://ibb.co/pRFpVDv

    @JohnTube please help, my update is delayed :(
  • [Voice Connection and Recorder.Recorder] 2020-12-22T20:25:18:[PV] UnityAndroidAudioInAEC: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.exitgames.photon.audioinaec.AudioInAEC$DataCallback
    at UnityEngine.AndroidJNISafe.CheckException () [0x00091] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x00011] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaObject._CallStatic[ReturnType] (System.String methodName, System.Object[] args) [0x0031d] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaObject.CallStatic[ReturnType] (System.String methodName, System.Object[] args) [0x00001] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x0001d] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00012] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaClass..ctor (System.String className) [0x00007] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaProxy..ctor (System.String javaInterface) [0x00000] in <032707c4280f488db0a279a77d41ab9e>:0
    at Photon.Voice.Unity.UnityAndroidAudioInAEC+DataCallback..ctor () [0x00000] in <c09d2f53931045e4bea691882c1e87c5>:0
    at Photon.Voice.Unity.UnityAndroidAudioInAEC..ctor (Photon.Voice.ILogger logger, System.Boolean enableAEC, System.Boolean enableAGC, System.Boolean enableNS) [0x0000d] in <c09d2f53931045e4bea691882c1e87c5>:0

    [Voice Connection and Recorder.Recorder] 2020-12-22T20:25:18:Photon microphone input source creation failure: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.exitgames.photon.audioinaec.AudioInAEC$DataCallback
    at UnityEngine.AndroidJNISafe.CheckException () [0x00091] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x00011] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaObject._CallStatic[ReturnType] (System.String methodName, System.Object[] args) [0x0031d] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaObject.CallStatic[ReturnType] (System.String methodName, System.Object[] args) [0x00001] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x0001d] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00012] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaClass..ctor (System.String className) [0x00007] in <032707c4280f488db0a279a77d41ab9e>:0
    at UnityEngine.AndroidJavaProxy..ctor (System.String javaInterface) [0x00000] in <032707c4280f488db0a279a77d41ab9e>:0
    at Photon.Voice.Unity.UnityAndroidAudioInAEC+DataCallback..ctor () [0x00000] in <c09d2f53931045e4bea691882c1e87c5>:0
    at Photon.Voice.Unity.UnityAndroidAudioInAEC..ctor (Photon.Voice.ILogger logger, System.Boolean enableAEC, System.Boolean enableAGC, System.Boolean enableNS) [0x0000d] in <c09d2f53931045e4bea691882c1e87c5>:0

    [Voice Connection and Recorder.Recorder] 2020-12-22T20:25:18:Photon microphone failed. Falling back to Unity microphone
  • Weaglf
    Weaglf
    edited December 2020
    Worked properly on
    Unity: 2019.1.6f1
    with demo scene...
  • Weaglf
    Weaglf
    edited December 2020
    vov, on an empty project it worked too (2019.4.16f1)... which settings might be causing this in my project :/
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Weaglf,

    I just built DemoVoiceUI scene using Unity 2019.4.16f1 from Photon Voice 2.22.3 and tested it on Android 10 (One Plus 7 Pro) and the Photon microphone (native plugin class is loaded) works fine.
    Not sure what's wrong with your build.
    Maybe it's a Unity issue or something else as we can't reproduce.

    You can live with just Unity microphone type for the release/update and then try to investigate further.

    Besides, you provided PUN version 2.26.1 and not Photon Voice 2 version.
    And latest Photon Voice 2 version has PUN 2.26 so you must have imported PUN 2 on top of Photon Voice 2, although it's not related to the current issue but we don't recommend this in the future.