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.

"undefined is not an object" ANDROID PROBLEM

See original GitHub issue

Hi, i try to install your component.

On iOS all works fine, but on Android when i call FCM.requestPermissions(); or FCM.getFCMToken().then(token => {}})

Error: undefined is not an object (evaluating 'RNFIRMessaging.requestPermissions')

I have this component installed previously but i dont think its relevant https://github.com/evollu/react-native-firebase-analytics

PD: I have import FCM from 'react-native-fcm';

media-20160919

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
sibeliuscommented, Sep 20, 2016
public class MainApplication extends Application implements ReactApplication {
    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new FIRMessagingPackage()
      );
    }
}
6reactions
sibeliuscommented, Sep 20, 2016

android studio can help fix import stuff

import com.evollu.react.fcm.FIRMessagingPackage;

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: undefined is not an object (evaluating 'item.id ...
I've been experiencing this error. I ...
Read more >
Troubleshooting "undefined is not an object (evaluating ...
The most common problem developers experience with this library is undefined is not an object (evaluating 'RNSound.IsAndroid') .
Read more >
ERROR TypeError: undefined is not an object (evaluating ...
Ever encountered this error → ERROR TypeError: undefined is not an object (evaluating '_this.props.navigation.navigate') whilst working hard on your project?
Read more >
27/3 - TypeError: undefined is not an object (evaluating 'family ...
I keep getting the following error: Oops, try again. It looks like you have an error in your code. Here's the message: TypeError:...
Read more >
How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
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