RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
39.62k stars 10.15k forks source link

Resend Verification Email from Account is not working #7577

Open iternovskyi opened 7 years ago

iternovskyi commented 7 years ago

Description:

Server Setup Information:

Steps to Reproduce:

  1. wget https://rocket.chat/releases/0.57.1/download -o rocket.chat-0.57.1.tgz and unpack
  2. cd bundle/programs/server/ && npm install
  3. Set ROOT_URL, MONGO_URL, PORT and MAIL_URL
  4. Create Admin user, configure SMTP ( Test email received )
  5. Create user account, "Welcome email received"
  6. Go to user's account settings -> Profile -> Change email -> Save
  7. Go to user's account settings -> Profile -> Change email -> Resend verification email -> nothing happens

In system logs have found anything. Checked Browser's Debug Console ( FF 54.0.1 and Chrome 59.0.3071.115 ):

b4ceeb4….js?meteor_js_resource=true:308 Uncaught TypeError: o.emails[0].address is not a function at Object.click #resend-verification-email (b4ceeb4….js?meteor_js_resource=true:308) at b4ceeb4….js?meteor_js_resource=true:140 at Function.e._withTemplateInstanceFunc (b4ceeb4….js?meteor_js_resource=true:140) at f.View. (b4ceeb4….js?meteor_js_resource=true:140) at b4ceeb4….js?meteor_js_resource=true:139 at Object.f._withCurrentView (b4ceeb4….js?meteor_js_resource=true:139) at f._DOMRange. (b4ceeb4….js?meteor_js_resource=true:139) at HTMLButtonElement. (b4ceeb4….js?meteor_js_resource=true:139) at HTMLDivElement.dispatch (b4ceeb4….js?meteor_js_resource=true:53) at HTMLDivElement.h.handle (b4ceeb4….js?meteor_js_resource=true:53) click #resend-verification-email @ b4ceeb4….js?meteor_js_resource=true:308 (anonymous) @ b4ceeb4….js?meteor_js_resource=true:140 e._withTemplateInstanceFunc @ b4ceeb4….js?meteor_js_resource=true:140 (anonymous) @ b4ceeb4….js?meteor_js_resource=true:140 (anonymous) @ b4ceeb4….js?meteor_js_resource=true:139 f._withCurrentView @ b4ceeb4….js?meteor_js_resource=true:139 (anonymous) @ b4ceeb4….js?meteor_js_resource=true:139 (anonymous) @ b4ceeb4….js?meteor_js_resource=true:139 dispatch @ b4ceeb4….js?meteor_js_resource=true:53 h.handle @ b4ceeb4….js?meteor_js_resource=true:53 ============================================================== meteor-dev-bundle@0.0.0 /home/iov/bundle/programs/server ├── amdefine@1.0.1 ├── ansi-regex@0.2.1 ├── ansi-styles@1.1.0 ├── asap@2.0.5 ├── chalk@0.5.1 ├── eachline@2.3.3 ├── escape-string-regexp@1.0.5 ├── fibers@1.0.15 ├── has-ansi@0.1.0 ├── meteor-promise@0.8.0 ├─┬ node-gyp@3.6.0 │ ├─┬ fstream@1.0.11 │ │ └── inherits@2.0.3 │ ├─┬ glob@7.1.2 │ │ ├── fs.realpath@1.0.0 │ │ ├─┬ inflight@1.0.6 │ │ │ └── wrappy@1.0.2 │ │ ├── inherits@2.0.3 │ │ ├─┬ once@1.4.0 │ │ │ └── wrappy@1.0.2 │ │ └── path-is-absolute@1.0.1 │ ├── graceful-fs@4.1.11 │ ├─┬ minimatch@3.0.4 │ │ └─┬ brace-expansion@1.1.8 │ │ ├── balanced-match@1.0.0 │ │ └── concat-map@0.0.1 │ ├─┬ mkdirp@0.5.1 │ │ └── minimist@0.0.8 │ ├─┬ nopt@3.0.6 │ │ └── abbrev@1.1.0 │ ├─┬ npmlog@4.1.2 │ │ ├─┬ are-we-there-yet@1.1.4 │ │ │ ├── delegates@1.0.0 │ │ │ └─┬ readable-stream@2.3.3 │ │ │ ├── core-util-is@1.0.2 │ │ │ ├── inherits@2.0.3 │ │ │ ├── isarray@1.0.0 │ │ │ ├── process-nextick-args@1.0.7 │ │ │ ├── safe-buffer@5.1.1 │ │ │ ├── string_decoder@1.0.3 │ │ │ └── util-deprecate@1.0.2 │ │ ├── console-control-strings@1.1.0 │ │ ├─┬ gauge@2.7.4 │ │ │ ├── aproba@1.1.2 │ │ │ ├── has-unicode@2.0.1 │ │ │ ├── object-assign@4.1.1 │ │ │ ├── signal-exit@3.0.2 │ │ │ ├─┬ string-width@1.0.2 │ │ │ │ ├── code-point-at@1.1.0 │ │ │ │ └─┬ is-fullwidth-code-point@1.0.0 │ │ │ │ └── number-is-nan@1.0.1 │ │ │ ├─┬ strip-ansi@3.0.1 │ │ │ │ └── ansi-regex@2.1.1 │ │ │ └── wide-align@1.1.2 │ │ └── set-blocking@2.0.0 │ ├─┬ osenv@0.1.4 │ │ ├── os-homedir@1.0.2 │ │ └── os-tmpdir@1.0.2 │ ├─┬ request@2.81.0 │ │ ├── aws-sign2@0.6.0 │ │ ├── aws4@1.6.0 │ │ ├── caseless@0.12.0 │ │ ├─┬ combined-stream@1.0.5 │ │ │ └── delayed-stream@1.0.0 │ │ ├── extend@3.0.1 │ │ ├── forever-agent@0.6.1 │ │ ├─┬ form-data@2.1.4 │ │ │ └── asynckit@0.4.0 │ │ ├─┬ har-validator@4.2.1 │ │ │ ├─┬ ajv@4.11.8 │ │ │ │ ├── co@4.6.0 │ │ │ │ └─┬ json-stable-stringify@1.0.1 │ │ │ │ └── jsonify@0.0.0 │ │ │ └── har-schema@1.0.5 │ │ ├─┬ hawk@3.1.3 │ │ │ ├── boom@2.10.1 │ │ │ ├── cryptiles@2.0.5 │ │ │ ├── hoek@2.16.3 │ │ │ └── sntp@1.0.9 │ │ ├─┬ http-signature@1.1.1 │ │ │ ├── assert-plus@0.2.0 │ │ │ ├─┬ jsprim@1.4.0 │ │ │ │ ├── assert-plus@1.0.0 │ │ │ │ ├── extsprintf@1.0.2 │ │ │ │ ├── json-schema@0.2.3 │ │ │ │ └── verror@1.3.6 │ │ │ └─┬ sshpk@1.13.1 │ │ │ ├── asn1@0.2.3 │ │ │ ├── assert-plus@1.0.0 │ │ │ ├── bcrypt-pbkdf@1.0.1 │ │ │ ├── dashdash@1.14.1 │ │ │ ├── ecc-jsbn@0.1.1 │ │ │ ├── getpass@0.1.7 │ │ │ ├── jsbn@0.1.1 │ │ │ └── tweetnacl@0.14.5 │ │ ├── is-typedarray@1.0.0 │ │ ├── isstream@0.1.2 │ │ ├── json-stringify-safe@5.0.1 │ │ ├─┬ mime-types@2.1.16 │ │ │ └── mime-db@1.29.0 │ │ ├── oauth-sign@0.8.2 │ │ ├── performance-now@0.2.0 │ │ ├── qs@6.4.0 │ │ ├── safe-buffer@5.1.1 │ │ ├── stringstream@0.0.5 │ │ ├─┬ tough-cookie@2.3.2 │ │ │ └── punycode@1.4.1 │ │ ├── tunnel-agent@0.6.0 │ │ └── uuid@3.1.0 │ ├── rimraf@2.6.1 │ ├── semver@5.3.0 │ ├─┬ tar@2.2.1 │ │ ├── block-stream@0.0.9 │ │ └── inherits@2.0.3 │ └─┬ which@1.2.14 │ └── isexe@2.0.0 ├─┬ node-pre-gyp@0.6.34 │ ├─┬ mkdirp@0.5.1 │ │ └── minimist@0.0.8 │ ├─┬ nopt@4.0.1 │ │ ├── abbrev@1.1.0 │ │ └─┬ osenv@0.1.4 │ │ ├── os-homedir@1.0.2 │ │ └── os-tmpdir@1.0.2 │ ├─┬ npmlog@4.1.2 │ │ ├─┬ are-we-there-yet@1.1.4 │ │ │ ├── delegates@1.0.0 │ │ │ └─┬ readable-stream@2.3.3 │ │ │ ├── core-util-is@1.0.2 │ │ │ ├── inherits@2.0.3 │ │ │ ├── isarray@1.0.0 │ │ │ ├── process-nextick-args@1.0.7 │ │ │ ├── safe-buffer@5.1.1 │ │ │ ├── string_decoder@1.0.3 │ │ │ └── util-deprecate@1.0.2 │ │ ├── console-control-strings@1.1.0 │ │ ├─┬ gauge@2.7.4 │ │ │ ├── aproba@1.1.2 │ │ │ ├── has-unicode@2.0.1 │ │ │ ├── object-assign@4.1.1 │ │ │ ├── signal-exit@3.0.2 │ │ │ ├─┬ string-width@1.0.2 │ │ │ │ ├── code-point-at@1.1.0 │ │ │ │ └─┬ is-fullwidth-code-point@1.0.0 │ │ │ │ └── number-is-nan@1.0.1 │ │ │ ├─┬ strip-ansi@3.0.1 │ │ │ │ └── ansi-regex@2.1.1 │ │ │ └── wide-align@1.1.2 │ │ └── set-blocking@2.0.0 │ ├─┬ rc@1.2.1 │ │ ├── deep-extend@0.4.2 │ │ ├── ini@1.3.4 │ │ ├── minimist@1.2.0 │ │ └── strip-json-comments@2.0.1 │ ├─┬ request@2.81.0 │ │ ├── aws-sign2@0.6.0 │ │ ├── aws4@1.6.0 │ │ ├── caseless@0.12.0 │ │ ├─┬ combined-stream@1.0.5 │ │ │ └── delayed-stream@1.0.0 │ │ ├── extend@3.0.1 │ │ ├── forever-agent@0.6.1 │ │ ├─┬ form-data@2.1.4 │ │ │ └── asynckit@0.4.0 │ │ ├─┬ har-validator@4.2.1 │ │ │ ├─┬ ajv@4.11.8 │ │ │ │ ├── co@4.6.0 │ │ │ │ └─┬ json-stable-stringify@1.0.1 │ │ │ │ └── jsonify@0.0.0 │ │ │ └── har-schema@1.0.5 │ │ ├─┬ hawk@3.1.3 │ │ │ ├── boom@2.10.1 │ │ │ ├── cryptiles@2.0.5 │ │ │ ├── hoek@2.16.3 │ │ │ └── sntp@1.0.9 │ │ ├─┬ http-signature@1.1.1 │ │ │ ├── assert-plus@0.2.0 │ │ │ ├─┬ jsprim@1.4.0 │ │ │ │ ├── assert-plus@1.0.0 │ │ │ │ ├── extsprintf@1.0.2 │ │ │ │ ├── json-schema@0.2.3 │ │ │ │ └── verror@1.3.6 │ │ │ └─┬ sshpk@1.13.1 │ │ │ ├── asn1@0.2.3 │ │ │ ├── assert-plus@1.0.0 │ │ │ ├── bcrypt-pbkdf@1.0.1 │ │ │ ├── dashdash@1.14.1 │ │ │ ├── ecc-jsbn@0.1.1 │ │ │ ├── getpass@0.1.7 │ │ │ ├── jsbn@0.1.1 │ │ │ └── tweetnacl@0.14.5 │ │ ├── is-typedarray@1.0.0 │ │ ├── isstream@0.1.2 │ │ ├── json-stringify-safe@5.0.1 │ │ ├─┬ mime-types@2.1.16 │ │ │ └── mime-db@1.29.0 │ │ ├── oauth-sign@0.8.2 │ │ ├── performance-now@0.2.0 │ │ ├── qs@6.4.0 │ │ ├── safe-buffer@5.1.1 │ │ ├── stringstream@0.0.5 │ │ ├─┬ tough-cookie@2.3.2 │ │ │ └── punycode@1.4.1 │ │ ├── tunnel-agent@0.6.0 │ │ └── uuid@3.1.0 │ ├─┬ rimraf@2.6.1 │ │ └─┬ glob@7.1.2 │ │ ├── fs.realpath@1.0.0 │ │ ├─┬ inflight@1.0.6 │ │ │ └── wrappy@1.0.2 │ │ ├── inherits@2.0.3 │ │ ├─┬ minimatch@3.0.4 │ │ │ └─┬ brace-expansion@1.1.8 │ │ │ ├── balanced-match@1.0.0 │ │ │ └── concat-map@0.0.1 │ │ ├─┬ once@1.4.0 │ │ │ └── wrappy@1.0.2 │ │ └── path-is-absolute@1.0.1 │ ├── semver@5.4.1 │ ├─┬ tar@2.2.1 │ │ ├── block-stream@0.0.9 │ │ ├─┬ fstream@1.0.11 │ │ │ └── graceful-fs@4.1.11 │ │ └── inherits@2.0.3 │ └─┬ tar-pack@3.4.0 │ ├─┬ debug@2.6.8 │ │ └── ms@2.0.0 │ ├─┬ fstream@1.0.11 │ │ ├── graceful-fs@4.1.11 │ │ └── inherits@2.0.3 │ ├─┬ fstream-ignore@1.0.5 │ │ ├── inherits@2.0.3 │ │ └─┬ minimatch@3.0.4 │ │ └─┬ brace-expansion@1.1.8 │ │ ├── balanced-match@1.0.0 │ │ └── concat-map@0.0.1 │ ├─┬ once@1.4.0 │ │ └── wrappy@1.0.2 │ ├─┬ readable-stream@2.3.3 │ │ ├── core-util-is@1.0.2 │ │ ├── inherits@2.0.3 │ │ ├── isarray@1.0.0 │ │ ├── process-nextick-args@1.0.7 │ │ ├── safe-buffer@5.1.1 │ │ ├── string_decoder@1.0.3 │ │ └── util-deprecate@1.0.2 │ └── uid-number@0.0.6 ├── promise@7.1.1 ├── semver@4.1.0 ├── source-map@0.1.32 ├── source-map-support@0.3.2 ├── strip-ansi@0.3.0 ├── supports-color@0.2.0 ├── type-of@2.0.1 └── underscore@1.5.2 Thank you.
multiwave commented 7 years ago

