Clear-Bible / ClearDashboard

The ClearDashboard project
Other
1 stars 2 forks source link

[BUG]: Collab Import Error #1321

Open GeoDirk opened 4 months ago

GeoDirk commented 4 months ago

Description:

A user who has a project with active modification to the glosses is throwing the following Collab Import error:

Creating database...
Adding snapshot users and project to database
Adding current user to database
Creating/loading project snapshots for merge
Calculating differences in latest commit
Starting merge...
Merging delete activity ...
Merging delete activity ...
Merging create/modify activity ... Users, Lexicon, Corpora, and Tokenized Corpora
Inserted Lexicon_Lexeme having name 'Unknown' and id 'Lexeme_YV9udWpf'
Inserting Meanings children for Lexicon_Lexeme 'Lexeme_YV9udWpf'
Inserted Lexicon_Lexeme having name 'Unknown' and id 'Lexeme_bGFnaXJfbnVqXw=='
Inserting Meanings children for Lexicon_Lexeme 'Lexeme_bGFnaXJfbnVqXw=='
Inserted Lexicon_Lexeme having name 'Unknown' and id 'Lexeme_YV9sYWdpcl9hX251al8='
Inserting Meanings children for Lexicon_Lexeme 'Lexeme_YV9sYWdpcl9hX251al8='
Merging create/modify activity ... Users, Lexicon, Corpora, and Tokenized Corpora
Unable to initialize database for project '888dcb04-ef95-4ea7-b6ea-0b56fed5e8e0', commit '88e3fdf6404507fcb0751e11eaeac2cddea37b12':  exception type: PropertyResolutionException, having message: Unable to decode Lexeme Ref Lexeme_YV9sYWdpcl9hX251al8=
Exception thrown attempting to initialize project database: Unable to initialize database for project '888dcb04-ef95-4ea7-b6ea-0b56fed5e8e0', commit '88e3fdf6404507fcb0751e11eaeac2cddea37b12':  exception type: PropertyResolutionException, having message: Unable to decode Lexeme Ref Lexeme_YV9sYWdpcl9hX251al8=

Steps To Reproduce:

