Jump to content

Mobile Audio *Crash Bug*


Recommended Posts

I have the following code to load all my Audio files

].forEach(element => {
  this.load.audio(element, 'sounds/' + element + '.mp3');

This works wonderfully on a desktop, but on mobile I get the following error:

TypeError: null is not an object (evaluating 'e.message')

The error occurs in AudioFile.js (Line 100). Here is an excerpt, I've added a comment where the error is thrown:

onProcess: function ()
    this.state = CONST.FILE_PROCESSING;

    var _this = this;

        function (audioBuffer)
            _this.data = audioBuffer;

        function (e)
            // ERROR occurs on this line (e is null)
            console.error('Error decoding audio: ' + this.key + ' - ', e.message);


    this.config.context = null;


Link to comment
Share on other sites

This is fixed in the master branch and will be part of the 3.12 release. However, it's only the error that is fixed - the cause of it is down to the device / browser / file format you're trying to load. When 3.12 is out the TypeError will be gone, but the files still won't load (as the source of the decodeAudioData error will still be there)

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...