{"record":{"id":"2627c5df3e320ee2","repo":"toeverything/AFFiNE","slug":"vibrate-not-supported-or-user-not-interacted","errorCode":null,"errorMessage":"vibrate not supported, or user not interacted","messagePattern":"vibrate not supported, or user not interacted","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/frontend/apps/mobile/src/app.tsx","lineNumber":92,"sourceCode":"      });\n\n      url = `${redirectProxy}?${search.toString()}`;\n    }\n    window.open(url, '_blank', 'popup noreferrer noopener');\n  },\n});\nframework.impl(HapticProvider, {\n  impact: options => {\n    return new Promise(resolve => {\n      const style = options?.style ?? 'LIGHT';\n      const pattern = {\n        LIGHT: [10],\n        MEDIUM: [20],\n        HEAVY: [30],\n      }[style];\n      const result = navigator.vibrate?.(pattern);\n      if (!result) {\n        console.warn('vibrate not supported, or user not interacted');\n      }\n      resolve();\n    });\n  },\n  notification: () => Promise.reject('Not supported'),\n  vibrate: () => Promise.reject('Not supported'),\n  selectionStart: () => Promise.reject('Not supported'),\n  selectionChanged: () => Promise.reject('Not supported'),\n  selectionEnd: () => Promise.reject('Not supported'),\n});\nframework.impl(VirtualKeyboardProvider, {\n  onChange: callback => {\n    if (!visualViewport) {\n      console.warn('visualViewport is not supported');\n      return () => {};\n    }\n\n    const listener = () => {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/apps/mobile/src/app.tsx#L74-L110","documentation":"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.","triggerScenarios":"Triggered on mobile when navigator.vibrate returns false because the Vibration API is unsupported or the page has not received a user interaction.","commonSituations":"Occurs on devices/browsers without vibration support or before the first user gesture. Haptic feedback simply does not fire; no action needed.","solutions":["Trigger vibration only after a user gesture.","Check navigator.vibrate support before calling."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}