Howler.js: Errors due to null audio context on Safari

Created on 18 Oct 2018  路  4Comments  路  Source: goldfire/howler.js

I receive frequent Howler error reports from the field with error message: null is not an object (evaluating 'n.ctx.createGain'). The error is thrown while calling the Howler constructor. I'm using howler.core.min.js version 2.0.15. The sound source is an MP3 file. The error only occurs in the Safari browser for both Mac OS and iOS. Safari versions 10, 11, and 12 are all affected.

In howler.js (v2.0.15), ctx.createGain only appears on lines 2058 and 2307, and there doesn't appear to be a check for a null ctx before referencing ctx.createGain at either line. I just enabled error reporting on the Howler code today, so I don't know how long the issue has existed. I receive about a half dozen of these reports per hour, but only a small minority of Safari users seem to be affected. I don't see the error on my Mac or my iPad.

Most helpful comment

The fix seems to have moved the error elsewhere.

image

Still affecting Safari on Mac and iOS

All 4 comments

Hi,
Exact same error here on multiple Macs and multiple Safari versions.

The sounds can't be played after this error - that's a real issue here.

The fix seems to have moved the error elsewhere.

image

Still affecting Safari on Mac and iOS

Yes,This problem still exists in safari.Especially when you play sound server times.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Glutch picture Glutch  路  3Comments

brancusi picture brancusi  路  4Comments

SandMoshi picture SandMoshi  路  3Comments

jacobedawson picture jacobedawson  路  3Comments

distante picture distante  路  5Comments