# WebGL Bank Loading Issues

**URL:** <https://qa.fmod.com/t/webgl-bank-loading-issues/23466>\
**Category:** Unity\
**Created:** [October 14, 2025, 3:54am UTC](https://qa.fmod.com/t/webgl-bank-loading-issues/23466 "2025-10-14T03:54:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VoodooDetective](https://avatars.discourse-cdn.com/v4/letter/v/ecc23a/32.png) [@VoodooDetective](https://qa.fmod.com/u/VoodooDetective)\
**Post date:** [October 14, 2025, 3:54am UTC](https://qa.fmod.com/t/webgl-bank-loading-issues/23466/1 "2025-10-14T03:54:44Z")

</div>

````auto
# WebGL: Race Condition in Bank Loading Causes EventNotFoundException

**Platform:** WebGL  
**Issue:** Streaming music/sounds fail to load with `EventNotFoundException` errors

## Problem

In WebGL, `RuntimeManager.LoadBank()` uses `StartCoroutine(loadFromWeb())` to download banks via HTTP. However, `AnyBankLoading()` returns false immediately because:

1. `StartCoroutine()` doesn't execute until the next frame
2. `AnyBankLoading()` checks `loadedBanks` dictionary which is still empty
3. Scene initialization completes before banks finish downloading

## Fix

Check `loadingBanksRef` counter before checking registered banks:

```csharp
public static bool AnyBankLoading()
{
    if (Instance.loadingBanksRef > 0)
        return true;
    
    // ... existing checks for loadedBanks states
}

````

This catches banks that are downloading but haven’t been registered yet.

---

<div class="post-metadata">

**Author:** ![clean](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@clean](https://qa.fmod.com/u/clean)\
**Post date:** [October 16, 2025, 11:41pm UTC](https://qa.fmod.com/t/webgl-bank-loading-issues/23466/2 "2025-10-16T23:41:12Z")

</div>

Hello thanks for that information. Are you on an older version? The variable you are talking about is not used in current releases.

---

<div class="post-metadata">

**Author:** ![VoodooDetective](https://avatars.discourse-cdn.com/v4/letter/v/ecc23a/32.png) [@VoodooDetective](https://qa.fmod.com/u/VoodooDetective)\
**Post date:** [October 17, 2025, 3:19am UTC](https://qa.fmod.com/t/webgl-bank-loading-issues/23466/3 "2025-10-17T03:19:15Z")

</div>

We’re on 2.02.28. So we might be a little out of date. If it’s been fixed, we may just upgrade. Thanks!

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [October 20, 2025, 12:57am UTC](https://qa.fmod.com/t/webgl-bank-loading-issues/23466/4 "2025-10-20T00:57:07Z")

</div>

I can see what you’re saying, the Coroutine will execute immediately but then return at the first yield, which is when we request the data from Unity and then after it comes back in we attempt the load.

We can check `Instance.HaveAllBanksLoaded()`(which checks the `loadingBanksRef` list) at that point to see if any banks have been added to the queue.

I have added a task to implement this in an upcoming release.

---

<div class="post-metadata">

**Author:** ![VoodooDetective](https://avatars.discourse-cdn.com/v4/letter/v/ecc23a/32.png) [@VoodooDetective](https://qa.fmod.com/u/VoodooDetective)\
**Post date:** [October 20, 2025, 2:00am UTC](https://qa.fmod.com/t/webgl-bank-loading-issues/23466/5 "2025-10-20T02:00:11Z")

</div>

Thanks very much!
