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

XML-decryption module not found #13271

Closed
ChessSpider opened this issue Jan 28, 2019 · 10 comments · Fixed by #13437
Closed

XML-decryption module not found #13271

ChessSpider opened this issue Jan 28, 2019 · 10 comments · Fixed by #13437

Comments

@ChessSpider
Copy link

ChessSpider commented Jan 28, 2019

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:

@ChessSpider
Copy link
Author

Probably related to #12153

@gaetanars
Copy link

Same here in docker release.

@ChessSpider
Copy link
Author

@zenman94 temporary fix:
copy/paste:

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

@gaetanars
Copy link

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

@hairmare
Copy link

Looks like xml-encryption was removed in 687c3c5 while it is still used here:

const xmlenc = require('xml-encryption');

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 #13271 (comment) works.

@gaetanars
Copy link

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

@ChessSpider
Copy link
Author

when will this be fixed?

@adanielvv
Copy link

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

@GuilleGlad
Copy link

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

@adanielvv
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants