rive push to a file that is open in the editor loses keyframes and the state machine layer
Environment
Rive CLI 1.1.1 (Homebrew), macOS 14.5
Rive editor: macOS desktop app 0.8.5940. The file was open there during the pushes.
Free plan, file in Personal Files
Scene: one artboard, 1920×1080, one 600-frame linear animation, one state machine (one layer, one animation state). 48 keyed objects, about 2,850 keyframes, one embedded variable font. All authored as RML and generated by a script.
Summary
When a follow-up rive push (a diff push) lands while the target file is open in the editor, the editor ends up with a damaged copy. It then saves that copy back to the file, so the cloud file stays damaged even after a later correct push.
The same sequence of pushes on a file nobody has open arrives intact.
Steps to reproduce
Run rive push --project=<id> so the push creates a new file. Pulling it back shows it complete.
Open that file in the editor and leave it open.
Change the scene so that an already-animated property gets more keyframes. In our case, an opacity track went from 3 keyframes to 6.
Run rive push. The CLI reports success, for example pushed 0 created, 1092 updated, 0 deleted.
Pull the file into a scratch directory with rive create <dir> --from-remote-file=<fileId>. Compare its <KeyedObject> and <KeyFrame*> elements against the local scene.rml.
Expected
The pulled file matches the local project, as it does when the file is not open.
Actual
The pulled copy has lost:
every keyframe of several keyed objects, not only the one whose keyframes changed:
a FollowPathConstraint's distance (144 keyframes)
a TrimPath's start and end (288 keyframes)
two LinearGradients
a SolidColor
several StraightVertex x-tracks
a shape's opacity
some keyframes of the property that was changed. Its opacity track kept 3 of its 6 keyframes.
the whole StateMachineLayer, so the StateMachine came back as an empty element with no layer and no animation state.
The editor shows the same damage when scrubbing the timeline. For example, a pill stays at its initial width and a dot sits at the start of its path.
Repair attempt
Pushing again from the CLI resends the missing objects, and an immediate pull confirms the file is complete. However, if the file is still open in the editor, a later pull shows the damage back: 7 keyed objects short and 0 state machine layers. The editor appears to write its damaged in-memory copy back over the repaired file.
Control
We replayed the exact sequence on a second file that was never opened: first push with 3 keyframes, second push with 6. That file pulled back identical to the local project. Pushes that only changed keyframe values, or reordered siblings, also arrived intact.
We reproduced the damage twice, on two different files, each time with the file open in the editor during the push.
Not the duplicate <KeyedObject> issue fixed in CLI 1.1.1
The scene has exactly one <KeyedObject> per object, with no duplicates, and the CLI is already 1.1.1. The same pushes arrive intact when the file is closed.
Workaround
Close the file in the editor before rive push, pull and compare afterwards, then reopen it.