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

[BUG] Fider activation email not working on Heroku #1007

Closed
duncan-m opened this issue Sep 12, 2021 · 15 comments
Closed

[BUG] Fider activation email not working on Heroku #1007

duncan-m opened this issue Sep 12, 2021 · 15 comments
Labels
type: bug something is broken, we need to fix it

Comments

@duncan-m
Copy link

duncan-m commented Sep 12, 2021

Fider Cloud or Self Hosted
Self Hosted - Heroku

Describe the bug
With a complete new clean install and the correct email settings deployed to a new heroku instance we receive the email but the activation link takes us to 'Page not found'

To Reproduce
Clean install to Heroku and click on activation link in email.

Expected behaviour
Product set-up page

Screenshots
Screenshot 2021-09-12 at 13 42 21

Additional context
Add any other context about the problem here.

@duncan-m duncan-m added the type: bug something is broken, we need to fix it label Sep 12, 2021
@goenning
Copy link
Member

Did you open that email on Microsoft Outlook?

I just deployed Fider to Heroku ( https://example-fider.herokuapp.com ) and it worked fine.

@goenning goenning changed the title [BUG] [BUG] Fider not working on Heroku Sep 15, 2021
@goenning goenning changed the title [BUG] Fider not working on Heroku [BUG] Fider activation email not working on Heroku Sep 15, 2021
@duncan-m
Copy link
Author

duncan-m commented Sep 16, 2021 via email

@jaanttil
Copy link

Thanks, yes apparently it is somehow related to Outlook/email client/email protection we are using. Based on logs it seems that the URL is already consumed before I receive/click the link. If I set incorrect SMTP details, and pick the link directly from logs/db signup succeeds. Gmail works as well...

@indyteo
Copy link
Contributor

indyteo commented Sep 17, 2021

Maybe the solution would be to add an extra step requiring a humain action when visiting the link (clicking on a confirmation button ?) because some protection bots (like with Gmail) fetch the link first to see if nothing is suspicious.

I don't think the User-Agent header could help us to identify if the request was from a bot, otherwise a malicious website would be able to send clean pages to pass protections and malicious ones to clients, so there must be not way to identify those requests in my opinion.

@goenning
Copy link
Member

The other option I had in mind was to add an X minutes grace period, so that when the email client opens the link, it's marked as 'used', but there is still X minutes where the user can still use that link. There are some flaws with this approach, so the user action is probably the best option

@kellystevenstextel
Copy link

I just deploy in Azure and I am running into the same issue as well. I originally opened the email in Outlook but then I sent the verification email to my personal gmail account and both give a 404 error.

@sandro2205
Copy link

Me too. I deploy on Heroku and use Mailgun as smtp server, sending the mail to my gmail account. I receive the email but the activation link takes us to 'Page not found', and the site on the heroku dont work more.

@goenning
Copy link
Member

@sandro2205 can you start the process from scratch to collect some logs?

Add the Environment Variable LOG_LEVEL with value DEBUG to get more details.

Please share all the logs. Thanks

@sandro2205
Copy link

Hi goenning, tks by the answer. Here is the log
heroku_issue.csv.

@goenning
Copy link
Member

@sandro2205 I had a look at your logs and there was nothing suspicious there. I also started the process all over again and after clicking the link, the site was activated as expected.

I need two extra things from you to help me troubleshoot this:

  1. Which commit have you deployed? Is is the latest?
  2. Can you also run these queries and share the result?
select * from tenants
select * from email_verifications

Thanks

@kellystevenstextel
Copy link

kellystevenstextel commented Oct 26, 2021 via email

@sandro2205
Copy link

sandro2205 commented Oct 26, 2021

Hi @goenning.
About the version, i use the v0.19.1, the latest.

Follow the select result.
tenants.csv
mail_verif.csv
.
In time....
Yesterday i try using the docker solution, and the same error occoured. I receive the activation mail, click on the link, and the site dead.

@goenning
Copy link
Member

What value do you have on HOST_DOMAIN env var? I was able to reproduce this issue by using an invalid value on this variable. In you case @sandro2205, the value should be dokauservoice.herokuapp.com

@sandro2205
Copy link

sandro2205 commented Oct 29, 2021

Hi @goenning
You're right! I always typed a different name in the HOST_DOMAIN variable. The correct is type the same name used on app creation form on Heroku.
app
app2

I just set the variable using the same url name in Heroku, and it WORKED!
Thank you very much, and sorry about my mistakes.

@goenning
Copy link
Member

Thanks for confirming. I'll add a WARN log to facilitate troubleshooting in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug something is broken, we need to fix it
Projects
None yet
Development

No branches or pull requests

6 participants