diff --git a/apps/services/bff/README.md b/apps/services/bff/README.md index a2c7452afc20..c02a7596717c 100644 --- a/apps/services/bff/README.md +++ b/apps/services/bff/README.md @@ -37,3 +37,7 @@ Runs tests with Jest and outputs coverage to `coverage/apps/services/bff`. ## Code owners and maintainers - [Aranja](https://github.com/orgs/island-is/teams/aranja/members) + +## Troubleshooting + +If you encounter any issues while setting up or running the BFF service, please refer to the [Troubleshooting Guide](TROUBLESHOOT_GUIDE.md) diff --git a/apps/services/bff/TROUBLESHOOT_GUIDE.md b/apps/services/bff/TROUBLESHOOT_GUIDE.md new file mode 100644 index 000000000000..c895b9793b41 --- /dev/null +++ b/apps/services/bff/TROUBLESHOOT_GUIDE.md @@ -0,0 +1,37 @@ +# BFF Service Troubleshooting Guide + +## Common Issues and Solutions + +- Make sure that you are running the `dev` script and not `start` script. For example when running the service portal you should run: + `yarn dev service-portal` and not `yarn start service-portal`. + +- Make sure to install dependencies and run code generation with the following command: + `yarn install && yarn codegen`. + +- Make sure to login to the correct AWS account and region: + + - Run `aws sso login --profile islandis-dev` to login to the correct AWS account. + +- Not necessary but a nice to have is to have Redis server running: + + - Run `yarn dev-services services-bff` to start Redis server. + - This is necessary if you want the sessions to persist. + +- Make sure that you are not running the same service twice, since you could already be running a service like API. + Lets take `yarn dev application-system-form` as an example. This script starts the following services: + + - `yarn get-secrets application-system-api` + - `yarn nx run application-system-api:dev-services` + - `yarn nx run application-system-api:migrate` + - `yarn nx codegen/backend-schema api` + - `yarn nx run services-user-profile:dev-init` + - `yarn nx run service-portal:start-bff` + - `yarn start application-system-form` + So make sure that you are not running the same service twice. + +- If you are running the service on Windows, we recommend using [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install) for running the services within the repo. + This is because all of the scripts generated by the `infra` package are not tested on Windows and may not work as expected. + +- On macOS, the AirPlay Receiver is listening on the same port as the Redis server, e.g. 7000. Either change the port or disable the AirPlay Receiver. + +- If everything fails, then a good old computer restart might do the trick.