Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Remove me from all the subscriptions on this page:" option does not work #953

Open
mariaberlinger opened this issue Jan 6, 2023 · 12 comments

Comments

@mariaberlinger
Copy link

FxA version:

  • 1.249.3;

Prerequisites:

  • Have an fxa account;

Steps to reproduce:

  1. Navigate to https://accounts.stage.mozaws.net/ and login using an existing account;
  2. Click on the "Email communications" option displayed in the navigation menu;
  3. Click on "Sign in" button;
  4. Check the "Remove me from all the subscriptions on this page:" checkbox displayed at the bottom of the page and click the Save Preferences button;

Expected result:

  • The user is unsubscribed from all subscriptions;

Actual result:

  • The user remains subscribed to all the checked options;

Notes:

  • The user can unsubscribe if unchecks manually all the options;
@pmac
Copy link
Member

pmac commented Jan 6, 2023

I can't reproduce this. It's possible for there to be a delay between submitting the form and the data being recorded in our system. Can you try again with the same user and see if perhaps it has worked in the interim? Though I did just test it and I saw results immediately.

@mariaberlinger
Copy link
Author

Hello @pmac
I am still able to reproduce this issue in Train 1.249.3 stage. Attaching screen record.
screenrecord email preferences

@pmac
Copy link
Member

pmac commented Jan 10, 2023

I still can't reproduce. Thanks for the screen grab. @alexgibson can you try to reproduce?

@alexgibson
Copy link
Member

alexgibson commented Jan 11, 2023

I tried this using the STR above and was also unable to reproduce. After creating a new account, and then checking unsubscribe all, my basket user data no longer contains any newsletters, and also records my unsubscribe reason:

{
  "amo_display_name": null,
  "amo_last_login": null,
  "amo_location": null,
  "amo_homepage": null,
  "amo_user": false,
  "amo_id": null,
  "email": "********@mozmail.com",
  "token": "*********",
  "optin": true,
  "id": null,
  "first_name": null,
  "last_name": null,
  "country": null,
  "format": "H",
  "lang": "en",
  "optout": true,
  "reason": "You send too many emails.\n\nOther…\n\ntest",
  "email_id": "*********************************",
  "created_date": "2023-01-11T09:45:08.746478+00:00",
  "last_modified_date": "2023-01-11T09:46:17.967964+00:00",
  "fxa_id": null,
  "fxa_primary_email": null,
  "fxa_create_date": null,
  "fxa_lang": "en-US,en;q=0.5",
  "fxa_service": null,
  "fxa_deleted": false,
  "mofo_relevant": false,
  "newsletters": [],
  "fpn_country": null,
  "fpn_platform": null,
  "relay_country": null,
  "status": "ok"
}

If I close the tab, switch back to accounts.stage.mozaws.net/settings, and click "Email communications" again, then the management page correctly confirms my change:

management-1

I'll continue to look into this and try to figure out any possible additional things we can look for.

@alexgibson
Copy link
Member

alexgibson commented Jan 11, 2023

When I look up @mariaberlinger's basket user data, I can confirm they are still opted in to the newsletters, despite the unsubscribe reason also being recorded. The optout field is also false.

{
  "amo_display_name": null,
  "amo_last_login": null,
  "amo_location": null,
  "amo_homepage": null,
  "amo_user": false,
  "amo_id": null,
  "email": "**********@mozilla.com",
  "token": "***************",
  "optin": true,
  "id": null,
  "first_name": null,
  "last_name": null,
  "country": "us",
  "format": "H",
  "lang": "en",
  "optout": false,
  "reason": "Other…\n\nvdf",
  "email_id": "****************************",
  "created_date": "2023-01-10T09:37:35.775550+00:00",
  "last_modified_date": "2023-01-10T09:39:19.205241+00:00",
  "fxa_id": null,
  "fxa_primary_email": null,
  "fxa_create_date": null,
  "fxa_lang": "en-US,en;q=0.5",
  "fxa_service": null,
  "fxa_deleted": false,
  "mofo_relevant": true,
  "newsletters": [
    "common-voice",
    "firefox-accounts-journey",
    "internet-health-report",
    "knowledge-is-power",
    "mozilla-and-you",
    "mozilla-foundation",
    "take-action-for-the-internet",
    "test-pilot"
  ],
  "fpn_country": null,
  "fpn_platform": null,
  "relay_country": null,
  "status": "ok"
}

@alexgibson
Copy link
Member

alexgibson commented Jan 11, 2023

@pmac I found this error in Sentry, which corresponds to @mariaberlinger's email_id and also appears to have occurred during an unsubscribe task:

https://sentry.io/organizations/mozilla/issues/3857830225/?project=6260602

@pmac
Copy link
Member

pmac commented Jan 11, 2023

Good find! I see Unique ID conflict: 'Contact with primary_email, basket_token, mofo_email_id, or fxa_id already exists' was returned from CTMS. Strange. Maybe @grahamalama can shed some light on what that means exactly. Maybe basket is failing to look up the record somehow but it does exist so trying to create a new record and failing because it does exist. Not sure yet.

@grahamalama
Copy link

@pmac, found that error in this function and its complementary test. Definitely worth investigating. I only see it there in that PATCH method, so it seems like Basket is doing the right thing?

@LuminitaB
Copy link

Hello team,
While running the smoke tests in Production, on Train 1.253.3, we noticed that this issue seems to be fixed. (see the below screenshot).
image
Has anything been done to address it and it should be closed?
Thank you.
CC: @mariaberlinger

@mariaberlinger
Copy link
Author

Hello,
This is still reproducible on Train 1.269.1 stage. The newsletter options are not cleared and sometimes choosing new ones doesn't work.

@alexgibson
Copy link
Member

@mariaberlinger I'm curious if your email address is still encountering the same error we saw above. Could you perhaps ping me on Slack and share your address? That way we can take a look. Thanks

@alexgibson
Copy link
Member

alexgibson commented Oct 17, 2023

I've tried replicating the issue using @mariaberlinger's email, but so far I'm not able to reproduce. I've checked their basket data after each form submission, and things look ok?

All I can think so far is that sometimes there could be a delay when unsubscribing as tasks are queued up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants