"Audio Cache entry missing: Sound"

So I’m currently working on a project and opened it on Firefox (Ubuntu) and it’s completely broken. (the game has normally a small countdown then spawns enemies, but it’s just stuck and I can’t move)

my sound handling code look like this

import { GameScene } from "../scenes/gameScene";

// Usage :
// this.scene.gameEvent.emit(signalName, Object with {sound: signalSOund});
export class SoundEffects {
    private defaultUrl: string = '/src/games/cadre-de-guerre/assets/sounds/';
    private soundList = [
        'Alarm',
        // other sounds omitted for brevity
    ];
    private eventList = [
        'playerRespawned',
        // other events omitted for brevity
    ];
    private sounds = []
    scene: GameScene;

    constructor(params) {
      this.scene = params.scene;
    }

    preloadSound() {
      this.soundList.forEach(element => {
        this.scene.load.audio(element, this.defaultUrl + element + '.mp3', { instances: 1});
      });
    }
    initSound() {
        this.soundList.forEach(element => {
            this.sounds[element] = this.scene.sound.add(element.toString());
            this.sounds[element].volume = 0.3;
        });

        this.eventList.forEach(element => {
            this.scene.gameEvent.on(element, this.playSound, this);
        });
    }
    playSound(obj) {
        if (obj) {
            this.scene.sound.play(obj.sound);
        } else {
            console.log('no object sent');
        }
    }
  }

usage in the GameScene is like this :

  constructor() {
    //...omitted code
    this.soundEffectsManager = new SoundEffects({ scene: this });
  }

  preload(): void {
    //...omitted code
    this.soundEffectsManager.preloadSound();
  }


  create(): void {
   // omitted code
    this.soundEffectsManager.initSound();
   // omitted code
  }

it works on Chrome but for some reason I can’t make it work on Firefox.
The errors that I get on the console :

Audio cache entry missing: Alarm phaser.js:76313:21

TypeError: this.currentConfig is undefined

Source map error: TypeError: sockjs.js.map is not a valid URL.
Resource URL: webpack:///./node_modules/sockjs-client/dist/sockjs.js?
Source Map URL: sockjs.js.map

Maybe I’m missing something silly so…yeah :thinking:
pls help ༼ つ ◕_◕ ༽つ

Update:

this.currentConfig is in Phaser.Sound.BaseSoundManager
I have no idea how to fix it as Phaser 3 sound seems to work fine on the website.

Maybe it’s a localhost/cors error, maybe it’s tied with the boilerplate I’m using that do not like this.currentConfig because of the typescript config…I have no idea.

Since preloadSound() doesn’t yell I’d assume this.scene.sound.add(sound) is the culprit.

I’ve temporaly disabled sound on linux firefox and it seems to do the trick.
it’s less than ideal, but better than crashing the game altogether :

    if (!this.isLinuxFirefox()) {
      this.soundEffectsManager.initSound();
    }

quick and dirty linux/firefox detect

  isLinuxFirefox(): boolean {
    // because it crash in soundManager
    let is_linux = /Linux/.test(window.navigator.platform);
    let is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
    return (is_firefox && is_linux);
  }