ssrdio / SecureBank

MIT License
57 stars 18 forks source link

Docker compose up and docker run error #4

Closed Barriuso closed 3 months ago

Barriuso commented 3 months ago

Good morning,

I have tried the docker run and docker compose are not working at this moment.

fail: StoreAPI.DAL.DBInitializer[0] storeapi | An error occurred while seeding the database. storeapi | System.TypeInitializationException: The type initializer for 'Microsoft.EntityFrameworkCore.EnumerableMethods' threw an exception. storeapi | ---> System.InvalidOperationException: Sequence contains more than one matching element storeapi | at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException() storeapi | at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable1 source, Func2 predicate, Boolean& found) storeapi | at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate) storeapi | at Microsoft.EntityFrameworkCore.EnumerableMethods..cctor() storeapi | --- End of inner exception stack trace --- storeapi | at Microsoft.EntityFrameworkCore.EnumerableMethods.get_AnyWithPredicate() storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.AllAnyToContainsRewritingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) storeapi | at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) storeapi | at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) storeapi | at Microsoft.EntityFrameworkCore.Query.QueryTranslationPreprocessor.Process(Expression query) storeapi | at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) storeapi | at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async) storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_01.<Execute>b__0() storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func1 compiler) storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func1 compiler) storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) storeapi | at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) storeapi | at System.Linq.Queryable.Any[TSource](IQueryable1 source) storeapi | at StoreAPI.DAL.DBInitializer.InitializeDatabase(IApplicationBuilder app) in /app/DAL/DBInitializer.cs:line 56

GregorSpagnolo commented 3 months ago

The issue has been resolved & a new Docker image has been pushed.