RocketChat / Rocket.Chat

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

Login as admin failed #29249

Closed knordsiek closed 1 year ago

knordsiek commented 1 year ago

Description:

After Login as Admin:

Error message: Application Error The application GUI just crashed.

Steps to reproduce:

  1. Login as user, ok
  2. Login as admin site failed with error message Application Error The application GUI just crashed.

Expected behavior:

Actual behavior:

Server Setup Information:

Client Setup Information

Additional context

Relevant logs:

sleeplessnight2 commented 1 year ago

the same thing happens with my installation only on standard Ubuntu 22.04 and one instance

rodrigok commented 1 year ago

@knordsiek and @sleeplessnight2 thanks for the report. Could you share the errors on your browser's devtools? If on Chrome you can right click on page and select inspect menu, then open the console tab to check the errors. You may have a arrow by the error to expand it, please do it and share a print screen here.

vinzv commented 1 year ago

grafik grafik grafik

This only occurs with user rocketadmin but not with other users having admin permissions.

sleeplessnight2 commented 1 year ago

image

This occurs when I reload the page after logging in with an admin account.

Cache etc is cleared, as well as on the Linux everything in /tmp/ that belongs to RocketChat.

I am running MongoDB version 6.0.6.

EofChris commented 1 year ago

I can also confirm the problem. Seems to happen with all admin accounts regardless of the username. Log output is the same as above.

Rocket.Chat Version: 6.2.0
NodeJS Version: 14.21.3 - x64
MongoDB Version: 5.0.17
MongoDB Engine: wiredTiger

Error: Cannot find module '/node_modules/meteor-node-stubs/node_modules/buffer/index.js'

ggazzo commented 1 year ago

Hey thanks for your report, and for the information. Unfortunately I haven't been able to reproduce your problem yet and I'm afraid the logs are not related to this, as we know of some we already solved/omitted it in version 6.3.0-develop. Do you have any more information that could help us?

I'm admin for most of the instances I use, and I haven't encountered any problems logging in.

Have you tried in some new browser, without any old cache? Any special settings?

knordsiek commented 1 year ago

In our system (we are using ldap authentication) we have created the user rocketadmin with role admin and no user role perhaps this is the problem, can anyone else confim this?

EofChris commented 1 year ago

We are currently using local authentication. The admin user is a "normal" user account with role admin.

Nintend0d0 commented 1 year ago

I have the same issue in Firefox and with the desktop app. If I try to access the admin panel on the mobile version, I also see the GUI crash error.

grafik

Any more places where I can get logs? The console does only show errors regarding some missing source maps.

I'm using the rocketchat/rocket.chat docker container behind a caddy reverse proxy. GUI crashes also if I connect directly via IP without using a proxy.

Also using "normal" accounts. Only my account (the only admin account on the server) is affected.

I’m using mongo 4.4 because my home server is old 😅.

Strangly I still get push notifications even though the GUI does not load.

ggazzo commented 1 year ago

can I have access to any of those environments?

Nintend0d0 commented 1 year ago

Hah! I solved it!

Something was messed up in the database. I think a syntax error or too much in the "banners" property.

I could fix it this way:

  1. Go into your mongo shell.
  2. use rocketchat.
  3. View your user with db.users.find({"username": "your_username"}).pretty() you'll have a big banners property.
  4. Run db.users.update({"username": "your_username"},{$set:{"banners":{}}}) to clear that property.
  5. Pray you didn't kill your DB.
  6. CTRL + R in client and it works!

I take no warranty for messed up databases!!! Create a backup first.

linuxuser424 commented 1 year ago

Hah! I solved it!

Yes, you did - thank you very much.

There were a ton of automated messages i never saw (Update_your_RocketChat). Where did they come from and where can I deactivate them? I´m watching the release-feed and update regular.

NB-SWP commented 1 year ago

These seem like messages from "Rocket.cat" to me.

Bugt commented 1 year ago

I had the same issue:

Bildschirmfoto 2023-05-17 um 08 38 41

https://github.com/RocketChat/Rocket.Chat/issues/29249#issuecomment-1550185731 Solved it!

EofChris commented 1 year ago

I can confirm the problem is solved by https://github.com/RocketChat/Rocket.Chat/issues/29249#issuecomment-1550185731

Thanks a lot.

pyrexx-siller commented 1 year ago

Can confirm that users having the role admin can't access rocketchat on version 6.2.0 and that removing the banners solved this.

csimitpo commented 1 year ago

