Skip to main content

This issue happens when i do the following:

  • Create an anonymous account with firebase
  • Login with revenuecat with the newly created firebase account id
  • Purchase a subscription
  • Then upgrade the account from anonymous to email & afterwards logout ( I am logging out revenue cat with Pruchaseses.logOut() as well as fibrease sign out
  • Now when trying to purchase a new anonymous account gets created and the new id is also firstly being set with Puchases.logIn(). 

When trying to purchase a package google play shows me an error dialog with error “PG-GEMF-01”. From the logs I can see the following: 

🀖‌ BillingWrapper purchases failed to update: DebugMessage: Account identifiers don't match the previous subscription.. ErrorCode: DEVELOPER_ERROR.null

🀖‌ PurchasesError(code=PurchaseInvalidError, underlyingErrorMessage=Error updating purchases. DebugMessage: Account identifiers don't match the previous subscription.. ErrorCode: DEVELOPER_ERROR., message='One or more of the arguments provided are invalid.')

 

So the problem seems to be that google play still seems to keep the old user id and refuses the user to make the same subscription twice which makes sense. But how can I catch this error correctly or identify this faulty state beforehand so that I can let the user know that they can just restore the subscription with (even with their new account) and transfer the subscription. Since the error code is only DELVELOPER_ERROR which also can mean another issue. I thought about just checking the underlingyErrorMessage but that seems a bit hacky even though it would work.

same issue