Lightning installation issue

Hi everyone,

I was attempting to install the OpenFN Lightning application using Docker by following the instructions in the README file. Initially, I encountered an issue where the worker service wouldn’t start due to a missing worker secret in the environment variables of the Docker Compose file. After adding the secret, the service started successfully. However, I’m still receiving a 401 error in the worker service.
Additionally, when accessing the web interface, I created an account and, after logging in, encountered a “FunctionClauseError”.

Hello :slight_smile:

Based on the stacktrace and having poked around in the code a bit, I am going to go out on a limb and hypothesise that your user might not have a first name?

If my guess is correct, then one way to fix this would be to just connect to the database.

So, assuming you are running postgres in a container, it would look something like this:

docker exec -it <db_container_name> bash
psql -U postgres
\c <your_database_name>
UPDATE users SET first_name = 'Shubham' WHERE id in (SELECT id from users order by inserted_at DESC LIMIT 1);
exit

Feel free to shout if my guess was wrong - or if this does not resolve your issue.

Hello :slightly_smiling_face:

Thank you so much for your help in resolving the issue. Your response was incredibly valuable, and I really appreciate you taking the time to assist. It made a big difference!

So glad this helped! But… does it mean that there’s either a bug in the local dev version of the Dockerfile, or something that should be adjusted in the readme?

@taylordowns2000 I think there is a bug in the code - where exactly depends on whether you want users to be able to create accounts without a first name and a last name.

If you do want users sans names, then the code that resulted in the original backtrace should be updated to not assume that that the user will have a first name.