(https://github.com/RocketChat/Rocket.Chat/issues/29249#issuecomment-1550185731) Worked for me, thanks a lot!

o- commented 1 year ago

We are affected by this too. My account was completely locked, I couldn't do anything anymore (i.e. not only settings, but also the normal chat ui). Clearing banners was not enough. I also had to clear the following: db.users.update({"username": "your_username"},{$set:{"settings":{}}}).

ftr, the following was in this field before I cleared it: settings: { profile: {}, preferences: { language: 'en' } },

fuzsin commented 1 year ago

Solved by (https://github.com/RocketChat/Rocket.Chat/issues/29249#issuecomment-1550185731), thanks a lot!

The only thing is that the name of my database was parties (there was no rocketchat at all). the command show dbs will list all existing databases

ggazzo commented 1 year ago

if anyone else has problems with this, before cleaning the database, please let me know the payload inside banners.

I'll try to reproduce here anyway

Nintend0d0 commented 1 year ago

Mine was

{
  "banners": {
    "versionUpdate-5_3_0": {
      "id": "versionUpdate-5_3_0",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.3.0"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.3.0",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_3_1": {
      "id": "versionUpdate-5_3_1",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.3.1"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.3.1",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_3_2": {
      "id": "versionUpdate-5_3_2",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.3.2"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.3.2",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_3_3": {
      "id": "versionUpdate-5_3_3",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.3.3"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.3.3",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_3_4": {
      "id": "versionUpdate-5_3_4",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.3.4"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.3.4",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_3_5": {
      "id": "versionUpdate-5_3_5",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.3.5"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.3.5",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_4_0": {
      "id": "versionUpdate-5_4_0",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.4.0"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.4.0",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_4_1": {
      "id": "versionUpdate-5_4_1",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.4.1"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.4.1",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_4_2": {
      "id": "versionUpdate-5_4_2",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.4.2"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.4.2",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_4_3": {
      "id": "versionUpdate-5_4_3",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.4.3"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.4.3",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-5_4_4": {
      "id": "versionUpdate-5_4_4",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["5.4.4"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/5.4.4",
      "modifiers": [],
      "read": true
    },
    "versionUpdate-6_0_0": {
      "id": "versionUpdate-6_0_0",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.0.0"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.0.0",
      "modifiers": [],
      "read": true
    },
    "mongodbDeprecation_4_4_19": {
      "id": "mongodbDeprecation_4_4_19",
      "priority": 100,
      "title": "MongoDB_Deprecated",
      "text": "MongoDB_version_s_is_deprecated_please_upgrade_your_installation",
      "textArguments": ["4.4.19"],
      "modifiers": ["danger"],
      "link": "https://go.rocket.chat/i/mongodb-deprecated"
    },
    "versionUpdate-6_0_1": {
      "id": "versionUpdate-6_0_1",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.0.1"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.0.1",
      "modifiers": []
    },
    "versionUpdate-6_1_0": {
      "id": "versionUpdate-6_1_0",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.0"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.0",
      "modifiers": []
    },
    "versionUpdate-6_1_1": {
      "id": "versionUpdate-6_1_1",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.1"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.1",
      "modifiers": []
    },
    "versionUpdate-6_1_2": {
      "id": "versionUpdate-6_1_2",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.2"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.2",
      "modifiers": []
    },
    "versionUpdate-6_1_3": {
      "id": "versionUpdate-6_1_3",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.3"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.3",
      "modifiers": []
    },
    "versionUpdate-6_1_4": {
      "id": "versionUpdate-6_1_4",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.4"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.4",
      "modifiers": []
    },
    "mongodbDeprecation_4_4_20": {
      "id": "mongodbDeprecation_4_4_20",
      "priority": 100,
      "title": "MongoDB_Deprecated",
      "text": "MongoDB_version_s_is_deprecated_please_upgrade_your_installation",
      "textArguments": ["4.4.20"],
      "modifiers": ["danger"],
      "link": "https://go.rocket.chat/i/mongodb-deprecated"
    },
    "versionUpdate-6_1_5": {
      "id": "versionUpdate-6_1_5",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.5"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.5",
      "modifiers": []
    },
    "versionUpdate-6_1_6": {
      "id": "versionUpdate-6_1_6",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.6"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.6",
      "modifiers": []
    },
    "versionUpdate-6_1_7": {
      "id": "versionUpdate-6_1_7",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.1.7"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.1.7",
      "modifiers": []
    },
    "versionUpdate-6_2_0": {
      "id": "versionUpdate-6_2_0",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": ["6.2.0"],
      "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.2.0",
      "modifiers": []
    },
    "mongodbDeprecation_4_4_21": {
      "id": "mongodbDeprecation_4_4_21",
      "priority": 100,
      "title": "MongoDB_Deprecated",
      "text": "MongoDB_version_s_is_deprecated_please_upgrade_your_installation",
      "textArguments": ["4.4.21"],
      "modifiers": ["danger"],
      "link": "https://go.rocket.chat/i/mongodb-deprecated"
    }
  }
}
ggazzo commented 1 year ago

I tested using development branch and its working great, not sure if something substantial changed but I will check ;)

image

  "banners": {
    "versionUpdate-x_x_x": {
      "id": "versionUpdate-x_x_x",
      "priority": 10,
      "title": "Update_your_RocketChat",
      "text": "New_version_available_(s)",
      "textArguments": [
        "x.x.x"
      ],
      "link": "https://rocket.chat/releases/x.x.x",
      "modifiers": []
    }
  }
Nintend0d0 commented 1 year ago

Hmm, my two guesses are:

Bugt commented 1 year ago

@ggazzo have you tried testing it using the whole payload @Nintend0d0 provided? (To rule out a size problem). Mine was about as big as this one.

I'm using Rocket.Chat in english and had the issue. Not sure if the translation is the cause.

ggazzo commented 1 year ago

@ggazzo have you tried testing it using the whole payload @Nintend0d0 provided? (To rule out a size problem). Mine was about as big as this one.

I'm using Rocket.Chat in english and had the issue. Not sure if the translation is the cause.

yep I set the banner object with the whole payload

I didnt test with a different language

jemand771 commented 1 year ago

one of our two admins also suffered from this with their language set to german, but I don't know about the other one. might still be a coincidence, but it's odd that multiple people noticed it.

(I don't have admin perms, so I didn't experience the bug myself and also sadly don't have the original payload anymore)

Nintend0d0 commented 1 year ago

So, I updated from 6.2.0 to 6.2.2 and it crashed again.

This time I deleted each entry on by one. The crash disappeared, when I deleted this property in banners.

{
            "mongodbDeprecation_4_4_21" : {
                    "id" : "mongodbDeprecation_4_4_21",
                    "priority" : 100,
                    "title" : "MongoDB_Deprecated",
                    "text" : "MongoDB_version_s_is_deprecated_please_upgrade_your_installation",
                    "textArguments" : [
                            "4.4.21"
                    ],
                    "modifiers" : [
                            "danger"
                    ],
                    "link" : "https://go.rocket.chat/i/mongodb-deprecated"
            }
    }

It also could be a side effect of an another problem, which I'm not aware of?

Nintend0d0 commented 1 year ago

I could even narrow it more down.

When I run db.users.update({"username": "your_username"}, {$set: {"banners.mongodbDeprecation_4_4_21.text":"Hallo Welt"}}), crash disappears.

When I reinsert the original string via db.users.update({"username": "your_username"}, {$set: {"banners.mongodbDeprecation_4_4_21.text":"MongoDB_version_s_is_deprecated_please_up grade_your_installation"}}) it crashes.

Important, when I set the language to English I have no crash! So it must be something with the translation.

Nintend0d0 commented 1 year ago

Probably found it!

https://github.com/RocketChat/Rocket.Chat/blob/cc68894674070308f4fec02444d677e1f9261871/apps/meteor/packages/rocketchat-i18n/i18n/de.i18n.json#L3330

There is a space after the %. % s instead %s.

Fiodin commented 9 months ago

It seems like this error is back. I upgraded a few days ago on Snap to Version 6.6.0 and cannot log in as admin with this exact error.

Unfortunately the db thing didn't work and down- and upgrading with the snap either.

I do have 2FA enabled for the admin account.

Any suggestions?

Funny thing: On one of my 3 instances I was logged in as admin and I am still. But trying to log in on this returns the same error.

racus-pz commented 8 months ago

I faced a similar error today, i've tried couple restarts, that MongoDB thing, and nothing...

If I try to log in into admin account - three dots, If I try to log in into user account - everything works just perfect

Funny thing: mobile app worked perfectly but I couldn't open Admin Panel

In an act of desperation, I pressed and held Ctrl+Shift+R (Reload Option) window reloaded like 150+ times and finally, It started to work. It showed me 20+ messages with update info, I have closed them all and now it is ok.