remotion-dev / remotion

🎥 Make videos programmatically with React
https://remotion.dev
Other
20.33k stars 1.02k forks source link

checkInfiniteRange throws error when running in Electron #3876

Closed calebfoss closed 4 months ago

calebfoss commented 4 months ago

Bug Report 🐛

I am working on a game using the Remotion player.

When the game runs in Electron via the Itch.io app, a checkInfiniteRange function throws the error "inputRange must contain only numbers." When I check the debugger, the array it is checking does, in fact, only include numbers (specifically it is [-1, -0, 1]), but the for...in loop is checking a property called "at," which looks like it's referring to this method.

I tried running a for...in loop on an array in the console within the Itch.io app, and oddly enough, "at" is the only property name it iterates over beyond the indices. I tried a for...of loop, and it only iterated over the array elements, not the at method.

I'm not sure why this would only happen in Electron (or maybe it's specific to Itch?), but I'm wondering if that loop would work better as a for...of so that it's only checking the array element values and not iterating over the property names.

I'm using version 4.0.125, but I checked the current implementation, and it looks like it would have the same issue.

Edits: added version number and troubleshooting info regarding for...in