I'm working on a React Native project and i need to set up push notifications on iOS and Android ends using react-native-fcm,
When i try to get a token it return null in Android and the following error on iOS:
Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'requestPermissions' of undefined
TypeError: Cannot read property 'requestPermissions' of undefined
at Object.FCM.requestPermissions (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:143309:27)
at PushNotificationController.componentDidMount$ (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:143144:58)
at tryCatch (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16751:19)
at Generator.invoke [as _invoke] (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16924:24)
at Generator.prototype.(anonymous function) [as next] (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16794:23)
at tryCatch (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16751:19)
at invoke (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16827:22)
at blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16855:13
at tryCallTwo (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:3524:7)
at doResolve (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:3688:15)
Thanks for responding and i'm available for further information.
Related
i'm in trouble to connect Firebase to next 13, already search for it on internet and a lot of people had similar problems
Error:
[debug] [2023-02-08T18:54:22.084Z] TypeError: Cannot read properties of null (reading 'toString')
at ɵcodegenFunctionsDirectory (C:\Users\idieg\AppData\Roaming\npm\node_modules\firebase-tools\lib\frameworks\next\index.js:222:18)
at async prepareFrameworks (C:\Users\idieg\AppData\Roaming\npm\node_modules\firebase-tools\lib\frameworks\index.js:306:84)
at async deploy (C:\Users\idieg\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\index.js:53:13)
[error]
[error] Error: An unexpected error has occurred.
also like to clarify that i already can emulate this without bugs and also ran the firebase experiments:enable webframeworks but i need to deploy it.
I was working with Firebase with Angular framework in a project. I was using Firebase for sending push notifications. I followed this medium article and did like this. Everything was perfect up to allowing notification alerts. But after that token didn't print on the console and this error popped up.
`
notifications.component.ts:169 FirebaseError: Installations: Create Installation request failed with error "403 PERMISSION_DENIED: Requests to this API firebaseinstallations.googleapis.com method google.firebase.installations.v1.FirebaseInstallationsService.CreateInstallation are blocked." (installations/request-failed).
at index.esm2017.js:94:26
at Generator.next (<anonymous>)
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at _next (asyncToGenerator.js:25:1)
at ZoneDelegate.invoke (zone.js:372:1)
at Object.onInvoke (core.mjs:25488:1)
at ZoneDelegate.invoke (zone.js:371:1)
at Zone.run (zone.js:134:1)
at zone.js:1276:1
at ZoneDelegate.invokeTask (zone.js:406:1)
`
And I found this StackOverflow answer as well and I did the same as that suggested. But still it gives the error.
Can someone help me with this?
When I run yarn dev I get the following error
(node:171412) UnhandledPromiseRejectionWarning: TypeError: Cannot set
property 'status' of undefined at
xxx\my-next-app\node_modules\next\dist\server\hot-reloader.js:16:94 at
async Promise.all (index 0) at async DynamicEntryPlugin.config.entry
(xxx\my-next-app\node_modules\next\dist\server\hot-reloader.js:15:96)
(Use node --trace-warnings ... to show where the warning was
created) (node:171412) UnhandledPromiseRejectionWarning: Unhandled
promise rejection. This error originated either by throwing inside of
an async function without a catch block, or by rejecting a promise
which was not handled with .catch(). To terminate the node process on
unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
(rejection id: 32)
I have been unable to figure out the issue
My next version is ^10.0.4
I'm unable to run my pub-sub triggers in local Cloud Functions Shell. I've created Cloud Functions in the following way:
export const sendNotifications = functions.pubsub.schedule('0 10 * * *').timeZone('Asia/Kolkata').onRun(async (context) => {
console.log('running sendNotificationForActivities');
await sendMessages();
return 0;
}
As mentioned here, I try to run firebase functions:shell from my system followed by:
> sendNotifications({data: new Buffer('{"hello":"world"}'), attributes: {foo: 'bar'}})
or
> sendNotifications({})
and other variants. Following is the error stack trace I received:
firebase > sendNotificationForActivities({})
'Successfully invoked function.'
firebase > ⚠ TypeError: Cannot read property 'params' of undefined
at cloudFunction (/Users/mayurdhurpate/code/pruoo_app/backend_admin/functions/node_modules/firebase-functions/lib/cloud-functions.js:109:38)
at Run (/Users/mayurdhurpate/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:458:20)
at /Users/mayurdhurpate/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:442:19
at Generator.next (<anonymous>)
at /Users/mayurdhurpate/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:7:71
at new Promise (<anonymous>)
at __awaiter (/Users/mayurdhurpate/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:3:12)
at Run (/Users/mayurdhurpate/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:435:12)
at /Users/mayurdhurpate/.npm-global/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:457:15
at Generator.next (<anonymous>)
⚠ Your function was killed because it raised an unhandled error.
I think I might be missing a required params field but I couldn't find the right way to enter the parameters. I'm using firebase-tools#7.1.1 on MacOS.
I have the same error.
The error is located in cloud-functions.js:117:28.
He is trying to access a key of context even if context does not exist.
I updated to the newest version but the error still persists.
As workaround I added this code at line 89 in cloud-functions.js: context = context || {};
This solves the error and I can use the firebase shell.
I hope this nasty hack helps.
Until Google fixes their code or updates the documentation.
Dominik
We are observing a crash in VMWare Clarity while programmatically accessing a page in pagination grid and it crashes with below Stack.
ERROR TypeError: Cannot read property 'get' of undefined
at ClrDatagridRow.get [as _view] (clr-angular.js:12106) at clr-angular.js:12531
at Array.forEach (<anonymous>)
at QueryList.push../node_modules/#angular/core/fesm5/core.js.QueryList.forEach (core.js:17092)
at clr-angular.js:12530
at SafeSubscriber.schedulerFn [as _next] (core.js:12621)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubs