Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug 'TypeError: AudioListener.setPosition: Argument 1 is not a finite floating-point value'

Discussion in 'WebGL' started by swarnimdipankar, Aug 23, 2023.

  1. swarnimdipankar

    swarnimdipankar

    Joined:
    Jan 18, 2023
    Posts:
    2
    I'm facing a critical issue in my Unity WebGL project that affects both Mozilla Firefox and Google Chrome browsers. In Mozilla Firefox, the error message 'TypeError: AudioListener.setPosition: Argument 1 is not a finite floating-point value' consistently appears in the browser console. Meanwhile, in Google Chrome, the error message 'TypeError: Failed to set the 'value' property on 'AudioParam': The provided float value is non-finite' is being displayed. These errors are crashing in WebGL builds for both browsers. Despite thorough examination, I haven't been able to identify the root cause of these issues. Any guidance or solutions to resolve this problem in both Mozilla Firefox and Google Chrome would be greatly appreciated.
     

    Attached Files:

  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    233
    Can you share the script you're using the AudioListener API (and any relevant APIs) in?
     
  3. swarnimdipankar

    swarnimdipankar

    Joined:
    Jan 18, 2023
    Posts:
    2
  4. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    233
    would you mind sharing it in as text instead of a screenshot?

    you can add code to your reply on the forums with the code tag
    Code (CSharp):
    1. insert cool Unity script here
     
  5. bfaliuperspectives

    bfaliuperspectives

    Joined:
    Feb 10, 2021
    Posts:
    13
    Hello @unityruba,

    I encounter the same error on Unity 2022.3.6, both on Firefox and Chrome.
    I don't have any code using the AudioListenner class to share since the audio comes from a VideoPlayer component.

    Here is a screenshot of the error :

    upload_2023-10-9_9-19-0.png

    Thank tou for your help !
     
  6. bfaliuperspectives

    bfaliuperspectives

    Joined:
    Feb 10, 2021
    Posts:
    13