-
Notifications
You must be signed in to change notification settings - Fork 560
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
[BUG] Error ExceptionMiddleware #4498
Comments
I am not sure how to reproduce this issue. The Oqtane line of code with the exception is line 224 in ModuleDefinitionRepository.cs: serverState.Assemblies.Insert(0, assembly.Trim()); which is basically adding any Dependencies which have been defined in the IModule interface to a List which can be used when running on WebAssembly so that it knows which DLLs need to be downloaded to the client browser. I am not sure how adding an item to a standard List can result in "Destination array was not long enough"? Do you have custom modules where you are defining Dependencies? Is this only happening in development, or also in production? Are you able to put a breakpoint on this line of code to determine which assembly is triggering the error? |
this maybe a race condition issue that the ProcessModuleDefinitions called in the same time, but the code is not thread safe. |
@zyhfish the TenantMiddleware has the following logic to handle the first request to a site:
and InitializeSite uses a lock to ensure the logic is only executed once:
this is where the module assemblies list is initialized. |
Hi @sbwalker , |
fix #4498 build ServerState Assemblies collection in a more thread safe manner
Oqtane Info
Version - 5.2.0
Render Mode - interactive
Interactivity - Server
Database - SQL Server
Describe the bug
Receive a lot of error log emails but seems intermittent.
The log:
The exception
The text was updated successfully, but these errors were encountered: