devedse / DeveLanCacheUI_Backend

A UI for Lan Cache
MIT License
33 stars 0 forks source link

Latest update breaks front end use. #49

Closed slimshizn closed 1 month ago

slimshizn commented 5 months ago

Unhandled error when trying to view Latest Downloads and Steam Latest Downloads. Download Stats continues to work.

slimshizn commented 5 months ago

1.0.90 Still works here https://hub.docker.com/r/devedse/develancacheui_backend/tags

devedse commented 3 months ago

I'll try to look into this in the near future :) because it still seems to "work on my machine"

devedse commented 3 months ago

@slimshizn Can you maybe share both the docker logs of the backend/frontend and the F12 console output in the browser?

slimshizn commented 3 months ago

I have reverted back so all is well. I'll update again and upload logs in the next day or two.

devedse commented 3 months ago

If you want we should probably meet on discord or so to investigate what's going wrong. Else it kinda remains a guessing game.

devedse commented 3 months ago

What you can also try is remove your database and let the backend re-run through your logs.

C0NTi commented 2 months ago

I was having the exact same issues as 'slimshizn' - Only download stats working

I tried the suggestion of reverting to a 1.0.90 version and it worked immediately. So thanks @slimshizn for the temp workaround

SilverDrag0n1 commented 2 months ago

What you can also try is remove your database and let the backend re-run through your logs.

Sorry it's taken me awhile to reply, I tried to do this but got lost, where is the database located. I also tried deleting it and running 1.0.9 but it didn't work for me.

devedse commented 2 months ago

What you can also try is remove your database and let the backend re-run through your logs.

Sorry it's taken me awhile to reply, I tried to do this but got lost, where is the database located. I also tried deleting it and running 1.0.9 but it didn't work for me.

The database is located here: image

If you first stop the container, then throw that away. If you then restart the container, it should then re-read all the logs and recreate the database.

SilverDrag0n1 commented 2 months ago

Awesome I will see if I can find that - I run unraid and this is what I can see in where the files are located. image I've looked in "depotdir" but that's an empty folder - is there another way to locate that folder?

mkulina commented 2 months ago

I am also on unraid and only download stats load. Depot Version value is empty/null on the front end.

image

image

devedse commented 2 months ago

Hmm it's an error about CORS.

Can you click on the link in the error and see if that works?

mkulina commented 2 months ago

@devedse Just reproduces the 500. image

devedse commented 2 months ago

What do the docket logs show at this point?

mkulina commented 2 months ago

Here is what I see when I click the logs in docker to open a window in unraid.

fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HN6EJGRNKLUA", Request id "0HN6EJGRNKLUA:00000006": An unhandled exception was thrown by the application. System.ArgumentException: An item with the same key has already been added. Key: 17020 at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](TSource[] source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector) at DeveLanCacheUI_Backend.Services.OriginalDepotEnricher.SteamApi.<>c.<.cctor>b7_0() in /src/DeveLanCacheUI_Backend/Services/OriginalDepotEnricher/SteamApi.cs:line 5 at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy1.CreateValue() at DeveLanCacheUI_Backend.Services.OriginalDepotEnricher.SteamApi.get_SteamAppDict() in /src/DeveLanCacheUI_Backend/Services/OriginalDepotEnricher/SteamApi.cs:line 9 at DeveLanCacheUI_Backend.Services.OriginalDepotEnricher.OriginalSteamAppObtainerService.GetSteamAppById(Nullable`1 steamAppId) in /src/DeveLanCacheUI_Backend/Services/OriginalDepotEnricher/OriginalSteamAppObtainerService.cs:line 7 at DeveLanCacheUI_Backend.Controllers.DownloadEventsController.<>cDisplayClass6_0.b12(IGrouping2 group) in /src/DeveLanCacheUI_Backend/Controllers/DownloadEventsController.cs:line 90 at System.Linq.Enumerable.SelectEnumerableIterator2.ToList() at DeveLanCacheUI_Backend.Controllers.DownloadEventsController.GetFilteredBySkipAndCountInternal(Int32 skip, Int32 count, String filter) in /src/DeveLanCacheUI_Backend/Controllers/DownloadEventsController.cs:line 62 at lambda_method270(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) 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.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HN6EJGRNKLUA", Request id "0HN6EJGRNKLUA:00000007": An unhandled exception was thrown by the application. System.ArgumentException: An item with the same key has already been added. Key: 17020 at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](TSource[] source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector) at DeveLanCacheUI_Backend.Services.OriginalDepotEnricher.SteamApi.<>c.<.cctor>b__7_0() in /src/DeveLanCacheUI_Backend/Services/OriginalDepotEnricher/SteamApi.cs:line 5 at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy1.CreateValue() at DeveLanCacheUI_Backend.Services.OriginalDepotEnricher.SteamApi.get_SteamAppDict() in /src/DeveLanCacheUI_Backend/Services/OriginalDepotEnricher/SteamApi.cs:line 9 at DeveLanCacheUI_Backend.Services.OriginalDepotEnricher.OriginalSteamAppObtainerService.GetSteamAppById(Nullable1 steamAppId) in /src/DeveLanCacheUI_Backend/Services/OriginalDepotEnricher/OriginalSteamAppObtainerService.cs:line 7 at DeveLanCacheUI_Backend.Controllers.DownloadEventsController.<>cDisplayClass6_0.b12(IGrouping2 group) in /src/DeveLanCacheUI_Backend/Controllers/DownloadEventsController.cs:line 90 at System.Linq.Enumerable.SelectEnumerableIterator2.ToList() at DeveLanCacheUI_Backend.Controllers.DownloadEventsController.GetFilteredBySkipAndCountInternal(Int32 skip, Int32 count, String filter) in /src/DeveLanCacheUI_Backend/Controllers/DownloadEventsController.cs:line 62 at lambda_method280(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, 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.gAwaited|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.gAwaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: DeveLanCacheUI_Backend.LogReading.LanCacheLogReaderHostedService[0] 09/07/2024 18:06:46 No new log lines, waiting...

C0NTi commented 1 month ago

I added the following to my docker compose

environment:

now it works fine. I was also getting the cors error

mkulina commented 1 month ago

I added the following to my docker compose

environment: - AllowedHosts=*

now it works fine. I was also getting the cors error

This resolved it for me as well!

devedse commented 1 month ago

Sick shit guys, I'll add it to the readme :smile: