zarx
zarx

Reputation: 1

Rocket.Chat gives meteor runtime config error

I have these kind of errors on stucking home page of my rocketchat:

Failed to load resource: the server responded with a status of 404 (Not Found)
Refused to execute script from 'https://rocketchat.office129-5.local/meteor_runtime_config.js?hash=d1a24ca8938fc18b2f7ed883a1262c4ff59e9e28' because its MIME type ('') is not executable, and strict MIME type checking is enabled.
Uncaught ReferenceError: __meteor_runtime_config__ is not defined
at client_environment.js:1:1
at client_environment.js:78:1
at url_common.js:80:1

It's just endless loading, nothing more How can I fix it? Rocketchat installed as snap

I have tried to revert rocket version but it affects nothing

Upvotes: 0

Views: 1079

Answers (2)

saifulislamrokon
saifulislamrokon

Reputation: 21

If you are using docker, check the logs of the container. In my case it was site URL issue, I meant the site URL was showing http:// instead of https://, but my .env was set correctly, and I did update the site URL manually on the mongoDB container database.

what I did was.

docker exec -it mongorocketchat-mongodb-1 bash

I have no name!@eb1341098ea2:/$ mongo
MongoDB shell version v5.0.23
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("4ea4fced-232b-460b-a092-3f032c33f46b") }
MongoDB server version: 5.0.23
================
Warning: the "mongo" shell has been superseded by "mongosh",
which delivers improved usability and compatibility.The "mongo" shell has been deprecated and will be removed in
an upcoming release.
For installation instructions, see
https://docs.mongodb.com/mongodb-shell/install/
================
---
The server generated these startup warnings when booting:
        2023-11-30T07:18:37.639+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
        2023-11-30T07:18:38.816+00:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
---
rs0:PRIMARY> use rocketchat
switched to db rocketchat
rs0:PRIMARY> db.rocketchat_settings.update({"_id" : "Site_Url"},{$set:{value:"https://chat.titanoba.tech"}})
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
rs0:PRIMARY> exit

Referance: https://www.ryadel.com/en/rocket-chat-change-root_url-site-url-rocketchat/

Upvotes: 1

Mahdi
Mahdi

Reputation: 154

Rocket.Chat Version: 6.4.7
NodeJS Version: 14.21.3 - x64
MongoDB Version: 6.0.11
MongoDB Engine: wiredTiger
Platform: linux
Process Port: 3000
Site URL: https://test.url ReplicaSet OpLog: Enabled
Commit Hash: xxxxxxxx>
Commit Branch: HEAD

I had same problem so i installed node v12 and build the app again with theses commands:

  1. apt remove --purge npm nodejs # to remove previous installation of nodejs.
  2. curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - # to add node 14.x package in your repository list.
  3. apt-get install -y nodejs # to install version 14.x

Then remove rocketchat package via snap snap remove rocketchat-server

After all of that from rocketchat installation doc rocketchat installation try to download the latest version and build the app again.

Your problem is just because your npm modules built in a bad way or with a bad version of nodejs.

look at these two image attached Before :( enter image description here

After :) enter image description here

Upvotes: 1

Related Questions