-
Notifications
You must be signed in to change notification settings - Fork 0
Description
ERROR Failed to check permission [TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: useSyncDeviceMedia.ts
12 | const checkPermission = async (setHasPermission: (value: boolean) => void) => {
13 | try {
14 | const isGranted = await MediaModule.checkNotificationListenerPermission();
| ^
15 | setHasPermission(isGranted);
16 | if (isGranted) {
17 | MediaModule.startObserver();
Call Stack
checkPermission (apps/frontend/hooks/useSyncDeviceMedia.ts:14:76)
(apps/frontend/hooks/useSyncDeviceMedia.ts:12:22)
useEffect$argument_0 (apps/frontend/hooks/useSyncDeviceMedia.ts:35:20)
Code: _layout.tsx
26 | }}
27 | >
28 | <Stack
| ^
29 | screenOptions={{
30 | headerShown: false,
31 | contentStyle: { backgroundColor: "transparent" },
Call Stack
RootLayout (apps/frontend/app/_layout.tsx:28:17)
ERROR [Error: Uncaught (in promise, id: 0) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:21:20)
ERROR [Error: Uncaught (in promise, id: 1) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
ERROR [Error: Uncaught (in promise, id: 2) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
ERROR [Error: Uncaught (in promise, id: 3) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
ERROR [Error: Uncaught (in promise, id: 4) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
ERROR [Error: Uncaught (in promise, id: 5) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
ERROR [Error: Uncaught (in promise, id: 6) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)
ERROR [Error: Uncaught (in promise, id: 7) TypeError: Cannot read property 'checkNotificationListenerPermission' of null]
Code: NotificationAccessRequired.tsx
14 | const checkPermission = async () => {
15 | if (!isVisible) return;
16 | const granted = await MediaModule.checkNotificationListenerPermission();
| ^
17 | setIsVisible(!granted);
18 | };
19 |
Call Stack
checkPermission (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:16:76)
useEffect$argument_0 (apps/frontend/components/home/NotificationAccessRequired/NotificationAccessRequired.tsx:18:6)