adapt-security / at-utils

A collection of CLI helper utilities for maintaining installations of the Adapt authoring tool.
1 stars 4 forks source link

Standard installation failing - Config failed to initialise #22

Open JeffParkerOi opened 1 year ago

JeffParkerOi commented 1 year ago

What happened?

When installing the current 1.0.0-rc.2 pre-release version using the standard installation method, the installer gets to the point where it is asking for server details (mongodb URI, server host/path, etc). Upon entering these details and continuing in the process, the installer throws the following error:

Failed to fetch

A more detailed error from the server logs is included in the 'relevant log output' field below.

I'm not sure what is causing the error, but it appears to manifest as the 'conf/production.config.js' file being written with no settings in it. If I manually populate the settings of this file, and save it immediately after submitting the form, then the installation process continues to the next step successfully.

Expected behaviour

After entering the configuration settings as part of the installation process, they should be saved in 'conf/production.config.js'.

Steps to reproduce

  1. Follow the 'standard installation' instructions at: https://adapt-security.github.io/adapt-authoring-documentation/manual/#/install
  2. At the stage that you are asked to enter server details, do so, and click continue.
  3. Note that the error is thrown immediately afterward

Authoring tool version

1.0.0-rc.2

Framework version

n/a

What browsers are you seeing the problem on?

Chrome

Relevant log output

adapt-authoring-auth: must have required property 'tokenSecret'
adapt-authoring-server: must have required property 'host', must have required property 'port', must have required property 'url'
adapt-authoring-mongodb: must have required property 'connectionUri'
adapt-authoring-sessions: must have required property 'secret'
Error
    at ConfigModule.storeSchemaSettings (file:///home/adapt/app/node_modules/adapt-authoring-config/lib/ConfigModule.js:128:26)
    at async ConfigModule.init (file:///home/adapt/app/node_modules/adapt-authoring-config/lib/ConfigModule.js:33:7)

Config failed to initialise for environment 'production'. See above for details.
taylortom commented 1 year ago

Will have a look into this one this week 😄

simondate commented 10 months ago

@taylortom this was the issue that I mentioned on the call today. Happening to me on 1.0.0-rc.3 on Windows 11. the production.config.js file shows this after the failed install

export default {};

I didn't have this issue when I did the --no-ui install

simondate commented 10 months ago

Just spent a couple of hours playing around with this.

I've discovered that the request body here is empty.

Form data is present when the UI sends the message so this is probably an error with the POST event.

taylortom commented 10 months ago

This one should now be fixed in at-utils@0.5.0

joe-allen-89 commented 5 months ago

Unable to install using --prerelease flag