firebaseNet
firebaseNet copied to clipboard
An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll
Throw Exception when :
await client.SendMessageAsync(message);
System.NullReferenceException was unhandled Message: An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll Additional information:
but notification was sended succesfully
:
Hi, can you please provide the code you're using to send the nofitications ?
Happening to me also. Not sure i this helps:
private static async Task<IFCMResponse> SendFCMMessage(string deviceId, Dictionary<string, string> data)
{
FCMClient client = new FCMClient("...snip");
var message = new Message()
{
To = deviceId,
Priority = MessagePriority.high,
TimeToLive = 30,
Data = data
};
return await client.SendMessageAsync(message);
}
Actually, my current NPE is in: Exception thrown: 'System.NullReferenceException' in System.Web.dll but i've seen it say mscorelib also.