2024-06-04 09:22:05.140 -04:00 [Information] [ClearDashboard.DataAccessLayer.Data.ProjectDbContext] Migration required, migrating...
2024-06-04 09:22:06.680 -04:00 [Information] [ClearDashboard.DataAccessLayer.Data.ProjectDbContext] Check to migrate database complete
2024-06-04 09:22:06.702 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Opening database connection and starting transaction
2024-06-04 09:22:06.706 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type User
2024-06-04 09:22:06.711 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'User' having id '3cc0db76-23a2-4d1d-95a1-3e62728d9b02'
2024-06-04 09:22:06.717 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'User'
2024-06-04 09:22:06.718 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Project
2024-06-04 09:22:06.720 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Project' having id '888dcb04-ef95-4ea7-b6ea-0b56fed5e8e0'
2024-06-04 09:22:06.723 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'Project'
2024-06-04 09:22:10.502 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Lexicon_Lexeme
2024-06-04 09:22:10.504 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Lexicon_Lexeme' having id 'Lexeme_YV9udWpf'
2024-06-04 09:22:10.506 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'Lexicon_Lexeme'
2024-06-04 09:22:10.508 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Inserted Lexicon_Lexeme having id 'Lexeme_YV9udWpf'
2024-06-04 09:22:10.511 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Inserting Meanings children for Lexicon_Lexeme 'Lexeme_YV9udWpf'
2024-06-04 09:22:10.513 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Lexicon_Meaning
2024-06-04 09:22:10.515 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Lexicon_Meaning' having id 'Meaning_TmV3IE1lYW5pbmdfZW4='
2024-06-04 09:22:10.531 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Converted Lexeme Lemma ('a') / Language ('nuj') / Type ('') to LexemeId ('1df34e3a-bd30-4fd6-a196-5cad81c316a0')
2024-06-04 09:22:10.533 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'Lexicon_Meaning'
2024-06-04 09:22:10.539 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completed inserting 1 Meanings children for Lexicon_Lexeme 'Lexeme_YV9udWpf'
2024-06-04 09:22:10.540 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Lexicon_Lexeme
2024-06-04 09:22:10.542 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Lexicon_Lexeme' having id 'Lexeme_bGFnaXJfbnVqXw=='
2024-06-04 09:22:10.543 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'Lexicon_Lexeme'
2024-06-04 09:22:10.545 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Inserted Lexicon_Lexeme having id 'Lexeme_bGFnaXJfbnVqXw=='
2024-06-04 09:22:10.546 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Inserting Meanings children for Lexicon_Lexeme 'Lexeme_bGFnaXJfbnVqXw=='
2024-06-04 09:22:10.548 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Lexicon_Meaning
2024-06-04 09:22:10.549 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Lexicon_Meaning' having id 'Meaning_TmV3IE1lYW5pbmdfZW4='
2024-06-04 09:22:10.553 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Converted Lexeme Lemma ('lagir') / Language ('nuj') / Type ('') to LexemeId ('cfafbc0b-dee3-4700-8d76-fb6a297ad2fb')
2024-06-04 09:22:10.554 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'Lexicon_Meaning'
2024-06-04 09:22:10.556 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completed inserting 1 Meanings children for Lexicon_Lexeme 'Lexeme_bGFnaXJfbnVqXw=='
2024-06-04 09:22:10.557 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Lexicon_Lexeme
2024-06-04 09:22:10.559 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Lexicon_Lexeme' having id 'Lexeme_YV9sYWdpcl9hX251al8='
2024-06-04 09:22:10.560 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Completing (disposing) insert command for model type:  'Lexicon_Lexeme'
2024-06-04 09:22:10.562 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Inserted Lexicon_Lexeme having id 'Lexeme_YV9sYWdpcl9hX251al8='
2024-06-04 09:22:10.563 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Inserting Meanings children for Lexicon_Lexeme 'Lexeme_YV9sYWdpcl9hX251al8='
2024-06-04 09:22:10.564 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Creating insert command for model type Lexicon_Meaning
2024-06-04 09:22:10.566 -04:00 [Debug] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Running insert command for model type:  'Lexicon_Meaning' having id 'Meaning_TmV3IE1lYW5pbmdfZW4='
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in ClearDashboard.Collaboration.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
2024-06-04 09:22:10.758 -04:00 [Error] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Exception thrown in handler 'InitializeDatabaseCommandHandler'
ClearDashboard.Collaboration.Exceptions.PropertyResolutionException: Unable to decode Lexeme Ref Lexeme_YV9sYWdpcl9hX251al8=
   at ClearDashboard.Collaboration.Builder.GeneralModelBuilder`1.DecodeRefToParts(String refPrefixNoUnderscore, String refValue, Int32 expectedNumberOfParts) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Builder\GeneralModelBuilder.cs:line 255
   at ClearDashboard.Collaboration.Builder.LexiconBuilder.DecodeLexemeRef(String lexemeRef) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Builder\LexiconBuilder.cs:line 120
   at ClearDashboard.Collaboration.Merge.LexiconHandler.LexemeRefToLexemeId(IModelSnapshot modelSnapshot, ProjectDbContext projectDbContext, MergeCache cache, ILogger logger) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\LexiconHandler.cs:line 286
   at ClearDashboard.Collaboration.Merge.LexiconHandler.<>c.<<-ctor>b__6_2>d.MoveNext() in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\LexiconHandler.cs:line 139
--- End of stack trace from previous location ---
   at ClearDashboard.Collaboration.Merge.MergeBehaviorApply.RunEntityValueResolverAsync(IModelSnapshot modelSnapshot, String propertyName, EntityValueResolverAsync propertyValueConverter) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\MergeBehaviorApply.cs:line 191
   at ClearDashboard.Collaboration.Merge.MergeBehaviorBase.AddModelSnapshotParametersToInsertCommand(DbCommand command, IModelSnapshot modelSnapshot) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\MergeBehaviorBase.cs:line 169
   at ClearDashboard.Collaboration.Merge.MergeBehaviorApply.RunInsertModelCommand(IModelSnapshot itemToCreate, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\MergeBehaviorApply.cs:line 145
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.HandleCreateAsync(T itemToCreate, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\DefaultMergeHandler.cs:line 203
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.CreateListItemsAsync(IEnumerable`1 snapshotList, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\DefaultMergeHandler.cs:line 359
   at CallSite.Target(Closure, CallSite, Object)
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.HandleCreateChildrenAsync(T parentSnapshot, CancellationToken cancellationToken)
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.CreateListDifferencesAsync(IListDifference`1 listDifference, IEnumerable`1 currentSnapshotList, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\DefaultMergeHandler.cs:line 98
   at ClearDashboard.Collaboration.Merge.Merger.CreateListDifferencesAsync[T](IListDifference`1 listDifference, IEnumerable`1 currentSnapshotList, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\Merger.cs:line 117
   at ClearDashboard.Collaboration.Merge.Merger.MergeAsync(ProjectDifferences differencesToApply, ProjectSnapshot currentSnapshot, ProjectSnapshot targetCommitSnapshot, ProjectSnapshot previousCommitSnapshot, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\Merger.cs:line 65
   at ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler.Handle(InitializeDatabaseCommand request, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Features\InitializeDatabaseCommandHandler.cs:line 106
2024-06-04 09:22:10.767 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Rolling back transaction
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
2024-06-04 09:22:10.781 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Disposing DbCommand ClearDashboard.DataAccessLayer.Models.Lexicon_Meaning (async)
2024-06-04 09:22:10.783 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Disposing transaction (async)
2024-06-04 09:22:10.784 -04:00 [Information] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Disposing connection (async)
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.Collaboration.Exceptions.PropertyResolutionException' in System.Private.CoreLib.dll
2024-06-04 09:22:10.813 -04:00 [Error] [ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler] Exception thrown in handler 'InitializeDatabaseCommandHandler'
ClearDashboard.Collaboration.Exceptions.PropertyResolutionException: Unable to decode Lexeme Ref Lexeme_YV9sYWdpcl9hX251al8=
   at ClearDashboard.Collaboration.Builder.GeneralModelBuilder`1.DecodeRefToParts(String refPrefixNoUnderscore, String refValue, Int32 expectedNumberOfParts) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Builder\GeneralModelBuilder.cs:line 255
   at ClearDashboard.Collaboration.Builder.LexiconBuilder.DecodeLexemeRef(String lexemeRef) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Builder\LexiconBuilder.cs:line 120
   at ClearDashboard.Collaboration.Merge.LexiconHandler.LexemeRefToLexemeId(IModelSnapshot modelSnapshot, ProjectDbContext projectDbContext, MergeCache cache, ILogger logger) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\LexiconHandler.cs:line 286
   at ClearDashboard.Collaboration.Merge.LexiconHandler.<>c.<<-ctor>b__6_2>d.MoveNext() in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\LexiconHandler.cs:line 139
--- End of stack trace from previous location ---
   at ClearDashboard.Collaboration.Merge.MergeBehaviorApply.RunEntityValueResolverAsync(IModelSnapshot modelSnapshot, String propertyName, EntityValueResolverAsync propertyValueConverter) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\MergeBehaviorApply.cs:line 191
   at ClearDashboard.Collaboration.Merge.MergeBehaviorBase.AddModelSnapshotParametersToInsertCommand(DbCommand command, IModelSnapshot modelSnapshot) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\MergeBehaviorBase.cs:line 169
   at ClearDashboard.Collaboration.Merge.MergeBehaviorApply.RunInsertModelCommand(IModelSnapshot itemToCreate, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\MergeBehaviorApply.cs:line 145
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.HandleCreateAsync(T itemToCreate, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\DefaultMergeHandler.cs:line 203
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.CreateListItemsAsync(IEnumerable`1 snapshotList, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\DefaultMergeHandler.cs:line 359
   at CallSite.Target(Closure, CallSite, Object)
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.HandleCreateChildrenAsync(T parentSnapshot, CancellationToken cancellationToken)
   at ClearDashboard.Collaboration.Merge.DefaultMergeHandler`1.CreateListDifferencesAsync(IListDifference`1 listDifference, IEnumerable`1 currentSnapshotList, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\DefaultMergeHandler.cs:line 98
   at ClearDashboard.Collaboration.Merge.Merger.CreateListDifferencesAsync[T](IListDifference`1 listDifference, IEnumerable`1 currentSnapshotList, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\Merger.cs:line 117
   at ClearDashboard.Collaboration.Merge.Merger.MergeAsync(ProjectDifferences differencesToApply, ProjectSnapshot currentSnapshot, ProjectSnapshot targetCommitSnapshot, ProjectSnapshot previousCommitSnapshot, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Merge\Merger.cs:line 65
   at ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler.Handle(InitializeDatabaseCommand request, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Features\InitializeDatabaseCommandHandler.cs:line 106
   at ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler.Handle(InitializeDatabaseCommand request, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Features\InitializeDatabaseCommandHandler.cs:line 121
   at ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler.Handle(InitializeDatabaseCommand request, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Features\InitializeDatabaseCommandHandler.cs:line 122
   at ClearDashboard.Collaboration.Features.InitializeDatabaseCommandHandler.Handle(InitializeDatabaseCommand request, CancellationToken cancellationToken) in D:\Projects-GBI\ClearDashboard\src\ClearDashboard.Collaboration\Features\InitializeDatabaseCommandHandler.cs:line 123
Exception thrown: 'ClearDashboard.DAL.Alignment.Exceptions.MediatorErrorEngineException' in ClearDashboard.DAL.Alignment.dll
Exception thrown: 'ClearDashboard.DAL.Alignment.Exceptions.MediatorErrorEngineException' in System.Private.CoreLib.dll
Exception thrown: 'ClearDashboard.DAL.Alignment.Exceptions.MediatorErrorEngineException' in System.Private.CoreLib.dll
The thread '[Thread Destroyed]' (27016) has exited with code 0 (0x0).
The thread '[Thread Destroyed]' (27024) has exited with code 0 (0x0).
The thread '[Thread Destroyed]' (24928) has exited with code 0 (0x0).
2024-06-04 09:22:53.417 -04:00 [Debug] [Microsoft.Extensions.Http.DefaultHttpClientFactory] HttpMessageHandler expired after 120000ms for client '"GitLabClient"'
2024-06-04 09:22:53.417 -04:00 [Debug] [Microsoft.Extensions.Http.DefaultHttpClientFactory] HttpMessageHandler expired after 120000ms for client '"CollaborationClient"'
2024-06-04 09:23:03.425 -04:00 [Debug] [Microsoft.Extensions.Http.DefaultHttpClientFactory] Starting HttpMessageHandler cleanup cycle with 2 items
2024-06-04 09:23:03.428 -04:00 [Debug] [Microsoft.Extensions.Http.DefaultHttpClientFactory] Ending HttpMessageHandler cleanup cycle after 0.0915ms - processed: 0 items - remaining: 2 items
2024-06-04 09:23:13.429 -04:00 [Debug] [Microsoft.Extensions.Http.DefaultHttpClientFactory] Starting HttpMessageHandler cleanup cycle with 2 items
2024-06-04 09:23:13.431 -04:00 [Debug] [Microsoft.Extensions.Http.DefaultHttpClientFactory] Ending HttpMessageHandler cleanup cycle after 0.009ms - processed: 0 items - remaining: 2 items

Found in Version:

1.4.1.4

Fixed in Version:

(Clear Dashboard version in which the bug was fixed.)

Test Cases:

(Linked Test Cases)

morleycb commented 4 months ago

Hey Dirk,

This is due to the same underlying issue as issue 1254. At the time my analysis was the following (this is for label groups, but the same concept applies to Lexemes):

The label group "ref" (like a non system specific id) "LabelGroup_RXh0ZXJuYWxfenpfU1VS" should get decoded into the actual label group name. I just did a super quick test to see what "RXh0ZXJuYWxfenpfU1VS" would get decoded into (using Encoding.UTF8.GetString(Convert.FromBase64String("RXh0ZXJuYWxfenpfU1VS"))) and it produces three parts: "External", "zz", "SUR". So I'm guessing that the label group name someone created is "External_zz_SUR".

So the bug here is that the collaboration code is using _ as a general purpose delimiter in these refs, not taking into account that one of the underlying values being encoded might contain an _ itself.

Here are few of relatively simple fix ideas off the top of my head:

  1. Tweak the label group create dialog to not allow underscore characters to be in a label group name
  2. Change the collaboration code to use a different delimiter that we know won't be in any label group, label, semantic domain, lexeme, meaning, lexicon translation, i.e. all the entity types that use this encode/decode logic.
    • I think the 'encode' and 'decode' methods used by all the specific entities are in a class called GeneralModelBuilder. This is a better long term fix, but any existing collaboration data already containing refs encoded using "_" won't be decodeable anymore. This secondary issue could be mitigated by implementing the decode method to have 'fallback' logic. E.g.
    • First try to decode using the new delimiter. If the resulting number of parts doesn't match what was expected, try the older "_" as the delimiter, and if neither match, throw the PropertyResolutionException.
  3. Change the decode logic for entity types that only have a single value contained in their 'ref' (i.e. label, label group and semantic domain): just simply don't call 'split' when the expected number of parts is 1. This approach could still leave a potential a future issue, though, with lexeme, meaning or lexicon translation if say a lexeme's lemma contains an "_" character. This would be super easy. Just change the existing var parts = decodedString.Split(delimiter); to something like var parts = (expectedNumberOfParts > 1) ? decodedString.Split(delimiter) : [ decodedString ];
morleycb commented 4 months ago

For that label group issue, Michael and Greg decided the following. Can/should this same approach be applied to Lexemes? Was this a manually created lexeme? (the decoded string for this error case was: "a_lagir_anuj", which I'm guessing breaks down into: "a_lagir" and "a_nuj"?)

[Michael] For this release, I think opting to not touch the collab code is the most pragmatic thing to do. The code I added to the label group and label editors does not allow the user to add the underscore character, meaning it is ignored if they type that character while those editors have focus.

Other than a documenting, it's a training issue. I don't think it's worth the effort to support underscores at all but that's my opinion.

[Greg] Makes sense and i appreciate the quick fix. sorry i glossed over the root of Chriss comment initially. I would agree that major surgery in collab isnt warranted in the future either. I'll ask dirk to document in the help guide and we move on.

morleycb commented 3 months ago

Fix currently in Issue808_collab branch.

Changed encode/decode delimiter from "" to "||". During decode, first "||" is attempted and if the resulting number of parts in correct, "" is tried. If neither results in the correct number of decoded parts, a PropertyResolutionException is thrown.