Repository navigation
Fix: provide LoginTokenService to McpServerModule (hotfix for cloud outage) - #201
Merged
Merged
Conversation
McpServerModule registers its own copy of RestEngine and GraphqlEngine as providers. After the Sorare PR added LoginTokenService as a constructor dependency of both engines, McpServerModule could no longer resolve them, causing UnknownDependenciesException at startup and an unhealthy app container. Adding LoginTokenService to McpServerModule's providers (alongside the existing OAuth2TokenService) fixes the startup crash. This is the root cause of the cloud outage following PR #199.
keysersoft
added a commit
that referenced
this pull request
May 18, 2026
keysersoft
added a commit
that referenced
this pull request
May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
`McpServerModule` registers its own copy of `RestEngine` and `GraphqlEngine` as providers (separate from `ConnectorsModule`'s registration). After PR #199 added `LoginTokenService` as a constructor dependency of both engines, `McpServerModule` could no longer resolve them — Nest throws `UnknownDependenciesException` at startup, the backend never reaches the `/health` endpoint, the container is killed by the unhealthy probe, and the cloud goes down.
Logs from `amcp-cloud-app`:
```
ERROR [ExceptionHandler] UnknownDependenciesException [Error]: Nest can't resolve dependencies of the RestEngine (OAuth2TokenService, ?). Please make sure that the argument LoginTokenService at index [1] is available in the McpServerModule module.
```
Fix
Add `LoginTokenService` to `McpServerModule`'s providers list, alongside the existing `OAuth2TokenService`. One-line change.
Test plan