Rocket.chat: XML-decryption module not found

Created on 28 Jan 2019  ยท  10Comments  ยท  Source: RocketChat/Rocket.Chat

Description:

Breaking bug: xml-encryption module not found on docker upon login

Steps to reproduce:

  1. Login via saml
  2. fatal error:
Sorry, an annoying error occured
Error: Cannot find module 'xml-encryption'
Close Window

on docker

Expected behavior:

No crash

Actual behavior:

Sorry, an annoying error occured
Error: Cannot find module 'xml-encryption'
Close Window

Server Setup Information:

rocketchat_1          | โž” +-------------------------------------------------+
rocketchat_1          | โž” |                  SERVER RUNNING                 |
rocketchat_1          | โž” +-------------------------------------------------+
rocketchat_1          | โž” |                                                 |
rocketchat_1          | โž” |  Rocket.Chat Version: 0.74.0                    |
rocketchat_1          | โž” |       NodeJS Version: 8.11.4 - x64              |
rocketchat_1          | โž” |             Platform: linux                     |
rocketchat_1          | โž” |         Process Port: 3000                      |
rocketchat_1          | โž” |             Site URL: https://c***********  |
rocketchat_1          | โž” |     ReplicaSet OpLog: Enabled                   |
rocketchat_1          | โž” |          Commit Hash: cc5391e58c                |
rocketchat_1          | โž” |        Commit Branch: HEAD                      |
rocketchat_1          | โž” |                                                 |
rocketchat_1          | โž” +-------------------------------------------------+
  • Version of Rocket.Chat Server:
  • Operating System: linux
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:

Additional context

Login via simplesaml

Relevant logs:


Most helpful comment

@zenman94 temporary fix:
copy/paste:

docker-compose exec rocketchat /bin/bash
cd /app/bundle/programs/server
npm install xml-encryption
exit

All 10 comments

Same here in docker release.

@zenman94 temporary fix:
copy/paste:

docker-compose exec rocketchat /bin/bash
cd /app/bundle/programs/server
npm install xml-encryption
exit

Thank you for the patch but we are on Kubernetes cluster.

Looks like xml-encryption was removed in 687c3c572aaba7b7cb67ea5683b3100f54bfcb53 while it is still used here:
https://github.com/RocketChat/Rocket.Chat/blob/483f7d5c752679a9795f6324a73e7c03f36601fc/packages/meteor-accounts-saml/server/saml_utils.js#L396
If you are using the stable/rocketchat helm chart to deploy rocketchat you can set securityContext.runAsUser=99999 and then follow the example from helm status <rocketchat-release> to open a shell where the workaround from https://github.com/RocketChat/Rocket.Chat/issues/13271#issuecomment-458034489 works.

We prefer wait a correct docker image before push this in production :)

when will this be fixed?

Temporary workaround for snap:
sudo snap revert rocketchat-server

You should always make a backup first:

sudo systemctl stop snap.rocketchat-server.rocketchat-server
sudo rocketchat-server.backupdb
sudo snap revert rocketchat-server
sudo systemctl restart snap.rocketchat-server.rocketchat-server

Thank you so much @adanielvv , is there an option to disable automatic SNAP updates?

@GuilleGlad I looked at the snap manpages and couldn't find a hold option.
I found a command option that shows the impending updates:
sudo snap refresh --list
On my system (after the revert) it comes up empty.
I guess it jumps the reverted version.

By the way, the snap revert command is listed in the Rocket.Chat docs. See also the manpage above to understand more fully what happens.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kiran-Rao picture Kiran-Rao  ยท  3Comments

Buzzele picture Buzzele  ยท  3Comments

karlprieb picture karlprieb  ยท  3Comments

ghost picture ghost  ยท  3Comments

Buzzele picture Buzzele  ยท  3Comments