bitwarden / bitwarden/self-host

Exception in api.log when trying to access Admin Console, Billing, Subscription

Open
#368 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
744
Forks
107
Avg merge
1d 9h
Merged PRs (30d)
7

Description

### Self-host installation scripts issue

- [x] I understand this repository only tracks self-host installation scripts and any other issues should be reported in bitwarden/server

### Steps To Reproduce

Exception in api.log when trying to access Admin Console, Billing, Subscription.
Page does not load.
Tried with 2025.3.1-beta, 2025.4.0-beta and latest dev tags.

```
fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0]
=> SpanId:e746cc826db93cbb, TraceId:4878e03a933a05d912b2ba9bbfd73762, ParentId:0000000000000000 => ConnectionId:0HNBVAKSB9RKM => RequestPath:/organizations/a528cc53-7de6-4afd-811d-b2bc00dd1232/subscription RequestId:0HNBVAKSB9RKM:00000001 => IpAddress:::ffff:127.0.0.1 UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0 DeviceType:12 Origin:12 ClientVersion:2025.3.1 => Bit.Api.Billing.Controllers.OrganizationsController.GetSubscription (Api)
Unable to resolve service for type 'Bit.Core.Billing.Repositories.IOrganizationInstallationRepository' while attempting to activate 'Bit.Api.Billing.Controllers.OrganizationsController'.
System.InvalidOperationException: Unable to resolve service for type 'Bit.Core.Billing.Repositories.IOrganizationInstallationRepository' while attempting to activate 'Bit.Api.Billing.Controllers.OrganizationsController'.
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ThrowHelperUnableToResolveService(Type type, Type requiredBy)
at lambda_method1447(Closure, IServiceProvider, Object[])
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
```

### Expected Result

Page should load without exception in logs.

### Actual Result

Page does not load.

### Screenshots or Videos

_No response_

### Additional Context

_No response_

### Build Version

2025.4.0-beta

### Environment

Self-Hosted

### Environment Details

_No response_

### Issue Tracking Info

- [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Contributor guide

Open the contributing guide

Research direction

Start with the self-host installation scripts and the /organizations/{id}/subscription request, then trace the api.log failure from OrganizationsController.GetSubscription to IOrganizationInstallationRepository. Coordinate with bitwarden/server as noted in the issue; done means Admin Console, Billing, and Subscription pages load without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, shell
Domain
api, backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.