Quick answer: Match the exact name including library prefix ("library/anim" when applicable), check which player node you are calling, and drive names from constants or exported variables instead of scattered strings.
Godot 4's animation libraries added a prefix layer that breaks old name assumptions, and string-typed names typo easily. Here is the checklist that resolves this in one pass.
How to fix it
1. Print the real list
Log anim_player.get_animation_list() at runtime — it shows exact names with library prefixes, settling typos and prefix questions instantly.
2. Include the library prefix
Animations in a named library play as "lib_name/anim_name"; only the default (unnamed) library plays bare names.
3. Confirm the node
Duplicated characters and inherited scenes often carry two AnimationPlayers; make sure your reference points at the one holding the clip.
4. Centralize the names
Put animation names in constants (or an enum-to-name map) used by both the state machine and any callers — one source of truth ends the typo class.
Catching the ones you can't reproduce
The hardest version of this to fix is the one you can't reproduce — it only happens on a player's hardware, OS, driver, or save state, under conditions that simply aren't present on your machine. A report that says “it crashed” or “it froze” gives you nothing to act on, so the bug survives release after release while quietly costing you players.
Automatic error capture closes that gap. Each failure arrives with its full stack trace, the device and OS, the build number, and a breadcrumb trail of what the player did right before it broke, so even a failure you have never seen becomes a specific, reproducible issue. Fold identical failures into one signature ranked by how many players each hits, and your worklist sorts itself worst-first instead of arriving as a stream of vague complaints.
This is where a tool like Bugnet earns its place. Its SDK captures every Godot error automatically with the full stack trace plus device, OS, memory, build, and game-state context, folds duplicates into one grouped issue with an occurrence count, and ties each to the build it first appeared on — so you fix the problem that hurts the most players first and confirm it is gone when its signature disappears from the next release.
Ship the fix, watch the signature disappear from the next build. That's how you know it's really gone.