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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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