Solved

Can two different users subscribe from the same device?

  • 23 July 2021
  • 9 replies
  • 824 views

Badge +4

Hi there.

Can two different users subscribe from the same device?

icon

Best answer by tina 24 July 2021, 01:07

View original

9 replies

Userlevel 5
Badge +10

Hi @sereisoglu!

Since the 2 app user IDs are using the same underlying app store account, RevenueCat will recognize that the receipt is already in use by another subscriber and throw this RECEIPT_ALREADY_IN_USE error

Copying the resolution for visibility:

The user will either need to log in as the App User Id that already owns the receipt or restore purchases to re-sync the receipt with their current account. We recommend checking out the 'Transfer purchases' restore behavior.

Badge +4

Hi @tina!

Thanks for your answer. I checked "Block restores" in RevenueCat settings. But I'm not getting an error in the test environment? Is this normal?

Userlevel 5
Badge +10

Hey @sereisoglu,

Are you restoring with RCAnonymousIDs? Two anonymous IDs should be aliased together.

Badge +4

Hey @tina,

I could not fully understand what you say. Users have both id(assigned by me) and RCAnonymousID.

Userlevel 5
Badge +10

Hi @sereisoglu,

Can you let me know your reproduction steps? e.g:

  1. Configured app with RCAnonymousID
  2. Logged in with custom ID
  3. Purchased
  4. Logged out
  5. Restore

Can you also double check your app settings if you saved your changes when selecting the block restore option?

Badge +4

Hey @tina

  1. ​​​Configured app with RCAnonymousID
  2. First user: log in
  3. First user: purchase
  4. First user: log out
  5. Second user: log in
  6. Second useer: restore (I’m not getting the error message you describe in this step.)

Yes, I checked. "Block restores" is checked.

 

Userlevel 5
Badge +10

Hi @sereisoglu,

I tried reproducing your steps in RevenueCat’s iOS sample app and I wasn’t able to reproduce your issue. I followed the same reproduction steps you described and when I tried restoring as the second logged in user, I received [Purchases] - ERROR: 😿‼️ There is already another active subscriber using the same receipt. 

 

Can you try testing on a fresh sandbox account? You can also try testing with the sample app yourself, you would just need to change the constants in this file.

Badge +2

Hi @tina!

I have a quick question regarding this. If it is not possible for two accounts to buy from the same device, how come I’m able to do the following:

  • Fresh install
  • Anonymous user 
  • Buys a subscription
  • User uninstalls the app
  • User reinstalls the app
  • Anonymous user
  • Buys the same subscription

I get no error at all. 

 

Thank you for your help in understanding this!

Badge +1

hi @tina 
i am using revenue cat in flutter ios for subscription.
i login the user make purchases and logout 
but i get an error

[Purchases] - INFO: ℹ️ Logging out user hchchchc@jgj.com
[Purchases] - INFO: ℹ️ Log out successful
[Purchases] - INFO: ℹ️ Logging out user $RCAnonymousID:7d64edd4aa5d4b97a3b22bf2d23a389b
[Purchases] - ERROR: 😿‼️ LogOut was called but the current user is anonymous.
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: PlatformException(22, LogOut was called but the current user is anonymous., {code: 22, message: LogOut was called but the current user is anonymous., underlyingErrorMessage: , readable_error_code: LOGOUT_CALLED_WITH_ANONYMOUS_USER, readableErrorCode: LOGOUT_CALLED_WITH_ANONYMOUS_USER}, null)

 

and again i login into another user and buy the same subscription it says you already subscribe this subcription

Reply