Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/hooks/useNativePlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { getOneSignalAdapter } from '@/services/onesignal'
* exist in native builds (not on vercel/web ci).
*/
let appListenersFailureCaptured = false
let clickListenerFailureCaptured = false

export function useNativePlugins() {
const router = useRouter()
Expand Down Expand Up @@ -88,6 +89,15 @@ export function useNativePlugins() {
)
} catch (e) {
console.warn('failed to init notification click listener:', e)
// launch URLs are suppressed in the SDKs, so without this listener a push tap does nothing
if (!clickListenerFailureCaptured) {
clickListenerFailureCaptured = true
captureMessage('failed to init notification click listener', {
level: 'warning',
tags: { feature: 'onesignal', source: 'native_click_listener' },
extra: { error: e instanceof Error ? e.message : String(e) },
})
}
}

try {
Expand Down
Loading