chatwoot/chatwoot · info

Notification is not supported

Error message

Notification is not supported

What it means

requestPushPermissions warns 'Notification is not supported' when the global Notification API is absent from window (!('Notification' in window)). This is the browser-support guard of the Web Notifications API — Safari on iOS (before 16.4 web-push), some in-app/webview browsers, and legacy browsers expose no Notification constructor. The code also shows a user-facing alert ('This browser does not support desktop notification') and simply never calls onSuccess, so the requesting flow silently stalls rather than erroring.

Source

Thrown at app/javascript/dashboard/helper/pushHelper.js:81

        userVisibleOnly: true,
        applicationServerKey: window.chatwootConfig.vapidPublicKey,
      })
    )
    .then(sendRegistrationToServer)
    .then(() => {
      onSuccess();
    })
    .catch(error => {
      // eslint-disable-next-line no-console
      console.error('Push subscription registration failed:', error);
      useAlert('This browser does not support desktop notification');
    });
};

export const requestPushPermissions = ({ onSuccess }) => {
  if (!('Notification' in window)) {
    // eslint-disable-next-line no-console
    console.warn('Notification is not supported');
    useAlert('This browser does not support desktop notification');
  } else if (Notification.permission === 'granted') {
    registerSubscription(onSuccess);
  } else if (Notification.permission !== 'denied') {
    Notification.requestPermission(permission => {
      if (permission === 'granted') {
        registerSubscription(onSuccess);
      }
    });
  }
};

View on GitHub (pinned to ed230f9bc0)

Solutions

  1. No code fix if you are the end user: open the dashboard in a standalone browser (Chrome/Firefox/Edge, Safari 16.4+ on iOS when installed to home screen).
  2. As a developer, gate the notification UI on the same check so the option is hidden instead of failing on tap.
  3. For webviews, detect the environment and instruct users to re-open in the system browser.
  4. Verify service worker + push subscription are also available before showing the toggle (the API trio Notification + serviceWorker + PushManager must all exist).

Example fix

// before
export const requestPushPermissions = ({ onSuccess }) => {
  if (!('Notification' in window)) {
    console.warn('Notification is not supported');
    useAlert('This browser does not support desktop notification');
  } else if (Notification.permission === 'granted') {
    registerSubscription(onSuccess);
  }
};

// after — hide the affordance at render time instead of failing on click
const pushSupported =
  typeof window !== 'undefined' &&
  'Notification' in window &&
  'serviceWorker' in navigator &&
  'PushManager' in window;

// template: <button v-if="pushSupported" @click="requestPushPermissions(...)">
Defensive patterns

Strategy: type-guard

Type guard

// narrow before touching the Notification API
const notificationsSupported =
  typeof window !== 'undefined' && 'Notification' in window;

if (notificationsSupported && Notification.permission !== 'denied') {
  requestPushPermissions({ onSuccess });
} else {
  showInAppNotice('Desktop notifications need a supported browser (Chrome, Firefox, Edge, Safari 16.4+).');
}

Prevention

When it happens

Trigger: Clicking 'enable notifications' inside an in-app browser (Instagram/Facebook webview), iOS Safari PWA-less page on old iOS, or any embedded webview; registerSubscription/Notification.requestPermission are unreachable because every branch below the guard requires window.Notification.

Common situations: Mobile users opening the dashboard from social apps; enterprise webviews; kiosk browsers; QA on old device farms. Subsequent failures differ: permission 'denied' is silently dropped, and a service-worker/push registration failure logs 'Push subscription registration failed' and alerts.

Related errors


AI-assisted analysis of chatwoot/chatwoot@ed230f9bc0 (2026-08-21). Data as JSON: /api/errors/609bfd5945cb51d4. Report an issue: GitHub.