rive-app / rive-app/rive-flutter
[WASM] ViewModelInstance and StateMachine input methods fail with JavaScriptError
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.5k
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- rive: 0.14.0
- rive_native: 0.1.0
- Flutter Web:
flutter run -d chrome --wasm
When running Flutter Web with WASM r (--wasm flag), several Rive APIs fail with JavaScriptError:
ViewModelInstance methods crash:
_viewModelInstance.number(name) // JavaScriptError
_viewModelInstance.string(name) // JavaScriptError
_viewModelInstance.boolean(name) // JavaScriptError
_viewModelInstance.trigger(name) // JavaScriptError
controller.stateMachine.inputs // Returns empty list []
controller.stateMachine.inputAt(0) // Returns null immediately
The animation renders correctly, but we cannot programmatically read or modify ViewModel properties or StateMachine inputs.
Everything works as expected on (Chrome without --wasm, Windows, Android, iOS)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with flutter run -d chrome --wasm using rive 0.14.0 and rive_native 0.1.0. Investigate the listed ViewModelInstance methods and StateMachine input APIs, then verify that they work in WASM as they do in the other environments described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, wasm
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100