greensock/GSAP · error
Not tracking ${property} velocity.
Error message
Not tracking ${property} velocity. What it means
VelocityTracker.get(property) looks up this._props[property]; if no tracker was added for that property it warns "Not tracking <property> velocity." and then dereferences pt, which typically throws a TypeError immediately after. It means velocity is only available for properties explicitly tracked via VelocityTracker.track() or gsap's trackVelocity option.
Source
Thrown at src/utils/VelocityTracker.js:82
}
export class VelocityTracker {
constructor(target, property) {
_coreInitted || _initCore();
this.target = _toArray(target)[0];
_lookup[_getID(this.target)] = this;
this._props = {};
property && this.add(property);
}
static register(core) {
gsap = core;
_initCore();
}
get(property, skipRecentTick) {
let pt = this._props[property] || console.warn("Not tracking " + property + " velocity."),
val, dif, rotationCap;
val = parseFloat(skipRecentTick ? pt.v1 : pt.g(pt.t, pt.p));
dif = (val - parseFloat(pt.v2));
rotationCap = pt.rCap;
if (rotationCap) { //rotational values need special interpretation so that if, for example, they go from 179 to -178 degrees it is interpreted as a change of 3 instead of -357.
dif = dif % rotationCap;
if (dif !== dif % (rotationCap / 2)) {
dif = (dif < 0) ? dif + rotationCap : dif - rotationCap;
}
}
return _round(dif / ((skipRecentTick ? pt.t1 : _ticker.time) - pt.t2));
}
getAll() {
let result = {},
props = this._props,
p;
for (p in props) {View on GitHub (pinned to 13e2b79054)
Solutions
- Track the property first: VelocityTracker.track(target, 'x', 'y') (or via gsap tween's trackVelocity / inertia)
- Use VelocityTracker.getByTarget(target).get(property) only for names passed to track()
- Query the correct property name (e.g., 'rotation' vs 'rotate')
- Initialize tracking early so at least one tick has occurred before reading values
Example fix
// before
const tracker = new VelocityTracker(el);
tracker.get('x'); // never tracked
// after
VelocityTracker.track(el, 'x', 'y');
const tracker = VelocityTracker.getByTarget(el);
const vx = tracker.get('x'); Defensive patterns
Strategy: type-guard
Validate before calling
import { VelocityTracker } from 'gsap/VelocityTracker';
function ensureTracked(target, props) {
const tracker = VelocityTracker.getByTarget(target) || VelocityTracker.track(target, ...props);
return tracker;
}
const tracker = ensureTracked(el, ['x', 'y']);
const vx = tracker.get('x'); Type guard
function isTracked(tracker, prop) { return !!(tracker && tracker._props && tracker._props[prop]); } Try / catch
try {
const v = tracker.get('x');
} catch (e) {
VelocityTracker.track(el, 'x');
const v = 0; // no velocity yet on first tick
} Prevention
- Always call VelocityTracker.track(target, ...props) before reading velocity
- Use identical property names in track() and get()
- Read velocity only after at least one ticker tick
- Prefer VelocityTracker.getByTarget to reuse existing trackers
When it happens
Trigger: Calling tracker.get('rotation') or getVelocity for a property never tracked — creating VelocityTracker(target) without listing properties, not passing trackVelocity/--tracking in a tween, or querying before the first tween tick.
Common situations: Reading velocity in InertiaPlugin throwProps configs for props never tracked, assuming all tweened properties are tracked automatically, typos between tracked property name and queried name, or querying 'x' when only 'y' was tracked.
Related errors
- GSDevTools error: invalid animation.
- Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)
- Please gsap.registerPlugin(CustomEase, CustomBounce)
- Please gsap.registerPlugin(CustomEase)
- Please gsap.registerPlugin(CustomEase, CustomWiggle)
AI-assisted analysis of greensock/GSAP@13e2b79054 (2026-08-29).
Data as JSON: /api/errors/21a8a9e9996d94d7.
Report an issue: GitHub.