Rive React seems to unload items when the page is idle long enough

Open
#379 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Start by reproducing the issue with @rive-app/react-canvas version ^4.21.3, leaving a page with a .riv file idle until the detached ArrayBuffer error appears. Trace the failure from the reported Float32Array construction and verify that the error and missing or hidden items no longer occur after the page remains idle.

Written by the indexing model from the issue text.

Description

triage

My .riv loads perfectly fine, but when the page containing said rive file is left idle for some time I get the following error, and some of the items within my rive file seem to get either hidden or unloaded.

TypeError: Cannot perform Construct on a detached ArrayBuffer
    at new Float32Array (<anonymous>)

I'm using "@rive-app/react-canvas": "^4.21.3",

Before:
Image
After:
Image
Dominant language
TypeScript
Stars
1.2k
Forks
58
Avg merge
3h 23m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rive-app/rive-react

All issues in rive-app/rive-react

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.