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

Email not verified by clicking verification link #10149

Closed
robindijkhof opened this issue Mar 15, 2018 · 38 comments
Closed

Email not verified by clicking verification link #10149

robindijkhof opened this issue Mar 15, 2018 · 38 comments

Comments

@robindijkhof
Copy link

Description:

After clicking the verification link the user is redirected to the login page. When the user tries to login it gets a message saying the user is not found or the password is incorrect. When checking as admin, the user is still unverified.

Server Setup Information:

  • Server Setup Information:
  • Version of Rocket.Chat Server: 0.62.2
  • Operating System: Ubuntu 16.04 LTS
  • Deployment Method(snap/docker/tar/etc): Manual install
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • Node Version: 8.9.4

Steps to Reproduce:

  1. Configure SMTP (test it)
  2. Enable verification under Email -> verification
  3. Enable verification under Accounts -> Email verification
  4. Create a user.
  5. Click the verification link in the email.

Expected behavior:

Email should be verified

Actual behavior:

Email isn't verified

Relevant logs:

[34mI20180315-11:14:42.564(0) �[34mMeteor ➔ publish null -> userId: null , arguments: {} �[34mI20180315-11:14:42.570(0) Exception while invoking method 'verifyEmail' MongoError: The positional operator did not find the match needed from the query. Unexpanded update: emails.$.verified at Function.MongoError.create (/home/otm-admin/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11) at toError (/home/otm-admin/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22) at /home/otm-admin/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1059:67 at /home/otm-admin/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickDomainCallback (internal/process/next_tick.js:218:9) �[34mI20180315-11:14:42.570(0) �[34mMeteor ➔ publish roles -> userId: null , arguments: {} �[34mI20180315-11:14:42.571(0) �[34mMeteor ➔ publish stream-importers -> userId: null , arguments: { '0': 'progress', '1': { useCollection: false, args: [] } } �[34mI20180315-11:14:42.572(0) �[34mMeteor ➔ publish meteor_autoupdate_clientVersions -> userId: null , arguments: {} �[34mI20180315-11:14:42.575(0) �[34mMeteor ➔ publish stream-notify-all -> userId: null , arguments: { '0': 'updateCustomSound', '1': { useCollection: false, args: [] } } �[34mI20180315-11:14:42.576(0) �[34mMeteor ➔ publish stream-notify-all -> userId: null , arguments: { '0': 'deleteCustomSound', '1': { useCollection: false, args: [] } } �[34mI20180315-11:14:42.577(0) �[34mMeteor ➔ publish activeUsers -> userId: null , arguments: {} �[34mI20180315-11:14:42.578(0) �[34mMeteor ➔ publish userData -> userId: null , arguments: {} �[34mI20180315-11:14:42.579(0) �[34mMeteor ➔ publish stream-notify-all -> userId: null , arguments: { '0': 'public-settings-changed', '1': { useCollection: false, args: [] } } �[34mI20180315-11:14:42.587(0) �[34mMeteor ➔ method autoTranslate.getSupportedLanguages -> userId: null , arguments: { '0': 'en' } �[34mI20180315-11:14:42.590(0) �[34mMeteor ➔ method listCustomSounds -> userId: null , arguments: {} �[34mI20180315-11:14:42.591(0) �[34mMeteor ➔ method listEmojiCustom -> userId: null , arguments: {} �[34mI20180315-11:14:42.594(0) �[34mMeteor ➔ method apps/is-enabled -> userId: null , arguments: {} �[34mI20180315-11:14:42.595(0) �[34mMeteor ➔ method permissions/get -> userId: null , arguments: {} �[34mI20180315-11:14:42.597(0) �[34mMeteor ➔ method public-settings/get -> userId: null , arguments: {} �[34mI20180315-11:14:42.622(0) �[34mMeteor ➔ method UserPresence:online -> userId: null , arguments: { '0': null } �[34mI20180315-11:14:42.624(0) �[34mMeteor ➔ method loadLocale -> userId: null , arguments: { '0': 'nl' } �[34mI20180315-11:14:42.852(0) �[34mMeteor ➔ method permissions/get -> userId: null , arguments: { '0': 2018-03-15T11:14:42.650Z } �[34mI20180315-11:14:42.973(0) �[34mMeteor ➔ method public-settings/get -> userId: null , arguments: { '0': 2018-03-15T11:14:42.818Z }

@robindijkhof
Copy link
Author

Workaround for now is to fill in the password forgotten form.

@tranduyhung
Copy link

I just installed Rocket.chat via Docker and got the same issue.

Rocket.Chat Version: 0.62.2
NodeJS Version: 8.9.3 - x64
Platform: linux
Process Port: 3001
ReplicaSet OpLog: Disabled
Commit Hash: 07f0e3f77c
Commit Branch: HEAD     

@lightweight
Copy link

I'm seeing this, too, after upgrading to 0.62.2 from 0.61.4 - note, on mongo pinned to 3.4 because a previous upgrade of all my Docker containers (using docker-compose) that moved mongo beyond 3.4 failed...

@sergeydeg
Copy link

Me to.
Rct: 0.62.2
Node: v8.9.3
MongoDB: 3.6

@HammyHavoc
Copy link
Contributor

Yep, seeing this too.

@AntMarras
Copy link

me too
rocket chat version: 0.62.2

@PavelZhe
Copy link

me too
Rocket 0.62.2
Node 8.9.3
MongoDB 2.6.12
CentOS 7

@theorenck
Copy link
Contributor

Hi @robindijkhof, thanks let us know of the problem.

@sampaiodiego sampaiodiego added this to Desireable in 0.64.0 via automation Apr 9, 2018
@sampaiodiego sampaiodiego moved this from Desireable to Backlog in 0.64.0 Apr 10, 2018
@Hudell Hudell self-assigned this Apr 10, 2018
@Hudell Hudell moved this from Backlog to In progress in 0.64.0 Apr 10, 2018
@Hudell
Copy link
Contributor

Hudell commented Apr 11, 2018

Anybody still seeing this problem on version 0.63? If so, please share any more relevant logs you may have.

@geraldinkorea
Copy link

I have the same issue please let me know what logs you would like to see.

@daradurvs
Copy link

I have the same issue on v.0.63.1
SMTP is configured and tests email is sent as expected.
But I got an error Error trying to send email: Mail command failed by clicking "Resend verification email" in "My Account" tab.
There is no warning in "View Logs".

@geraldinkorea
Copy link

geraldinkorea commented Apr 12, 2018 via email

@hdaws
Copy link

hdaws commented Apr 13, 2018

@Hudell Same issue here on 63.1

If there's further logs you need than what's in the rocket chat main log, let me know and I will get them.

(I just installed. so you'll have to tell me what logs they are because I really dont know my way around this system yet)

@Hudell Hudell moved this from In progress to Review/QA in 0.64.0 Apr 13, 2018
@karlprieb karlprieb moved this from Review/QA to Ready to merge in 0.64.0 Apr 18, 2018
@theorenck theorenck modified the milestones: 0.64.0, 0.65.0 Apr 19, 2018
@theorenck theorenck removed this from Ready to merge in 0.64.0 Apr 19, 2018
@theorenck theorenck added this to Desirable in May/2018 via automation Apr 20, 2018
@JonCup
Copy link

JonCup commented May 7, 2018

Same here. I get an error when I click on the link in the email.

@tosione
Copy link

tosione commented May 18, 2018

Still happening in v0.64.1. The symptoms are like #10548: you get error 500 when clicking verify link, emails remains unverified, but the error message is the same.

@rodrigok rodrigok added this to Desireable in June/2018 via automation May 21, 2018
@rodrigok rodrigok moved this from Desireable to Backlog in June/2018 May 21, 2018
@rodrigok rodrigok removed this from Backlog in May/2018 May 21, 2018
@rodrigok rodrigok modified the milestones: 0.65.0, 0.66.0 May 22, 2018
@tarator
Copy link

tarator commented Jun 13, 2018

Same here on a fresh install (docker) Version 0.65.1

rocket_1  | Exception while invoking method 'verifyEmail' MongoError: The positional operator did not find the match needed from the query.
rocket_1  |     at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
rocket_1  |     at toError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22)
rocket_1  |     at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1059:67
rocket_1  |     at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
rocket_1  |     at _combinedTickCallback (internal/process/next_tick.js:131:7)
rocket_1  |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)

@tarator
Copy link

tarator commented Jun 14, 2018

Maybe there is something wrong with the link in the mail itself. My mailserver is also complaining, that there is no From-Header set in the mail (other notification mails from rocketchat work correctly (see Header X-Amavis-Alert.

Anonymised RAW-Email sent by rocketchat instance:

Return-Path: <>
Delivered-To: georg@example.com
Received: from somesome.myserver.com
        by somesome.myserver.com (Dovecot) with LMTP id xxxsdfwhoh23hca
        for <georg@example.com>; Wed, 13 Jun 2018 20:07:34 +0200
X-Quarantine-ID: <46gserhsvjl7895>
Authentication-Results: somesome.myserver.com; dkim=permerror (bad message/signature format)
X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "From"
Content-Type: multipart/alternative;
boundary="--_NmP-ed7fe0d1de64cadd-Part_1"
To: georg@example.com
Subject: How to verify email address on Rocket.Chat
Message-ID: <93102c9c-xxxx-xxx-0bb2-asfjwhjkhgh2g2hfph2>
Date: Wed, 13 Jun 2018 18:07:34 +0000
MIME-Version: 1.0

----_NmP-ed7fe0d1de64cadd-Part_1
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello,

To verify your account email, simply click the link below.

https://rocket.myserver.com/#/verify-email/xxxxxxxsnxAASojqiHiUX=
BznUZZxxxxxx

Thanks.

----_NmP-ed7fe0d1de64cadd-Part_1
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

Hello,

To verify your account email, simply click the link below.

https://rocket.myserver.com/login/#/verify-email/xxxxxxxsnxAASoj=
qiHiUXBznUZZxxxxxx

Thanks.

----_NmP-ed7fe0d1de64cadd-Part_1--

Maybe this helps.

@tarator
Copy link

tarator commented Jun 14, 2018

I think I found the problem: It's the = sign in the verification link.
Some mail-clients use this sign as a line-break.

They transform the link which should be
https://rocket.myserver.com/login/#/verify-email/xxxxxxxsnxAASoj=qiHiUXBznUZZxxxxxx

into the following link:

https://rocket.myserver.com/login/#/verify-email/xxxxxxxsnxAASojqiHiUXBznUZZxxxxxx

which breaks it.

I'm using the default templates for the verification mail. Tried it in Rainloop and Thunderbird. Both do strange things to the verification-link.

@Hudell
Copy link
Contributor

Hudell commented Jun 14, 2018

Hey @tarator, Glad you figured that out! It doesn't seem to be the same bug that the others are having, but I'll look into it.

@ggazzo ggazzo moved this from Backlog to Blocked in June/2018 Jun 15, 2018
@ronnicek
Copy link

ronnicek commented Jul 4, 2018

Have same problem here. Email is delivered ok, but after click on link RocketChat shows Errror 500 and email is not verified.

Rocketchat version: 0.66.0 (docker image rocketchat/rocket.chat:latest)

rocketchat_1  | Exception while invoking method 'verifyEmail' MongoError: The positional operator did not find the match needed from the query.
rocketchat_1  |     at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
rocketchat_1  |     at toError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22)
rocketchat_1  |     at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1059:67
rocketchat_1  |     at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
rocketchat_1  |     at _combinedTickCallback (internal/process/next_tick.js:131:7)
rocketchat_1  |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)

@PhilGPk
Copy link

PhilGPk commented Jul 6, 2018

What's the most useful thing end-users can do to help fix this? It's a show-stopper for a potential deployment for me.

@Hudell
Copy link
Contributor

Hudell commented Jul 6, 2018

If you click on the same link multiple times, do you get the same error again?

@tarator
Copy link

tarator commented Jul 8, 2018

I just tried it again with the latest version 0.66.1. E-Mail verification now works on my instance of Rocketchat.
Can anybody else confirm this?

This is the mail-template I'm using:

Dear [name],

Please <a href="[Verification_Url]">click here</a> to verify your email for [Site_URL]

Greetings.

@rzemykers
Copy link

YES! It works also in my instance. I just upgraded it to 0.66.2

@tarator
Copy link

tarator commented Jul 8, 2018

I'm curious what fixed that bug...

@ronnicek
Copy link

ronnicek commented Jul 8, 2018

Upgraded too to 0.66.2 and its working (but had to use :latest from docker hub, because 0.66.1 nor 0.66.2 is not there yet..)

@pcmerc
Copy link

pcmerc commented Jul 10, 2018

Upgraded from 0.66.0 > 0.66.3. Email verification is now working as expected.

@Hudell
Copy link
Contributor

Hudell commented Jul 10, 2018

Looks like it was fixed by #11335.
Did all of you had OpLog disabled?

@pcmerc
Copy link

pcmerc commented Jul 10, 2018

I do have OpLog disabled currently

@PhilGPk
Copy link

PhilGPk commented Jul 11, 2018

Confirmed, email verification now works as expected in 0.66.3.
I have OpLog disabled.

@Hudell Hudell removed this from Blocked in June/2018 Jul 11, 2018
@Hudell Hudell removed this from the 0.66.0 milestone Jul 11, 2018
@Hudell
Copy link
Contributor

Hudell commented Jul 12, 2018

I'll close this issue then, as #11335 fixed the issue. If anybody still runs into it, just leave a comment and I'll reopen it.

@Hudell Hudell closed this as completed Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests