toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Cannot deploy due to confusing error regarding "invalid MONGO_VERSION"

Open uprprc777 opened this issue 9 months ago • 3 comments

I followed the official quick start guide trying to deploy a local instance.

$ git clone https://github.com/overleaf/toolkit.git ./overleaf-toolkit
$ cd ./overleaf-toolkit
$ bin/init
$ bin/up

Then error occured.

---------------------  ERROR  -----------------------
  Invalid MONGO_VERSION: MONGO_VERSION=6.0

  MONGO_VERSION must start with the actual major version of mongo, followed by a dot.
  Example: MONGO_IMAGE=my.dockerhub.com/custom-mongo
           MONGO_VERSION=6.0-custom
---------------------  ERROR  -----------------------

6.0 is the default value while the script reported error. I tried something like 6.0.20, 8.0, 8.0.5 but same error message. No configuration is modified.

Please help and thank in advanced!

uprprc777 avatar Mar 17 '25 09:03 uprprc777

Hi, I have the same issue. It seems that in the shared-function.sh, the parsing of the Mongo version in the overleaf.rc file failed. As a result, the variable mongo_version is set to "MONGO_VERSION=6.0" instead of just "6.0".

I've fixed it by replacing the function with the following:

function read_configuration() {
  local name=$1
  grep -E "^$name=" "$TOOLKIT_ROOT/config/overleaf.rc" | sed -r "s/^$name=//"
}

However, I'm facing another issue right now (and I don't know if it's related). I get the following error: realpath: data/overleaf: No such file or directory.

Edit : (I'm using Macos)

Lyxass avatar Mar 25 '25 14:03 Lyxass

Btw an issue on this subject seems to already exist : https://github.com/overleaf/toolkit/issues/318

Lyxass avatar Mar 25 '25 14:03 Lyxass

Image you can just create these folders and bin/up again

scyzy7 avatar Apr 03 '25 07:04 scyzy7

modify read_mongo_version() function in lib/shared-functions.sh

axhiao avatar Nov 12 '25 06:11 axhiao