Skip to content

troubleshooting

Ratstail91 edited this page Dec 23, 2023 · 9 revisions

Troubleshooting

Sometimes, not everything goes according to plan. I'm writing up as many issues as I can here, but if you encounter something that isn't covered, please let me know.

Deploying the project didn't work?

Try again. There are occasionally timing issues between the different containers. If it still doesn't work after 3-ish attempts, keep reading.

Sequelize throws an error that a certain field is missing?

If you just upgraded the template, try checking if any changes to the sequelize models have occurred. If so, you'll have to go into the mariaDB container and alter the database directly (there might be a migration script in the release notes).

I accidentally removed all admin privileges, and now I can't login!

When there are 0 accounts with administrator privileges, the auth-server will try to create the default admin account (if details for it have been specified) and when it fails, it crashes. You'll have to mess with auth's database to fix it.

Run the following command on the same machine as the database container:

docker exec -it <database_container_name> bash

This will open a bash program inside the container. From here, you can access mariaDB and alter the database:

mysql -u root -p

Enter the root password, then run the following commands to restore the admin privileges:

USE auth;
UPDATE accounts SET privilege = 'administrator' WHERE username = 'admin';

Then just keep typing "exit" to exit the program. This assumes that you want to restore privileges to the "admin" account - you can of course grant it to whoever you need to.

The auth-server should start normally now (during a normal startup process).

The email validation/password reset link doesn't work!

This is because the validation/password reset link usually uses HTTPS protocol, try changing it to HTTP protocol when signing up during development. When developing locally, there might also be problems after clicking the link - make sure it's pointing to localhost:3200.

I added a new microservice to the template, but it's database wasn't created!

That's because startup.sql is only run automatically the FIRST time, for some strange reason. You'll have to go into the MariaDB docker container and run it manually.

The auth-server won't login to google!

Google has recently removed the ability to use plaintext passwords with less secure apps enabled - read this link for more information on how to generate an "app password".

None of These Answers My Questions!

That's OK! Please contact me directly at [email protected] and I'll try my best to help you out.

Please don't keep quiet about your issues - letting me know about them will help me improve the whole project!