howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

The provided value is non-finite

Open pondorasti opened this issue 1 year ago • 3 comments

The Problem

Noticed a steady flow of errors in Sentry coming from Howler caused by setValueAtTime.

CleanShot 2024-07-03 at 16 13 09@2x

The problem might be somewhat related to https://github.com/goldfire/howler.js/issues/985, I only see this error happening on iOS Safari.

Reproducible Example

No response

Reproduction Steps

All captured errors are coming from iPhone users in Safari, ranging from iOS 17.2 to iOS 17.6.

Possible Solution

No response

Context

No response

Howler.js Version

v2.2.4

Affected Browser(s)/Versiuon(s)

No response

pondorasti avatar Jul 03 '24 23:07 pondorasti

I have the same issue with v2.2.3 and iOS.

laltin avatar Sep 26 '24 19:09 laltin

We've had these crashes (and some related but less common ones) showing up in our apps for literally years as well =). I finally got around to updating to the latest Howler hoping perhaps the issue had been fixed, but, nope, still happening. So, I've started actively tracking down and fixing (in my fork) all Howler-related crashes we're seeing. It might not apply trivially (since my fork has diverged a little bit and not all other PRs are made/accepted yet), but the changes that managed to make these crashes go away for us are here: https://github.com/Jimbly/howler.js/commit/3bf5d314926cacd81f50d485474c933d33af1f87

The error rate for our users from this error dropped from a couple per hour down to 0 after this change.

As a bonus, avoiding using setValueAtTime() also fixes a delay of up to 100ms on FireFox since ctx.currentTime is a very low-resolution timer depending on the user's fingerprinting settings.

You may also be able to just try swapping to @jimbly/[email protected] (though I'm not doing any minification on my fork, leaving that up decision to the app that requires()s it for simplicity, so might not just work as a drop-in replacement)

Jimbly avatar Apr 03 '25 15:04 Jimbly

I have the same issue with v2.2.4 and iOS Actually, I am using the use-sound package, which uses howler.js internally

okinawaa avatar Jun 18 '25 06:06 okinawaa