RocketChat / RocketChat/Rocket.Chat

Several register issues on newest version

Open
#14,315 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: oauth / sso type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When a user tries to sign in anonymously he/she receives an Internal server error. See the log below.

There are also problems creating regular new accounts, the account is created but the user isn't redirected and can't login either.

Steps to reproduce:
  1. Activate anonymous writing
  2. Try to talk anonymously in any channel
  3. Receive error
Expected behavior:

The user should be able to register a new account or talk anonymously.

Server Setup Information:
  • Version of Rocket.Chat Server: 1.0.1
  • Operating System: Ubuntu 14.04
  • Deployment Method: Docker-compose
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v8.11.4
  • MongoDB Version: 3.4.20
Additional context

One additional problem is that I can't downgrade to a lower version either, the problem persists on v.1.0.0 and lower versions seems to have stopped working since upgrading.

Relevant logs:

[34mI20190429-18:09:28.721(0)
[34mMeteor ➔ method registerUser -> userId: null , arguments: [ {} ]
[34mI20190429-18:09:28.732(0) Exception while invoking method 'registerUser' TypeError: Cannot read property 'facebook' of undefined at getAvatarSuggestionForUser (app/lib/server/functions/getAvatarSuggestionForUser.js:12:20) at AccountsServer. (server/lib/accounts.js:221:29) at executeBound (/app/bundle/programs/server/npm/node_modules/underscore/underscore.js:762:67)
at AccountsServer.bound [as insertUserDoc] (/app/bundle/programs/server/npm/node_modules/underscore/underscore.js:793:14)
at MethodInvocation.registerUser (server/methods/registerUser.js:22:28) at MethodInvocation.methodsMap.(anonymous function) (app/lib/server/lib/debug.js:73:34)
at MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1767:12) at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12) at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12) at Promise (packages/ddp-server/livedata_server.js:715:46) at new Promise () at Session.method (packages/ddp-server/livedata_server.js:689:23) at packages/ddp-server/livedata_server.js:559:43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/lib/server/functions/getAvatarSuggestionForUser.js:12, then trace the registration flow through server/lib/accounts.js:221 and server/methods/registerUser.js:22. Reproduce anonymous writing and regular account creation on the reported setup, and verify that anonymous messages work and newly created users can log in and are redirected correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.