evollu / evollu/react-native-fcm

TypeError: Cannot read property 'createNotificationChannel' of undefined

Open
#1,029 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.7k
Forks
661
PR merge metrics
No merged PRs in 30d

Description

I am working with the example project from this repo. And I have a problem to access FCM.

```
async componentDidMount() {
console.log(FCM) //<-- i added this for debugging.
FCM.createNotificationChannel({
id: 'default',
name: 'Default',
description: 'used for example',
priority: 'high'
})
```

And this is very weird. Because the console.log clearly shows that the FCM object is there.
But then there is this error and execution of the componentDidMount ends.

![image](https://user-images.githubusercontent.com/32771/44510729-bcb3ee00-a6b5-11e8-80ed-a7c7bebd2ee3.png)

"react": "16.4.1",
"react-native": "0.56.0",
"react-native-fcm": "^16.1.0",
"react-native-firebase": "5.0.0-rc0",

Android 8.1 Simulator

The same code is working on ios like a charm. Maybe this is linked to my other issue?
https://github.com/evollu/react-native-fcm/issues/1026

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.