rive-app / rive-app/rive-android
How to Handle error "No StateMachineInput found with name"
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 538
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
I attempted to change the state using the following code:
riveFile?.fireState("GirlState", "input")
In my scenario, inputs are received from the server side. However, some of these state inputs are not present in the Rive file. As a result, a crash occurs with the following error:
app.rive.runtime.kotlin.core.errors.StateMachineInputException: No StateMachineInput found with name input
How can I handle this situation.
Contributor guide
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
Start by reviewing the fireState("GirlState", "input") entry point and StateMachineInputException referenced in the report. Determine how a missing state-machine input is currently handled and verify that server-provided names that are absent from the Rive file no longer cause a crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100