Skip to content

Commit

Permalink
docs(service-bff): Bff trouble shooting guide (#17178)
Browse files Browse the repository at this point in the history
* bff trouble shooting guide

* Remove comma from text
  • Loading branch information
snaerth authored Dec 11, 2024
1 parent 0423040 commit 7dce5d8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
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.

- 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.

0 comments on commit 7dce5d8

Please sign in to comment.