X_FLAG_TARGETING_INVALID
Means
flag targeting is out of range or malformed
Typical cause
rollout: 0.5 (a fraction read as a percentage means nobody), a rollout outside 0-100, or default: true beside a rollout
Fix
set rollout to a whole percentage 0-100 in defineFlag({ key: '<key>' }), and leave default false when a rollout decides