Skip to content

Player diagnostic codes

Every warning and error a player reports carries a number, not a sentence. The player ships the number; the words are here. That keeps the library small, and gives each diagnostic a stable identity you can switch on in code and search for.

createSvgAnimationPlayer({
src: '/animation.json',
container: '#stage',
onWarning: d => console.log(d.code, d.data), // 1204, ['#missing']
onError: d => report(d.code, d.error),
});

Without a handler the player prints the code, the data and a link to this page. The kind beside it says who can act: document repair the file · host fix the page · platform the browser could not do it · usage fix what you passed · internal report it.

A code is permanent: numbers are never reused, and a retired one stays listed.

CodeWhat it meansData
1001The player could not be built from this document — a document that passed validation but still broke the builder, or a bug in the player. Report it.the Error
1002The file at src loaded, but it is not a Pixodesk animation document.the src URL
1003The page could not fetch src. The file may be perfect — this is the request failing.the src URL · the fetch error’s message
1004One element’s animation could not be built, so that element stays static; the rest plays.the Error
CodeWhat it meansData
1101An effects bucket does not match the schema, so that effect is ignored or degraded.the problem, with the node’s path
1102Part of the per-instance timeline override could not be applied — most often clock-only keys aimed at a scroll timeline.what could not be applied
1103An SVG tag that can execute or load remote content was dropped from the rendered tree.the tag name
1104The browser will not animate these attributes, so the document fell back to the frame loop.the attribute names
1105A bind-by-id document carries no animator.bindings, so nothing is animated.—
1107A transform part is animated as its own animate channel (animate.translate, …) — the deprecated spelling: several on one node are last-write-wins. Spell it animate.transform (record keyframes), or effects.transformBy for independently-timed parts.the channel(s) and the node
1108A document value did not match the schema and was repaired before playing — replaced by the schema’s default, or dropped when nothing could be kept. The document plays; the value is not what was written.the problem, with its path
1109Two trigger lists react to one event in the same state: playback.stop and playback.pause (playing — the pause wins), or playback.stop and the counterpart of a playback.pause event (paused — the resume wins). The file should name one.the event and the two lists
1110A trigger list names an event it cannot use — playback.start on hoverOut, playback.stop on load or hoverIn, playback.pause or playback.resume on load. The event is ignored.the list and the event
1111The file’s playback.resume list differs from what the player would derive — the counterpart of each playback.pause event plus the playback.start events that do not stop it: it names an event the derivation would not, or leaves out one it would (that pause then waits for playback.start or playback.stop). The list is honoured as written.the list and the event
1112The document has keys or shapes this build’s schema does not know — unrecognized keys above all. It plays, with those parts ignored. If you did not author them, the usual cause is a build that MANGLES PROPERTY NAMES: an animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json, see docs/library/minification.md. Reaches onWarning like every other diagnostic; suppressWarnings silences the console fallback (until 1.15 this report went to the console on its own).the problems (path: finding), the first twelve, then the mangling hint
1106A binding names no element, or names animations that definitions.animations does not have.the binding

The mount: elements the player could not find

Section titled “The mount: elements the player could not find”
CodeWhat it meansData
1201setupAnimationTriggers was given no root element, so no trigger was wired.—
1202The container selector matched nothing, so there is nothing to render into.the selector
1203No container was given and the document’s id matched no element already on the page.—
1206A binding’s selector matched no element, so that binding animates nothing.the selector
1207An attribute write found no element for this id — the rendered SVG was probably replaced.the id or selector
CodeWhat it meansData
1301smoothing needs the player’s own driver, so the browser’s scroll timeline was not used.—
1302The browser refused to build a native scroll timeline; the player measures progress itself.—
1303timeline.subject is not a valid CSS selector, so the SVG itself is measured instead.the subject
1304timeline.subject matched no element, so the SVG itself is measured instead.the subject
1305There is no root element to observe, so a scroll-driven animation stays on its first frame.—
1306timeline.triggers does not apply to a scroll timeline — the scrollbar is the playhead.—
CodeWhat it meansData
1401A playback rate of 0, or a non-finite one, is rejected everywhere — use playback.pause().—
CodeWhat it meansData
1501Props from more than one control mode were set at once. The higher-priority mode wins and the other props are ignored — see the control-mode rule.which props conflicted, and which won
1502Retired (1.24): pause without play could be written with two boolean props; the one playback lever has no invalid position pair. The number stays reserved so older hosts’ switches keep their meaning.the explanation
1503An imperative write call (playback.start(), playback.pause(), playback.playOnce(), …) landed while a declarative driver (the playback or the showAtProgress / showAtTime props) owns playback. The call is applied, and the next prop change reasserts the props.the call
1504A call on a destroyed player — ignored; playback.getState() says destroyed.the call
1505A playback call (playback.start(), playback.stop(), playback.pause(), playback.resume(), playback.playOnce(), playback.setSpeed(), playback.setDurationAtSpeed()) on a scroll- or view-driven player — ignored: the scroll position owns the playhead. Seeks still apply until the next scroll moves it.the call
CodeWhat it meansData
1601The document could not be compiled into animation tracks, so fallback is shown.the Error
1602Rendering the compiled document threw, so fallback is shown.the Error
1603The error boundary caught a render failure below this component.the Error · the React component stack
1604react-native-svg cannot express part of this document, so it was left out or simplified.what was left out