Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

[Bug]: Unable to close account due to active subscription. #57399

Closed worldomonation closed 2 years ago

worldomonation commented 2 years ago

Quick summary

Encountered this during routine Pre-Release automation testing when attempting to close an account created via the domain-only flow.

Steps to reproduce

prereq. enable store sandbox.

  1. navigate to /start/domain
  2. search for and select a domain.
  3. select to buy only the domain.
  4. fill out details as needed on the checkout screen.
  5. click on My Sites on top left once purchase is complete.
  6. click on Manage domain.
  7. cancel domain.
  8. navigate to /me.
  9. close account.

What you expected to happen

User is taken to /me/account/closed then to another page confirming account closure.

What actually happened

User is shown an error banner while in /me/account/closed that states: Sorry, there was a problem closing your account. Please contact support.

User account cannot be closed.

Context

Automated end to end tests.

Browser

No response

Simple/Atomic

Simple

Other notes

TeamCity run: https://teamcity.a8c.com/buildConfiguration/calypso_Calypso_E2E_Pre_Release/6894490?buildTab=artifacts#%2Fscreenshots;%2Ftrace

User id: 213176213

image

Unsure if related but the following error appears in the browser console:

Uncaught (in promise) Error: Failed to load script "//stats.wp.com/w.js?63"
    S https://wordpress.com/calypso/evergreen/95961.ed848d323199a2c574c6.min.js:1
    s https://wordpress.com/calypso/evergreen/95961.ed848d323199a2c574c6.min.js:1
    T https://wordpress.com/calypso/evergreen/95961.ed848d323199a2c574c6.min.js:1
    ts https://wordpress.com/calypso/evergreen/95961.ed848d323199a2c574c6.min.js:1
    l https://wordpress.com/me/account/close:28
    js https://wordpress.com/calypso/evergreen/95961.ed848d323199a2c574c6.min.js:1
    l https://wordpress.com/me/account/close:28
    js https://wordpress.com/calypso/evergreen/entry-main.9e6eff9f231b77b9b6bf.min.js:2
    l https://wordpress.com/me/account/close:28
    <anonymous> https://wordpress.com/calypso/evergreen/entry-main.9e6eff9f231b77b9b6bf.min.js:2
    O https://wordpress.com/me/account/close:28
    <anonymous> https://wordpress.com/calypso/evergreen/entry-main.9e6eff9f231b77b9b6bf.min.js:2
    a https://wordpress.com/me/account/close:28
    <anonymous> https://wordpress.com/calypso/evergreen/entry-main.9e6eff9f231b77b9b6bf.min.js:2

Reproducibility

Once

Severity

One

Available workarounds?

No but the platform is still usable

Workaround details

Unsure of the true impact - first time this issue has been observed in manual and automated testing.

For the user affected by this issue, they are not able to close their account and must contact support.

donalirl commented 2 years ago

Encountered this as well in #22259024-hc. User with active upgrades tried to close their account, but only got the message to contact support:

Account closure cannot be undone. It will remove your account along with all your sites and all their content. You will not be able to open a new WordPress.com account using the same email address for 30 days. To close this account now, contact our support team.

We have self-serve cancellations so we should direct users to the Purchases page, instead of contacting support.

image

kerrynicl commented 2 years ago

📌 HOUSEKEEPING

📌 SCRUBBING

📌 FINDINGS/SCREENSHOTS/VIDEO Replicated on a test account

Screen Shot 2022-06-02 at 11 57 01 AM

📌 ACTIONS

donalirl commented 2 years ago

34620061-hc another unnecessary support contact

mpkelly commented 2 years ago

Hi @worldomonation, I've just been through your repro steps above, but I could delete the account successfully. I used a brand new user account and only bought a domain which was cancelled before I deleted the account.

image Do you want to retest it and let me know if you still see an issue?

@donalirl I am currently looking at the conditional logic that leads to the "Contact support" button being shown instead of allowing the user to delete the account themselves. I will provide another update for that one.

donalirl commented 2 years ago

@donalirl I am currently looking at the conditional logic that leads to the "Contact support" button being shown instead of allowing the user to delete the account themselves. I will provide another update for that one.

It looks like the cases I reported are for atomic, so you could test closing an account with a Pro plan purchase after making the site atomic. I didn't realize the original issue was for simple sites - I'm happy to open a new issue if needed!

mpkelly commented 2 years ago

@donalirl, yes, this content you posted above (contact support) is shown if the user account is linked to an atomic site.

There are three possible states for this page:

  1. if atomic, then show the "Contact support" button
  2. else, if not atomic but has cancellable purchases (refundable purchase/premium theme), then show the "Manage purchases" button
  3. otherwise, show the "Close account" button

Does that sound wrong to you? I don't know how it should behave in 2022 but I can tell you the logic for atomic sites has been in place since 2018.

donalirl commented 2 years ago

I see. We've had self-serve atomic cancellations for 8 months now: p7DVsv-deH-p2 so it's possible that the Close Account flow wasn't addressed? I think #1 from your list should show the Manage Purchases button, not Contact Support.

Maybe @mmtr has an opinion on this.

mmtr commented 2 years ago

it's possible that the Close Account flow wasn't addressed?

Exactly. This is also similar to https://github.com/Automattic/wp-calypso/issues/55573 where users cannot just delete an Atomic site and are asked to contact support.

I agree with @donalirl's suggestion, and in both cases users should see a "Manage purchases" button like we do on Simple sites so they can cancel their purchases before proceeding:

Close account (all sites are Simple) Delete site (Simple)
Screen Shot 2022-07-11 at 12 53 58 Screen Shot 2022-07-11 at 12 47 09
worldomonation commented 2 years ago

Hi @worldomonation, I've just been through your repro steps above, but I could delete the account successfully. I used a brand new user account and only bought a domain which was cancelled before I deleted the account.

Do you want to retest it and let me know if you still see an issue?

@mpkelly It is no longer a blocker for the context of automated end-to-end tests as we have shifted to using API calls directly to perform these sorts of tasks for now.

If you were not able to reproduce it, then I am happy to close this particular issue as long as others don't want/need to keep this open for other purposes.

donalirl commented 2 years ago

Another case in #13218704-hc of an atomic customer who had to contact us to close their account, instead of self-cancelling.

github-actions[bot] commented 2 years ago

Support References