I am encountering an issue when installing tutor 14.0.5 and 14.1.1 on to ubuntu 20.04 (digitalocean) using docker 20.10.21 and docker-compose 2.12.2.
Can anyone provide a direction to debug this?
tutor local quickstart (it will pass if disable mfe), will give following error.
(the discussion board only allows new user to put 5 links, so I didn’t show the message before this)
=> [profile 2/3] RUN touch /openedx/env/production.override && echo “ENABLE_LEARNER_RECORD_MFE=‘true’” >> /openedx/ 0.5s
=> ERROR [profile 3/3] RUN bash -c "set -a && source /openedx/env/production && source /openedx/env/production.overri 0.6s
[profile 3/3] RUN bash -c “set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build”: #0 0.472 /openedx/env/production: line 22: unexpected EOF while looking for matching `‘’ #0 0.472 /openedx/env/production: line 26: syntax error: unexpected end of file
failed to solve: executor failed running [/bin/sh -c bash -c “set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build”]: exit code: 2
Error: Command failed with status 17: docker compose -f /home/user1/.local/share/tutor/env/local/docker-compose.yml -f /home/user1/.local/share/tutor/env/local/docker-compose.prod.yml -f /home/user1/.local/share/tutor/env/local/docker-compose.tmp.yml --project-name tutor_local up --remove-orphans --build -d
To me, this looks like a configuration mistypes or a corrupt file.
To confirm this, can you start by deleting your configuration file (default location: ~/.local/share/tutor/config.yml) then do another tutor local quickstart? If the problem persists, then it might be a bug with MFE plugin.
Yes there is a know issue for tutor-mfe regarding bash escape hell… The current fix 14.0.1 suppose to fix it for production. But for development it might be buggy but also suppose to work.
Can you tell us whats your mfe version i.e. pip show tutor-mfe
I suspect it might have something to do with encoding, it seems to me the " might not be in the right foramt… Could you below answer the following questions:
$ cat “$(tutor config printroot)”/env/plugins/mfe/build/mfe/env/production
cat: /home/user1/.local/share/tutor/env/plugins/mfe/build/mfe/env/production: No such file or directory
The above was when disable mfe. if I enable mfe, I got
$ tutor plugins enable mfe
$ tutor config save
$ tutor local quickstart
(language code zh-tw) (en also will fail the same)
(still fail the same way)
Aha, I think as I guess its something realted (’, ‘) which should be replaced with '.
Quick fix:
Manaually replace the occurance of (’, ‘) to ' . This can be done probably by
tutor config save tutor config save --set MFE_PROFILE_MFE_APP="{'name': 'profile', 'repository': 'https://github.com/edx/frontend-app-profile', 'port': 1995, 'env': {'production': {'ENABLE_LEARNER_RECORD_MFE': 'true'}}}"
You might need to do that for all other MFEs you are using, you just check the content and replace it like above, the default MFEs are MFE_PROFILE_MFE_APP, MFE_ACCOUNT_MFE_APP, MFE_GRADEBOOK_MFE_APP, MFE_LEARNING_MFE_APP, and MFE_PROFILE_MFE_APP.
Lastly regarding the configuration for you in /production I see the value of SITE_NAME has also a weired character, this can be change by config varaible PLATFORM_NAME.