bitwarden / bitwarden/server

Login fails with SQLite when BW_ENABLE_EVENTS=false on v2026.3.2

Open
#7,472 8 comments 0 reactions 0 assignees View on GitHub
bug bw-lite-deploy
Dominant language
C#
Stars
20.1k
Forks
1.8k
Avg merge
4d 8h
Merged PRs (30d)
75

Description

### Steps To Reproduce

## Description
After upgrading to ghcr.io/bitwarden/lite:2026.3.2, login fails with an unhandled exception even when BW_ENABLE_EVENTS=false. The identity service crashes while trying to write a login event via EventRepository, which internally attempts to load System.Data.SQLite — an assembly not supported with the SQLite database provider.

The error occurs after successful credential validation, during the BuildSuccessResultAsync step. Disabling events via BW_ENABLE_EVENTS=false does not prevent the code path from being triggered.

Rolling back to ghcr.io/bitwarden/lite:2026.2.1 resolves the issue.

## Steps to reproduce
1. Deploy ghcr.io/bitwarden/lite:2026.3.2
2. Set BW_DB_PROVIDER=sqlite in settings.env
3. Set BW_ENABLE_EVENTS=false in settings.env
4. Attempt to log in to the Bitwarden web vault
5. Login fails with "An unexpected error has occurred"

### Expected Result

Login should succeed. When BW_ENABLE_EVENTS=false, no event logging code paths should be triggered during authentication.

### Actual Result

Login fails with the following exception in the identity service logs:

```
System.InvalidOperationException: Cannot load assembly System.Data.SQLite
at LinqToDB.DataProvider.SQLite.SQLiteProviderAdapter.CreateAdapter(...)
...
at Bit.Infrastructure.EntityFramework.Repositories.EventRepository.CreateManyAsync(...)
at Bit.Core.Services.EventService.LogUserEventAsync(...)
at Bit.Identity.IdentityServer.RequestValidators.BaseRequestValidator`1.BuildSuccessResultAsync(...)
```

### Screenshots or Videos

_No response_

### Additional Context

## Environment
Image: ghcr.io/bitwarden/lite:2026.3.2
Database: SQLite (BW_DB_PROVIDER=sqlite)
Platform: Kubernetes
BW_ENABLE_EVENTS: false
BW_ENABLE_SCIM: false
BW_ENABLE_SSO: false

Regression: works correctly on ghcr.io/bitwarden/lite:2026.2.1

### Githash Version

0e42725d

### Environment Details

_No response_

### Database Image

_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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.