undefined is not an object (evaluating 'FIRAnalytics.setEnabled)
See original GitHub issueusing react-native-firbase-analytics 1.0.6
using react-native 0.32.0
import React, {
Component,
PropTypes,
} from 'react';
import {
View,
StyleSheet,
ScrollView,
Alert,
AlertIOS,
InteractionManager,
} from 'react-native';
import Analytics from 'react-native-firebase-analytics';
import Dialog from 'react-native-dialog';
// ...
export default class CartPage extends Component {
constructor(props) {
super(props);
this.state = {
renderPlaceholderOnly: false,
};
props.dispatch(fetchCartInfo(props.serviceType));
props.dispatch(fetchMyCouponCount());
}
componentWillMount() {
console.log(Analytics.setEnabled);
Analytics.setEnabled(false);
}
I trying run this Component. occurring error undefined is not an object (evaluating 'FIRAnalytics.setEnabled)
but console is that.
02-04 19:52:28.531 2896 2959 I ReactNativeJS: [Function: setEnabled]
02-04 19:52:29.127 2896 2959 E ReactNativeJS: undefined is not an object (evaluating 'FIRAnalytics.setEnabled')
Naturally, I included google-service.json file as well. and already run rnpm link
what the hell?
I think NativeModules.RNFIRAnalytics
is undefined.
What should I check?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
iOS undefined is not an object (evaluating 'FirebaseAnalyitcs ...
In the simulator I see the error: Then I get undefined is not an object (evaluating 'FirebaseAnalyitcs.setCurrentScreen');.
Read more >undefined is not an object (evaluating 'auth.tenanatId') in ...
i am making a authentication app in react native with firebase and i get this error in the sign up process called undefined...
Read more >User | JavaScript SDK | Firebase JavaScript API reference
MultiFactorUser object corresponding to the current user. ... Thrown if you have not enabled the phone authentication provider in the Firebase Console.
Read more >Error with all external API calls on IOS build: TypeError
All previous builds were working but now not even when I remove ... TypeError: undefined is not an object (evaluating 'environment.match').
Read more >react-native-firebase-analytics - Bountysource
I suggest something like setEnabled . The default would be not to log, ... TypeError: undefined is not an object (evaluating 'FIRAnalytics.setUserId') $...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think the rnpm link not correctly. If you are using the latest react native, I am not sure, around >= 0.39. You should add FIRAnalyticsPackage in MainApplication.java rather than MainActivity.java.
Same issue in Ios