FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

iOS: System.NullReferenceException on Initialization

Open tobiasschittkowski opened this issue 5 years ago • 6 comments

🐛 Bug Report

{System.NullReferenceException: Object reference not set to an instance of an object. at Plugin.FirebasePushNotification.FirebasePushNotificationManager.Initialize (Foundation.NSDictionary options, System.Boolean autoRegistration) <0x11025af08 + 0x00046> in :0 at MYAPP.Mobile.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x000f0] in

Expected behavior

No Exception

Reproduction steps

Configuration

Version: 3.1.6

Platform:

  • [X] :iphone: iOS
  • [ ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [x] :monkey: Xamarin.Forms

tobiasschittkowski avatar Apr 16 '20 21:04 tobiasschittkowski

I got the same issue.

System.NullReferenceException: Object reference not set to an instance of an object CrossFirebasePushNotification.Current.Token is null.

My iPhone version is 13.4. Who else knows?

leessju avatar Apr 23 '20 02:04 leessju

Same here, cannot launch the app.

iPhone 11 iOS 13.4 Xamarin Forms 4.6.0.616-pre4 FirebasePushNotification 3.1.6

sweldon avatar Apr 23 '20 20:04 sweldon

The problem is in line 141 of FirebasePushNotificationManager.ios.cs : Messaging.SharedInstance is null

tobiasschittkowski avatar May 20 '20 13:05 tobiasschittkowski

... the problem occurs also when I use the sample project from this repo

tobiasschittkowski avatar May 25 '20 13:05 tobiasschittkowski

Same is here @rdelrosario

Zolispurs7 avatar Jun 10 '20 08:06 Zolispurs7

if you run the app on emulator, this might be happen, try to debug over a device.

nmssalman avatar Jun 20 '20 07:06 nmssalman