-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: null is not an object (evaluating 'o.ctx.createGain') #1021
Comments
I get a similar error (mostly on browsers like Opera on SmartTVs and Linux OS)
|
Can you provide any further steps to reproduce? I've been unable to so far and looking through the code am confused how this error could happen as it is checking for this case. |
Same here on browsers like Opera and SmartTVs (webOS 3.0). My case is quite complicated, so I will try to simplify it and come back with a replication scenario |
Not sure how much it helps, but I now basically check if I can use Howler like this:
Some of the user-agents which had this problem:
Unfortunately I don't have any of this devices |
This error only occurs in the Safari browser for both Mac OS and iOS. We have a lot of such issues registered in Sentry but I still can not reproduce it on my Mac and iPhone. Here is the same issue #1063 |
It looks like it usually happens when howler tries to retrieve more contexts than browser may allow (e.g., a few apps using howler are opened on the same tab in multiple iframes). Not sure about limit in Safari, but for e.g. MS Edge it's 6. |
Unrelated to this issue, but I believe Safari has a limit of 4. I've run into this with React components accidentally creating multiple AudioContext instances which seem to be fine in Firefox and Chrome, but Safari doesn't like this so when you try |
Hey guys
I catch sometimes this issue
TypeError: null is not an object (evaluating 'o.ctx.createGain')
Howler.js version: 2.0.14
iOS 11.0
Safari browser
Usage:
I call
Howler.mute(false)
when audio context is not created. Functionmute
callssetupAudioContext()
insrc/howler.core.js:119
. The error occurs insrc/howler.core.js:2309:45
when code tries to check type ofHowler.ctx.createGain
butctx
is null.Please pay your attention on that
The text was updated successfully, but these errors were encountered: