question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't configure senderID in example app

See original GitHub issue

Bug

Hello. I was struggling configure the pushNotification plugin in my own application so I decided to check if it was working on the example app

Onde I launched it I tried localNotifications, working fine. However I wanted to try a remote notification (what i want to do in my own app as well) and filled in the input to configure my FCM senderID. Seems the app crash at this step when I click the button. I investigated a bit and it seems to come from the onRegister function but I can’t find what cause the problem exactly. I recently updated the package from 3.1.9 to 3.2.1 and since then it doesn’t work anymore. The steps to configure the PushNotifications plugins were working fine in 3.1.9, I could register and receiver notifications as expected

Any idea ?

Environment info

react-native info output:

 System:
    OS: macOS 10.15.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 241.64 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.10.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6308749
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2

Library version: 3.2.1

Steps To Reproduce

  1. git clone https://github.com/zo0r/react-native-push-notification.git
  2. cd example
  3. npm install
  4. npx react-native run-android (I had to refactor the android project to AndroidX in android studio to make it work)
  5. configure the FCM senderID in app

Describe what you expected to happen:

  1. Except the example app not to crash

Reproducible sample code

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15

github_iconTop GitHub Comments

3reactions
Dallas62commented, Apr 23, 2020

Cool ! If something is missing on the README feel free to update 😉 I will check tomorrow

1reaction
riamon-vcommented, Apr 24, 2020

Hi @riamon-v File google-services.json is missing. The Google Services Plugin cannot function without it.

Yeah sorry, I just figured this out

Read more comments on GitHub >

github_iconTop Results From Across the Web

FCM getting MismatchSenderId - Stack Overflow
go to settings->project settings->cloud messaging tab ... I found that the senderId is different from the project number in the FCM console
Read more >
Sender ID procedures | Microsoft Learn
This example configures the Sender ID agent to stamp the messages when the Sender ID status can't be determined due to a temporary...
Read more >
Troubleshoot SMS Sender ID issues in Amazon SNS
If your Sender ID isn't working in specific countries only · Confirm if the country that you're sending messages to supports Sender IDs...
Read more >
Android: Firebase Credentials - OneSignal Documentation
Step 3. Configure Your OneSignal App's Android Platform Settings ... Paste your Firebase Server Key and Firebase Sender ID into the fields and...
Read more >
Firebase Cloud Messaging (FCM) Troubleshooting Guide
Check the Sender ID · Background data needs to be enabled on devices. · Notifications are not enabled for the application itself. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found