martin
martin

Reputation: 1974

React Native Android app crashes when receiving push notifications

I'm having major issues finding out why my Android application suddenly began crashing when it receives push notifications. I'm using react-native-push-notification and the app registers a token all fine, but when a push notification is sent to the phone I get an error saying:

W/ReactNativeJS(  917): Warning: Native component for "SharedElementTransition" does not exist
W/ReactNativeJS(  917): Warning: Native component for "MKTouchable" does not exist
W/ReactNativeJS(  917): Warning: Native component for "MKSpinner" does not exist
W/ReactNativeJS(  917): Warning: Native component for "TickView" does not exist
E/ReactNativeJS(  917): undefined is not an object (evaluating 'RNFSManager.RNFSFileTypeRegular')

This is all very cryptic. The onNotification method has no content so this makes me wonder if there is some other error with the message being sent.

Any suggestions on how this can be solved would be appreciated.

Upvotes: 2

Views: 913

Answers (1)

NSCoder
NSCoder

Reputation: 1678

I was receiving the "MKTouchable" and "TickView" does not exist warnings earlier and was able to solve it by using the following steps:

  1. In my terminal I installed rnpm npm install -g rnpm
  2. rnpm link or if you know specifically which library that's not properly liked like in my case react-native-material-kit, do rnpm link react-native-material-kit
  3. Finally restart your react-native packager using react-native run-ios or react-native run-android for android.

    • Note: I am running on a mac building for iOS, commands may be different on your system.

Upvotes: 1

Related Questions