Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Unity WebGL in Firefox / Invalid State Error

Discussion in 'Unity 5 Pre-order Beta' started by astronaut_tim, Nov 22, 2014.

  1. astronaut_tim

    astronaut_tim

    Joined:
    Apr 18, 2014
    Posts:
    7
    Hi,

    we have a little problem with our finished WebGL Project in Firefox. Chrome and Safari work like a charm, but in Firefox we are getting following error:

    An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:InvalidStateError

    This error can be accepted by hitting ok and going on and playing the WebGL file. Nevertheless it behaves different to the executions in Chrome and Safari. We have a synchronised sound and motion and start this at the same time by script. In Chrome and Safari it is perfectly on point. In Firefox it is totally off. The java Script console points to this - > "Unable to find type [UnityEngine.dll]UnityEngine.SharedBetweenAnimatorsAttribute
    This seems to be the reason, but I don not know how to fix this!


    Here is what console says alltogether:
    Successfully compiled asm.js code (total compilation time 3776ms; stored in cache) webGL06.js
    "run() called, but dependencies remain, so not running" index.html:63

    "Invoking error handler due to
    InvalidStateError" UnityConfig.js:74
    "pre-main prep time: 1944 ms" index.html:63

    "Initialize engine version: 5.0.0b13 (5b8e776198f7)" index.html:59
    "Renderer: Mozilla" index.html:59
    "Vendor: Mozilla" index.html:59
    "Version: WebGL 1.0" index.html:59
    "GLES: 0" index.html:59
    "ANGLE_instanced_arrays GL_ANGLE_instanced_arrays EXT_frag_depth GL_EXT_frag_depth EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic OES_element_index_uint GL_OES_element_index_uint OES_standard_derivatives GL_OES_standard_derivatives OES_texture_float GL_OES_texture_float OES_texture_float_linear GL_OES_texture_float_linear OES_texture_half_float GL_OES_texture_half_float OES_texture_half_float_linear GL_OES_texture_half_float_linear OES_vertex_array_object GL_OES_vertex_array_object WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_depth_texture GL_WEBGL_depth_texture WEBGL_lose_context GL_WEBGL_lose_context MOZ_WEBGL_lose_context GL_MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc GL_MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture GL_MOZ_WEBGL_depth_texture" index.html:59
    "Creating OpenGLES2.0 graphics device" index.html:59
    "Unable to find type [UnityEngine.dll]UnityEngine.SharedBetweenAnimatorsAttribute
    " webGL06.js:1

    InvalidStateError
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Is your Firefox up-to-date? I remember older versions showing this error.
     
  3. astronaut_tim

    astronaut_tim

    Joined:
    Apr 18, 2014
    Posts:
    7
    Hey Jonas,

    I just checked it. I work on two machines in parallel both win7-64. On the one i have Firefox 33.1.1 that ist the version giving the state error. On the other machine I have version 33.1. Slightly older but giving no error. Besides from that in both Firefox versions compared to chrome I have a totally asychrone audio and motion.
    Is there a way to send you the link to the webgl file or project. May be interesting for you to check this!? I do not want to post this here as it is not meant to be shown public.
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Yes, just use our bug report tool!
     
  5. sluice

    sluice

    Joined:
    Jan 31, 2014
    Posts:
    416
    Hello, I also have this error
    Unable to find type [UnityEngine.dll]UnityEngine.SharedBetweenAnimatorsAttribute

    showing up on both
    Firefox 33.1.1
    &
    Google Chrome 38
     
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    I believe that is a bug introduced in b13 or so. The error message can be ignored for now.
     
  7. astronaut_tim

    astronaut_tim

    Joined:
    Apr 18, 2014
    Posts:
    7
    I sent you the file via bug report. Left click on one of the figures to start the animation to beat. Best to be seen in Chrome or Unity Editor how it should be.
    But I just discovered something new! I changed optimization level from fast to fastest and now the error is gone. This just leaves me with the problem that audio and and motion are not synchrone on Firefox. Maybe you have a hint there for me to fix this.
     
  8. astronaut_tim

    astronaut_tim

    Joined:
    Apr 18, 2014
    Posts:
    7
    Hi Jonas,
    have you had the time to take a look into the file I sent you via bug report? I am still trying to get Firefox working with our project. To me it seems that Firefox is somehow slower in interpreting the WebGL code!? Could this be??