Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(service-bff): Bff trouble shooting guide #17178

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/services/bff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
37 changes: 37 additions & 0 deletions apps/services/bff/TROUBLESHOOT_GUIDE.md
Original file line number Diff line number Diff line change
@@ -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.

snaerth marked this conversation as resolved.
Show resolved Hide resolved
- 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.

snaerth marked this conversation as resolved.
Show resolved Hide resolved
- 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.
Loading