iOS. Firebase.CloudMessaging. Could not unsubscribe from push notification

Hi. I have problem with push notification on iOS. I tried to do all steps according documentation

I'm getting new token on staring app, and tried to remove it on signout like this
await Task.Run(() => InstanceId.SharedInstance.DeleteId((error) => { Mvx.Trace(error?.DebugDescription); }));

But anyway, I get pushes in signed outed app. After second sign in I get two pushes (amount of pushes equals to amount of sign ins).
A we can see we get push to old tokens too.
Xamarin.Firebase.iOS.CloudMessaging 3.1.2 Xamarin.Firebase.iOS.InstanceID 3.2.1 Xamarin.Firebase.iOS.Core 5.1.3

Subscribe user for topic request
POST request body { "to" : "/topics/test", "registration_tokens" : ["..user_registration_token.."] }

server send periodically notifications to the topics
Send notification for topic subscribers request
POST request body { "message": { "topic":"test", "notification": { "title":"test-6", "body":"test-6" } } }

when user logout from application, server perform unsubscribing user token from topic
POST { "to": "/topics/test", "registration_tokens" : ["..user_registration_token.."] }

But, when user login again and request brand new token, device still received push notifications witch are sending to the old token, and if we send notifications by the topic such users received dublicate push notifications.

If we try get information for old token from api method

we get response
<HTML> <HEAD> <TITLE>Internal Server Error</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Internal Server Error</H1> <H2>Error 500</H2> </BODY> </HTML>

Sign In or Register to comment.