question

Diyan Iliev avatar image
Diyan Iliev asked

AndroidDevicePushNotificationRegistration responds with EntityProfileVersionMismatch for some users

I am currently implementing player challenging system using push notifications. I have tested it with about 10 people and the notifications work some of the time. However sometimes we get this error when executing AndroidDevicePushNotificationRegistration:

/Client/AndroidDevicePushNotificationRegistration: EntityProfileVersionMismatch

What is this error? I couldn't find any info about it but those who get it can't receive notifications from playfab and their Game Manager page says "Push notifications are not set up."

I'm sure they are successflly logged into playfab and have valid firebase registration token. Sending notifications from firebase console works for them everytime.

I noticed few different behaviors:

  1. It never happens with device id login.
  2. Some people who are not yet registered for notifications (their page still says "Push notifications are not set up.") get the error 100% of the time when they use fb login. That is until they use device id login. That successfully registers them for notifications and after that even fb login works.
  3. Other people, me included, almost never got that error, however I can reproduce it by clearing android app data, force close it, and then when I login with facebook I usually (but not always) get it.

I suspect people with behavior 2 registered their account using facebook and those with 3 registered it with device id, so they effectively skipped the 100% fb error rate.

Our title id is 23AF7. There is this account with id F7D5B5987370FFC7 which is in case 2 - not registered for notifications and always gets the error with facebook login.

Any help finding what's causing it will be greatly appreciated. Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

Sorry for the late response. We created a simple sample to login with Facebook and then register Android Push Notification with Firebase. However, we cannot reproduce your issue. AndroidDevicePushNotificationRegistration returns no error. So, Facebook login should not block the registration.

The "EntityProfileVersionMismatch" error usually identifies a concurrency conflict. When register Push Notification endpoints, we will update these endpoints into player's entity profile. If you are also update this profile (e.g., update avatar, set object etc.) at the same time, you will get this error.

I'd suggest you review the code to make sure you do not perform any other calls when calling Client/AndroidDevicePushNotificationRegistration. Besides, you can add a delay (1~2 seconds) and retry Client/AndroidDevicePushNotificationRegistration again to see if it works.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Diyan Iliev avatar image Diyan Iliev commented ·

Thank you for the response. You were right. I was updating profile stuff with facebook info and registering for push notifications at the same time. Now I made them execute in sequence and everything works perfectly. Thank you!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.