toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

BIn/Up Mongo Version Error

Open FuriousJan opened this issue 1 year ago • 11 comments

Steps to Reproduce

  1. Cloned the github using mac OS
  2. Bin/init
  3. Bin/up

Expected Behaviour

Bin/up working properly and the program starting.

Observed Behaviour

Error occurs due to Mongo Version apparently not being correct, errors persists even when trying other version endings like 6.0.0 or 6.0-custom. j

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

Context

Technical Info

Using Mongo 6.0, using Sonoma 14.5.

  • URL:
  • Browser Name and version:
  • Operating System and version (desktop or mobile): Sonoma 14.5

FuriousJan avatar Dec 03 '24 16:12 FuriousJan

Can confirm here, same issue.

Jan64X avatar Dec 08 '24 20:12 Jan64X

Same issue:

$ bin/init 
Copying config files to 'config/'
$ bin/up
---------------------  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  -----------------------

coactive-jeffrey avatar Dec 12 '24 01:12 coactive-jeffrey

Problem

Quoting the relevant variable:

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

we see that the requested variable name in the .rc file makes it into the returned value.

Workaround

Use Shell Parameter Expansion to cut out the variable name in lib/shared-functions.sh:

function read_mongo_version() {
  local mongo_image=$(read_configuration "MONGO_IMAGE")
  local mongo_version=$(read_configuration "MONGO_VERSION")
  mongo_image=${mongo_image/'MONGO_IMAGE='/}
  mongo_version=${mongo_version/'MONGO_VERSION='/}
  if [ -z "${mongo_version}" ]; then

I dunno' how portable this is, so here's what I'm working with:

$ system_profiler SPSoftwareDataType | grep Version
      System Version: macOS 14.7.1 (23H222)
      Kernel Version: Darwin 23.6.0
$ grep --version
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD

Maybe there's something weird about BSD's sed syntax that's different from GNU/Linux.

coactive-jeffrey avatar Dec 12 '24 02:12 coactive-jeffrey

Facing this issue on macOS Sonoma as well

jazlan01 avatar Dec 17 '24 02:12 jazlan01

Same Issue on Sequoia 15.0.1 (24A348)

CarloAdornetto avatar Dec 17 '24 18:12 CarloAdornetto

Same issue

- Host Information
    - Linux
    - Output of 'lsb_release -a':
            No LSB modules are available.
            Distributor ID:     Ubuntu
            Description:        Ubuntu 20.04.3 LTS
            Release:    20.04
            Codename:   focal
- Dependencies
    - bash
        - status: present
        - version info: 5.0.17(1)-release
    - docker
        - status: present
        - version info: Docker version 27.0.3, build 7d4bcd8
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 8.30
    - perl
        - status: present
        - version info: 5.030000
    - awk
        - status: present
        - version info: GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
    - openssl
        - status: present
        - version info: OpenSSL 1.1.1f  31 Mar 2020
    - docker compose
        - status: present
        - version info: Docker Compose version v2.28.1-desktop.1
- Docker Daemon
    - status: up
    - server version: 27.0.3

Buronn avatar Jan 24 '25 15:01 Buronn

Adding these two lines in lib/shared-functions.sh as @coactive-jeffrey is suggesting worked for me on Sequoia: mongo_image=${mongo_image/'MONGO_IMAGE='/} mongo_version=${mongo_version/'MONGO_VERSION='/}

arnepluhar avatar Feb 01 '25 19:02 arnepluhar

Same issue

juniorlove avatar Mar 10 '25 07:03 juniorlove

Same issue

haowuintub avatar Mar 13 '25 10:03 haowuintub

same issue here. Seem like exists for a few month.

Muzych avatar Apr 20 '25 14:04 Muzych

I got it sorted via the steps below:

edit the file lib/shared-functions.sh, in thefunction read_mongo_version(), changing these two lines: #local mongo_image=$(read_configuration "MONGO_IMAGE") #local mongo_version=$(read_configuration "MONGO_VERSION")

to:

local mongo_image=mongo local mongo_version=6.0

create the folder within data

mkdir -p data/overleaf data/mongo data/redis data/git-bridge

robbieshen avatar May 06 '25 09:05 robbieshen

Error when you have ARM chip . for Mac M4 chip : https://gitlab.com/DinhNghia_Vo/overleaf_toolkit/

DinhNghiaVo avatar Nov 28 '25 06:11 DinhNghiaVo