How to fix Rocket Chat Meteor Runtime Configuration Error

In my most recent Rocket Chat installations, I frequently encountered this error. I’m unsure why this issue persists and why Rocket Chat lacks a permanent fix for it. The solution I’m about to demonstrate is straightforward and may not necessarily work for everyone, but it worked flawlessly for me. So, continue reading to learn how to fix the Rocket Chat Meteor runtime configuration error.

Please note that my installations are mostly done via Snap, and I will show you how to do it with Snap installation.

Issue

This mostly happens with new installations. At some step, you may encounter an infinite loop of the loading screen. If you check the console log, you will see that the problem is related to Meteor runtime configuration.

Uncaught ReferenceError: meteor_runtime_config is not defined

Fix

As I mentioned, this fix may not work for you, but maybe it will. It is worth a shot in your case.

Login to the server and run the following command to change the siteurl value to your actual URL. Let’s say I have an installation of Rocket Chat on the chat.najigram.com domain.

snap set rocketchat-server siteurl=https://chat.najigram.com

Restart Rocket Chat snap afterward.

snap restart rocketchat-server

Once restarted, you can now refresh the Rocket Chat page in the browser, and hopefully, the endless loop will go away.