blurts-server
blurts-server copied to clipboard
Refreshing the unsubscribe page triggers a TypeError
[Affected versions]:
- latest Nightly 63.0a1
- DevEdition 63.0b2
- Release 62.0
[Affected platforms]:
- Windows 10 x64
- macOS 10.13
- Ubuntu 16.04 x64
[Steps to reproduce]:
- Launch Firefox.
- Navigate to https://fx-breach-alerts.herokuapp.com/
- Click on the "Subscribe" button, provide a valid email address and click "Submit".
- Check the confirmation mail sent in inbox, and click on the "Unsubscribe" link.
- Click again the "Unsubscribe" button from the webpage.
- Refresh the website.
- Click "Resend" on the warning dialog.
[Expected result]:
- No error is triggered on the https://fx-breach-alerts.herokuapp.com/user/unsubscribe page.
[Actual result]:
- The following error is triggered on the webpage:
TypeError: Cannot read property 'verification_token' of undefined at Object.removeSubscriberByToken (/app/db/DB.js:146:42)
[Additional notes]:
- it seems that after step 7, the webpage redirects to the same error string if the "Unsubscribe" button is clicked again.
- see the attached screenshot below:

The error is no longer reproducible on Windows 10 x64, Ubuntu 16.04 x64 and macOS 10.13, but it seems that after refresh the user is redirected to the homepage. I've filed #355 for that issue.
Closing this as verified fixed; tested on 62.0 (20180830143136).