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.

On tap to open notification : System.NullReferenceException

See original GitHub issue

hello , i’ve following all steps implemented in docs All thinks works fine but when application is in background then i’m trying to tap on notification this error threw : (using Android API 21 )

System.NullReferenceException: Object reference not set to an instance of an object.
  at Plugin.FirebasePushNotification.FirebasePushNotificationManager.ProcessIntent (Android.App.Activity activity, Android.Content.Intent intent, System.Boolean enableDelayedResponse) [0x0008e] in C:\Plugins\FirebasePushNotification\src\Plugin.FirebasePushNotification.Android\FirebasePushNotificationManager.cs:106 
  at Notifications.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle)

in MainActivity : try { FirebasePushNotificationManager.ProcessIntent(this, Intent); // <-- here error threw } catch(Exception e) { System.Diagnostics.Debug.WriteLine($"Exception: {e}"); }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ikhaled-alicommented, Mar 14, 2018

Sorry for inconvenience … After two days of trying 😦 the problem was that i forgot to write this line [Application] above MainApplication class for this reason FirebasePushNotificationManager not initialize yet

and thank you again for your interest … GREAT PLUGIN 👍 Big Star for you

1reaction
rdelrosariocommented, Mar 14, 2018

One thing I saw is that you don’t need to call:

            CrossFirebasePushNotification.Current.RegisterForPushNotifications();

Because you are not using on demand registration you are initializing with auto registration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I fix the error: System.NullReferenceException
A NullReferenceException exception is thrown when you try to access a member on a type whose value is null. A NullReferenceException exception ...
Read more >
'System.NullReferenceException' Occur when generating a ...
1 Answer. From my experience, check your notification channel bound status before exit app. If it isn't bound to both tile and toast,...
Read more >
Solved: SourceTree failed to start
App] [OnStartup] - Failed to start. System.NullReferenceException: Object reference not set to an instance of an object. at SourceTree.Notifications.
Read more >
Null Reference Exceptions
A NullReferenceException happens when you try to access a reference variable that isn't referencing any object. If a reference variable isn't referencing an ......
Read more >
object reference not set to an instance of an object.
Context: I'm new to unity and coding. I recently watched a short youtube tutorial on how to set up a "get in and...
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