Search Unity

Resolved WebGL Error

Discussion in 'Localization Tools' started by BilalGuvenc, Jun 21, 2020.

  1. BilalGuvenc

    BilalGuvenc

    Joined:
    May 5, 2020
    Posts:
    16
    Unity 2019.4.0
    Localisation Preview 0.7.1

    It works on Android but WebGL gives "uncaught abort(148)"

    MissingMethodException: Default constructor not found for type UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]
    at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0

    (Filename: currently not available on il2cpp Line: -1)
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    We have an issue with stripping on IL2CPP when it is medium or high. Do you have that enabled?
     
  3. BilalGuvenc

    BilalGuvenc

    Joined:
    May 5, 2020
    Posts:
    16
    Managed stripping level is low and WebGL was working without error on previous Unity version which was uninstalled
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Can you please file a bug report?
     
  5. BilalGuvenc

    BilalGuvenc

    Joined:
    May 5, 2020
    Posts:
    16
    I was using a character, which is not included in my font, so I chose a character from my font for WebGL. It works now. Maybe Unity could give a build error for this situation.
     
  6. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    Hi I have the same issue - same error - its set to low on my end - you mention you were using a character for your font - not quite sure what this means and where i should look that could be getting stripped --- you chose a font for webgl?

    thanks!
    daniel
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    What error are you getting with low stripping? Have you tried disabling stripping?
     
  8. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    Hi Karl - thanks for the quick reply...just trying that right now - waiting for it to finish building - but ya the exact same error he has is what comes up

    with low option selected:
    MissingMethodException: Default constructor not found for type UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]
    at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0

    will let you know what i get back after removing stripping
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    This looks like an Addressables issue. Try updating to the latest version of Addressables in the package manager.
     
  10. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    interesting...i unchecked it and rebuilt - still same issue - going to leave it unchecked and relaunch unity and then build again to see what happens

    upload_2020-10-15_9-20-37.png

    I am also on the latest version of addressables (1.8.5)
     
    Last edited: Oct 15, 2020
  11. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    same issue -
    Addressables.InitializeAsync().CompletedTypeless - the command in question that is causing the error it appears and that is where the game stops...most likely within the Addressables.InitializeAsync() and how webgl or the browsers launch async code or something?
    trying this portion of my code to see if that changes things then will continue looking into the initializeasync() and how webgl functions with it since i think that may be the issue...other platforms have no issue.
    Addressables.InitializeAsync().Completed += objects =>
    {
     
  12. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    darn ya same thing guess its with that method - sounds like an addressables issue to me...ill file a bug report to the addressables team since i dont think i can find anything on this
     
    karl_jones likes this.
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Thanks,
    I spoke to the Addressables team and they have fixed several stripping issues. It looks like this is not reproducible for them though so a bug report would be appreciated.
     
  14. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    awesome yup uploading right now - although i may have to get them to tweak a line cause i have a call that launches off the server which is a local path so it will throw a network error for them.
    thanks again!
     
    karl_jones likes this.
  15. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Hello,

    Don't know if related but I just started using Addressables.InitializeAsync() and it takes a while on WebGL mobile to actually complete. Is there some setup to mitigate this? It is not good experience to have a load screen to start Unity webgl and then have players wait even longer to get into the experience. Any ideas would be appreciated.

    Thanks,
    crafTDev