evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

[Android][Background] failed to post notification on channel "null" #1051

Open stsiushkevich opened 5 years ago

stsiushkevich commented 5 years ago

react-native 0.51.0 Android Emulator, Android 8 API 26 targetSdkVersion 17 compileSdkVersion 27 buildToolsVersion 28.0.2

Hello! I have a strange issue when my app is in the background. When I send push notification from Firebase Console (and from my Java server) with attribute custom_notification = {"title": "Test title", "body": "Test Body", "channel": "default"} I receive a system message "failed to post notification on channel "null"...". When my app is in the foreground I don't have such issue - all works pretty well. I checked in Android Studio debugger and discovered that react-native-fcm code isn't trigger at all! On IOS I don't have any problems. How can I fix this issue?

esipavicius commented 5 years ago

With firebase subscribeToTopic notifications its everything working form me. For foreground and background. For push notifications I do not tried yet.