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

Web Client - Unable to move from Personal Vault to Organization Collection - sqlite #5177

Open
1 task done
timothevs opened this issue Dec 21, 2024 · 1 comment
Open
1 task done
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@timothevs
Copy link

Steps To Reproduce

This works fine on the Bitwarden Desktop App, but not on the latest 2024.12.0 Bitwarden Web Client.

  1. Go to 'a personal vault item - card, login, note'
  2. Click on 'Assign to Collection - Organization/Collection name'

Expected Result

Item is assigned to the organization and the collection selected.

Actual Result

An error has occurred.
An unhandled server error has occurred.

Screenshots or Videos

No response

Additional Context

This is the log from the api.log

2024-12-21 03:33:19.430 +00:00 [ERR] SQLite Error 19: 'UNIQUE constraint failed: Cipher.Id'.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'UNIQUE constraint failed: Cipher.Id'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
   at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at LinqToDB.Data.DataConnection.ExecuteNonQueryAsync(CancellationToken cancellationToken)
   at LinqToDB.Data.DataConnection.ExecuteNonQueryAsync(CancellationToken cancellationToken)
   at LinqToDB.Data.DataConnection.ExecuteNonQueryDataAsync(CancellationToken cancellationToken)
   at LinqToDB.Data.DataConnection.ExecuteNonQueryDataAsync(CancellationToken cancellationToken)
   at LinqToDB.Data.CommandInfo.ExecuteAsync(CancellationToken cancellationToken)
   at LinqToDB.Data.CommandInfo.ExecuteAsync(CancellationToken cancellationToken)
   at LinqToDB.DataProvider.MultipleRowsHelper.ExecuteAsync(CancellationToken cancellationToken)
   at LinqToDB.DataProvider.BasicBulkCopy.MultipleRowsCopyHelperAsync(MultipleRowsHelper helper, IEnumerable source, String from, Action`1 prepFunction, Action`3 addFunction, Action`1 finishFunction, CancellationToken cancellationToken, Int32 maxParameters, Int32 maxSqlLength)
   at LinqToDB.EntityFrameworkCore.LinqToDBForEFTools.BulkCopyAsync[T](DbContext context, BulkCopyOptions options, IEnumerable`1 source, CancellationToken cancellationToken)
   at Bit.Infrastructure.EntityFramework.Vault.Repositories.CipherRepository.UpdateCiphersAsync(Guid userId, IEnumerable`1 ciphers) in /source/src/Infrastructure.EntityFramework/Vault/Repositories/CipherRepository.cs:line 775
   at Bit.Core.Vault.Services.CipherService.ShareManyAsync(IEnumerable`1 cipherInfos, Guid organizationId, IEnumerable`1 collectionIds, Guid sharingUserId)
   at Bit.Api.Vault.Controllers.CiphersController.PutShareMany(CipherBulkShareRequestModel model) in /source/src/Api/Vault/Controllers/CiphersController.cs:line 901
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   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.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Githash Version

c507058-dirty

Environment Details

Docker, using sqlite.

Database Image

Sqlite

Issue-Link

#2480

Issue Tracking Info

  • 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.
@timothevs timothevs added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels Dec 21, 2024
@timothevs timothevs changed the title Bitwarden Web Client - Unable to move from Personal Vault to Organization Collection Web Client - Unable to move from Personal Vault to Organization Collection - sqlite Dec 21, 2024
@sso-bitwarden
Copy link

Hi there,

Thank you for your report!

I was able to reproduce this issue, and I have flagged this to our engineering team.

If you wish to add any further information/screenshots/recordings etc., please feel free to do so at any time - our engineering team will be happy to review these.

Thanks once again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

3 participants