Webreaper / Damselfly

Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
GNU General Public License v3.0
1.46k stars 76 forks source link

An unhandled exception was thrown by the application #455

Open whoopn opened 1 year ago

whoopn commented 1 year ago

I'm getting this error when I first access the GUI:

image

Logs show only this one error during this time (logging is on default):

14:11:18.675 | ERR | Connection id "0HMMKO31IDFA0", Request id "0HMMKO31IDFA0:0000007F": An unhandled exception was thrown by the application -- | -- | --

Have you encountered this before?

Webreaper commented 1 year ago

Haven't seen that. Can you send me the full log file?

If you refresh the page, does it sort itself out?

whoopn commented 1 year ago

Additional information: The folder sidebar doesn't load either. Just stays at loading.

To answer your question, no reloading does not help.

Damselfly-20221203.log

whoopn commented 1 year ago

Ok more information if it helps:

When I just went to add a user through the desktop app (happens in browser too) I received this error:

System.NullReferenceException: Arg_NullReferenceException at Damselfly.Web.Client.Shared.UserManagement.OpenUserDialog(AppIdentityUser user) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )

whoopn commented 1 year ago

I'm using Unraid 6.11.5 for the server side, its actively scanning.

Webreaper commented 1 year ago

The first exception is this, I know the cause of this. I'll look at a fix in the next couple of days when I get time.

An unhandled exception was thrown by the application. System.Text.Json.JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 32. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. Path: $.Children.Children.Children.Children.Children.Children.Children.Children.Children.Subfolders. at System.Text.Json.ThrowHelper.

On Sat, 3 Dec 2022, 21:25 whoopn, @.***> wrote:

I'm using Unraid 6.11.5 for the server side, its actively scanning.

Also, I just noticed the db is sitting on a spinning drive, I'm going to move that over to the cache drive.

— Reply to this email directly, view it on GitHub https://github.com/Webreaper/Damselfly/issues/455#issuecomment-1336260823, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFMR3TMOZAK2OMN53BTUI3WLO3CZANCNFSM6AAAAAASS6EZAU . You are receiving this because you commented.Message ID: @.***>

Webreaper commented 1 year ago

Can you try pulling webreaper/damselfly:dev and tell me if it solves the issue?

whoopn commented 1 year ago

Can you try pulling webreaper/damselfly:dev and tell me if it solves the issue?

It would appear it did fix the bottom of the screen error but now I am seeing this (only once and reloading did help):

System.Net.Http.HttpRequestException: net_http_message_not_success_statuscode, 500, Internal Server Error at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at System.Net.Http.Json.HttpClientJsonExtensions.<GetFromJsonAsyncCore>d__291[[Damselfly.Core.Models.Basket, Damselfly.Core.DbModels, Version=4.0.1.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Damselfly.Core.ScopedServices.ClientServices.RestClient.d__81[[Damselfly.Core.Models.Basket, Damselfly.Core.DbModels, Version=4.0.1.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Damselfly.Core.ScopedServices.ClientBasketService.SwitchToDefaultBasket(Nullable1 userId) at Damselfly.Web.Client.Shared.BasketManager.OnInitializedAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )`

I have to say the folder view working is really nifty! When do you think this commit will be released?

Webreaper commented 1 year ago

I'll have a look at the exception above, but will put out a small patch with the change now that fixed you, so you can switch to the non-develop image. :)

whoopn commented 1 year ago

Awesome! Thanks for patching that up so fast!

I like how focused on the real needs of a photo server your project is. Thank you!