Useful or not, from you.
react-native-firebase Cannot retrieve FCM token Error: SERVICE_NOT_AVAILABLE


Hi, I am using react-native-firebase for android push notifications. I have an issue with retrieving FCM token.

When I am logging error, it shows me: Error: SERVICE_NOT_AVAILABLE

Snímka obrazovky 2019-06-24 o 19 04 26

react-native-firebase: 5.2.0


classpath ''


implementation project(':react-native-firebase')
implementation ""
implementation ""
implementation ""

react-native info output:

React Native Environment Info: System: OS: macOS 10.14.4 Binaries: Node: 11.5.0 npm: 6.9.0 Watchman: 4.9.0 SDKs: Android SDK: API Levels: 25, 27, 28, 29 Build Tools: 27.0.3, 28.0.3, 29.0.0 System Images: android-26 | Google APIs Intel x86 Atom npmPackages: react: ^16.6.3 => 16.6.3 react-native: ^0.57.8 => 0.57.8 npmGlobalPackages: react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7

That's a useful answer
Without any help

It isn’t documented very well, but I believe this is either a network connectivity failure or a server error of some sort. Recommendation is exponential backoff/retry. The token calls have latency anyway, so your calling code should already be able to handle it async, it just may take longer (or fail completely if there’s a network hiccup)

provisionally closing as all the docs I read indicated this was network related, and not a problem with the module, additionally I’ve been running e2e tests this morning on the module, they call getToken and have been working so I can’t reproduce