jakeswenson / BitBetter

Modify bit warden to provide my own licensing for self hosting
500 stars 112 forks source link

Can't add new password #120

Closed MaximilianKindshofer closed 2 years ago

MaximilianKindshofer commented 2 years ago

I just upgraded to the newest Version (1.43.0) and now I can't add passwords due to Internal Server Errors

captainhook commented 2 years ago

I don't believe this is BitBetter related but you'll need to provide some useful information for anyone to assist you with this issue - logs would be a good start.

MaximilianKindshofer commented 2 years ago

Thanks for your Time! I am not sure if this is a BitBetter related Issue, but I guessed I try here first - since Its modifying the Bitwarden Server

So here is a fresh log of the error:

2021-10-12 12:34:13.764 +00:00 [Error] Procedure or function 'CipherDetails_Create' expects parameter '@Reprompt', which was not supplied. System.Data.SqlClient.SqlException (0x80131904): Procedure or function 'CipherDetailsCreate' expects parameter '@Reprompt', which was not supplied. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader() at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at Dapper.SqlMapper.ExecuteImplAsync(IDbConnection cnn, CommandDefinition command, Object param) in //Dapper/SqlMapper.Async.cs:line 678 at Bit.Core.Repositories.SqlServer.CipherRepository.CreateAsync(CipherDetails cipher) at Bit.Core.Services.CipherService.SaveDetailsAsync(CipherDetails cipher, Guid savingUserId, Nullable1 lastKnownRevisionDate, IEnumerable1 collectionIds, Boolean skipPermissionCheck) at Bit.Api.Controllers.CiphersController.Post(CipherRequestModel model) in /home/runner/work/server/server/src/Api/Controllers/CiphersController.cs:line 128 at lambda_method(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.gAwaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) ClientConnectionId:2d609d2a-e6d0-473b-8490-3372140f9610 Error Number:201,State:4,Class:16

I found a related reddit post here: https://www.reddit.com/r/Bitwarden/comments/ot69uc/cant_edit_nor_store_new_credentials_at_bitwarden/

"The issue was caused because the docker compose override file was sticked to version 1.38.4. Now already updated."

This does not seem to be the case on my sever:

1e14c64219e8 bitwarden/nginx:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 80/tcp, 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp bitwarden-nginx bc82aa6bc860 bitwarden/admin:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-admin 325eb8ff9387 bitwarden/portal:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-portal a28425edf390 bitwarden/icons:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-icons 0a7d8e16ffa7 c701ffc94ece "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-api a56fcb909715 21aab725f61f "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-identity 00e238e6e5c1 bitwarden/web:2.23.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) bitwarden-web 7a5c208fce50 bitwarden/notifications:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-notifications 834eca3ee8fe bitwarden/sso:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-sso 5f30fd48698e bitwarden/mssql:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) bitwarden-mssql 3e86985c0ce8 bitwarden/attachments:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) bitwarden-attachments ca57fb80cd86 bitwarden/events:1.43.0 "/entrypoint.sh" 6 days ago Up 18 hours (healthy) 5000/tcp bitwarden-events

jakeswenson commented 2 years ago

I'm no longer self-hosting Bitwarden but this error indicates that your database is out of sync with the version of Bitwarden you're running.

[Error] Procedure or function 'CipherDetails_Create' expects parameter '@Reprompt', which was not supplied.
System.Data.SqlClient.SqlException (0x80131904): Procedure or function 'CipherDetails_Create' expects parameter '@Reprompt', which was not supplied.

(i.e. a stored proc in your DB has a parameter that the code is no longer sending.)

@MaximilianKindshofer hopefully that gives you something to look into. (Seems like a database migration either wasn't run or failed during your version update.)

MaximilianKindshofer commented 2 years ago

Hi @jakeswenson thanks for your reply - is there a way to trigger a rerun of the migrations? Or better which course of actions should I take. This is a bit over my head here.

Since you are no longer self-hosting Bitwarden, what are you using instead or did you move to their paid plans?

JeffAlyanak commented 2 years ago

@MaximilianKindshofer For what it's worth, many former contributors to BitBetter, myself included, have switched to Vaultwarden.

MaximilianKindshofer commented 2 years ago

Hi Jeff, I switched yesterday. Works really good. Just a little wistful. Always liked BitBetter. It is a great project