I can confirm this bug, happens also in Chrome, seems to be a javascript only issue, as sending emails works fine, just this resend button UI is broken.

Lawri-van-Buel commented 6 years ago

I got Rocketchat 0.58.0-rc.0

From The browser [Firefox 54.0 (64-bit)] Log (replaced my URL with demo.rocket.chat)

 unreachable code after return statement[Learn More]  47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:11:624767

TypeError: o.emails[0].address is not a function[Learn More]  47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:235:54168
  click #resend-verification-email https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:235:54168
  e.prototype.events/r[i]</</< https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:38050
  e._withTemplateInstanceFunc https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:37631
  e.prototype.events/r[i]</< https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:38002
  i/</</</< https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:26969
  f._withCurrentView https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:23053
  i/</</< https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:26930
  a/this.delegatedHandler</< https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:79:9114
  dispatch https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:11:1337117
  add/h.handle https://demo.rocket.chat/47c8428d540aedcfa5bb6fad1d6bae5a61ce3cb2.js:11:1335163

In rocketchat I got the following in the log (when full logging is enabled, I redacted the secret and other identifiable information besides my own username.)

I must note that the initial mail (when registering) does work only the resend mail function fails

Aug 07 08:37:28 Rocketchat1 RocketChat[1367]: rocketchat_logger rocketchat_logger.js:376 Meteor ➔ method saveUserProfile -> userId: <<USER ID REDACTED>> , arguments:  { '0':
Aug 07 08:37:28 Rocketchat1 RocketChat[1367]:    { typedPassword: '<<SUPER SECRET PASSWORD TOKEN>>',
Aug 07 08:37:28 Rocketchat1 RocketChat[1367]:      realname: 'Sysosmaster',
Aug 07 08:37:28 Rocketchat1 RocketChat[1367]:      email: '<<NEW EMAIL SUPPLIED>>' },
Aug 07 08:37:28 Rocketchat1 RocketChat[1367]:   '1': {} }
Aug 07 08:37:28 Rocketchat1 RocketChat[1367]: rocketchat_logger rocketchat_logger.js:376 Meteor ➔ method setEmail -> userId: <<USER ID REDACTED>> , arguments:  { '0': '<<NEW EMAIL SUPPLIED>>' }
Aug 07 08:37:30 Rocketchat1 RocketChat[1367]: rocketchat_logger rocketchat_logger.js:376 Meteor ➔ method UserPresence:online -> userId: 7ruBApudMSRncQRnf , arguments:  {}
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]: rocketchat_logger rocketchat_logger.js:376 Meteor ➔ method spotlight -> userId: <<USER ID REDACTED>> , arguments:  { '0': '',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:   '1':
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:    [ { _id: '<<USER ID REDACTED>>',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        emails: [Object],
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        username: 'sysosmaster',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        active: true,
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        customFields: [Object],
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        name: 'Sysosmaster',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        roles: [Object],
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        services: [Object],
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        settings: [Object],
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        status: 'online',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        statusConnection: 'online',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        statusDefault: 'online',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:        utcOffset: 2 },
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:      '<<User2>',
Aug 07 08:37:31 Rocketchat1 RocketChat[1367]:      '<<User3>>' ],
rasos commented 6 years ago

Related to #7577 and fixed in #7758 .

isabellarussell commented 6 years ago

I have tested this on 0.62 Cloud using Chrome 64.0.3282.167 (Official Build) (64-bit) and this is still an issue.

avimanyu786 commented 4 years ago

This still isn't working. I followed https://rocket.chat/docs/administrator-guides/email/setup/ and set it up with https://sendgrid.com. SMTP Test Email is working.

gojo-limitless commented 4 years ago

@geekgonecrazy This is still an issue as mentioned by @avimanyu786 Could someone take a look at this? :)

gojo-limitless commented 4 years ago

@renatobecker I'm still curious if someone can get back to this issue that's still a problem :)

tylik1 commented 2 years ago

Same problem

Version 3.17.0 Deployment ID xxx Apps Engine Version 1.27.1 Node Version v12.22.5 Database Migration 228 MongoDB 4.0.3 / mmapv1 (oplog Enabled)