RocketChat server fails to start after upgrading to version 4.1.4

Description

Rocket.Chat server fails to start when upgrading to version 4.1.4

I’m in the process of upgrading my local rocket chat instance from version 3.18 to version 4.4.0. Upgrading to version 4.0.5 went as expected and I was able to start and connect to my local rocketchat environment. When upgrading to 4.1, however, rocketchat hangs after running the database migrations and never starts. I am also not able to connect to the web application

Here are the logs when starting rocket.chat on version 4.2.4 (I went up to this version to see if that would fix it, but it did not):

meteor npm start

> Rocket.Chat@4.2.4 start 
> meteor

=> Started proxy.
=> Meteor 2.6.1 is available. Update this project with 'meteor update'.
=> Started MongoDB.
W20220302-13:29:40.403(-7)? (STDERR) (node:1042) [PINODEP008] PinoWarning: prettyPrint is deprecated, use the pino-pretty transport instead
I20220302-13:29:45.799(-7)? LocalStore: store created at
I20220302-13:29:45.800(-7)? LocalStore: store created at
I20220302-13:29:45.800(-7)? LocalStore: store created at
I20220302-13:29:51.440(-7)? [2022-03-02T20:29:51.439Z] USERLVL (Migrations/1042 on Stephans-MacBook-Pro.local): Not migrating, already at version 249

The only thing that I changed between 4.0.5 and 4.1.4 were a few rocketchat settings (related to this issue: Invalid config type when starting application · Issue #24245 · RocketChat/Rocket.Chat · GitHub) that were causing errors when starting the application in version 4.1.4:

SMS_Mobex_from_number - int 0
Cloud_Workspace_Client_Secret_Expires_At - int 0
LDAP_Port - int 389
CAS_popup_width - int 810
CAS_popup_height - int 610
SAML_Custom_Default_allowed_clock_drift - int 0

Any advice on how to proceed? There are no errors being displayed so I am at a loss as how to proceed. This is a breaking issue for me currently

Server Setup Information

  • Version of Rocket.Chat Server: 4.1.4/4.2.4
  • Operating System: MacOS
  • Deployment Method:
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:
  • Proxy:
  • Firewalls involved:

Any additional Information

Hi!

There were some recent upgrade to meteor and node that directly affects manual deployment upgrades. Not sure if this is the case. But make sure to have the same meteor and node versions, according to the version you are upgrading to.

Also, Unless you have a hard requirement to deploy Rocket.Chat manually, you should consider moving it to docker or kubernetes.

I suggest you try restoring this DB into a 4.5.0 docker deployment, and see if it will migrate and start successfully.

I’m not quite sure that this answer would work for my current situation.

I’ve been upgrading my app version by version from 0.57 to 4.0.5 without any issue - deploying version 4.0.5 runs the migrations and the server starts up fine:

I20220308-15:00:32.081(-7)? Finished migrating.
I20220308-15:00:33.783(-7)? LocalStore: store created at
I20220308-15:00:33.783(-7)? LocalStore: store created at
I20220308-15:00:33.783(-7)? LocalStore: store created at
=> Started your app.

=> App running at: http://localhost:3000/
I20220308-15:00:38.766(-7)? +-----------------------------------------------+
I20220308-15:00:38.766(-7)? |                 SERVER RUNNING                |
I20220308-15:00:38.767(-7)? +-----------------------------------------------+
I20220308-15:00:38.767(-7)? |                                               |
I20220308-15:00:38.767(-7)? |  Rocket.Chat Version: 4.0.5                   |
I20220308-15:00:38.767(-7)? |       NodeJS Version: 12.22.1 - x64           |
I20220308-15:00:38.767(-7)? |      MongoDB Version: 4.4.4                   |
I20220308-15:00:38.767(-7)? |       MongoDB Engine: wiredTiger              |
I20220308-15:00:38.767(-7)? |             Platform: darwin                  |
I20220308-15:00:38.767(-7)? |         Process Port: 22694                   |
I20220308-15:00:38.768(-7)? |             Site URL: http://localhost:3000/  |
I20220308-15:00:38.768(-7)? |     ReplicaSet OpLog: Enabled                 |
I20220308-15:00:38.768(-7)? |          Commit Hash: ba2cca4286              |
I20220308-15:00:38.768(-7)? |        Commit Branch: develop                 |
I20220308-15:00:38.768(-7)? |                                               |
I20220308-15:00:38.768(-7)? +-----------------------------------------------+

Starting on version 4.1.4, the app just hangs after running the migrations and the server never starts up. It seems like it’s a specific issue with this version since every previous version worked for me locally. I have a spreadsheet keeping track of the meteor/node/npm versions and make sure that my build environment matches what is required by the specific version.

The reason why I need to know how to fix this is because I have to continually upgrade my implementation of Rocket.Chat, but if I’m stuck at version 4.0.5 and can’t move up because of this, then I will essentially be blocked from doing any future development

EDIT: After doing some digging, this seems to be an issue affecting MacOS development environments. I spun up a fresh version of Rocket.Chat on a second mac computer and was running into the same issue