damus-io / damus

iOS nostr client
GNU General Public License v3.0
1.96k stars 289 forks source link

Bug: Purple renewal notification shows up to an active IAP user #2131

Open danieldaquino opened 2 months ago

danieldaquino commented 2 months ago

What happens Purple renewal notification showed up to one active IAP user.

We have some code conditions to prevent these notifications to show up to IAP users, so it is unclear whether this issue is widespread or an issue to one specific user.

What I expect to happen IAP renews automatically, so no renewal notifications should ever show up

Link to noteID, npub https://damus.io/nevent1qqsdsx8sd5tt3qn2jflt7r775efl4qqlvky7jlkg3fa4afp9rxjvyfqpp4mhxue69uhkummn9ekx7mqpzemhxue69uhkummnw3ezummwwdshguewdaexwqguwaehxw309ahx7um5wghxy6t5vdhkjmn9wgh8xmmrd9skcqghwaehxw309aex2mrp0yhxxatjwfjkuapwveukjwxeywf

Screenshots/video recording N/A

Versions Damus version: Reported version is 1.7.2 (1) Operating system version: Unknown at the moment, probably irrelevant Device: Irrelevant

Steps To Reproduce Steps to reproduce the behavior:

  1. Make purchase via IAP
  2. Wait until it is almost time for renewal
  3. Check if renewal notifications show up

Additional context We had created safeguards in the code to prevent this notification from showing up to IAP users, so this is unexpected. Root cause is still unknown

danieldaquino commented 2 months ago

@alltheseas @jb55, I can confirm this issue is also happening to me.

I did some quick debugging, and I believe it is related to this StackOverflow answer: https://stackoverflow.com/a/75593586

I currently believe this might not impact renewal as renewals are new StoreKit updates and we only need that to be sent once to the server, even if the device "forgets" about them over time.

But I will do more investigation to give us a better idea on whether there is a risk of renewal issues, and how we can further mitigate it.

danieldaquino commented 2 months ago

@jb55, @alltheseas, I confirmed with the user affected that his renewal went through, which is a relief. So this issue is strictly just about the notification showing up when it shouldn't.