toeverything/AFFiNE · error
vibrate not supported, or user not interacted
Error message
vibrate not supported, or user not interacted
What it means
Warning logged by the mobile HapticProvider impact implementation when `navigator.vibrate` is unavailable or returns false — either the browser/platform does not support the Vibration API or the call was rejected because the user has not interacted with the page. The promise still resolves; the haptic feedback is silently skipped.
Source
Thrown at packages/frontend/apps/mobile/src/app.tsx:92
});
url = `${redirectProxy}?${search.toString()}`;
}
window.open(url, '_blank', 'popup noreferrer noopener');
},
});
framework.impl(HapticProvider, {
impact: options => {
return new Promise(resolve => {
const style = options?.style ?? 'LIGHT';
const pattern = {
LIGHT: [10],
MEDIUM: [20],
HEAVY: [30],
}[style];
const result = navigator.vibrate?.(pattern);
if (!result) {
console.warn('vibrate not supported, or user not interacted');
}
resolve();
});
},
notification: () => Promise.reject('Not supported'),
vibrate: () => Promise.reject('Not supported'),
selectionStart: () => Promise.reject('Not supported'),
selectionChanged: () => Promise.reject('Not supported'),
selectionEnd: () => Promise.reject('Not supported'),
});
framework.impl(VirtualKeyboardProvider, {
onChange: callback => {
if (!visualViewport) {
console.warn('visualViewport is not supported');
return () => {};
}
const listener = () => {View on GitHub (pinned to b4c8548c09)
Solutions
- Trigger vibration only after a user gesture.
- Check navigator.vibrate support before calling.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Triggered on mobile when navigator.vibrate returns false because the Vibration API is unsupported or the page has not received a user interaction.
Common situations: Occurs on devices/browsers without vibration support or before the first user gesture. Haptic feedback simply does not fire; no action needed.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/2627c5df3e320ee2.
Report an issue: GitHub.