sillsdev / sillsdev/languageforge-lexbox

The target location specified by path segment 'Abbreviation' was not found.

Open
#2,625 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Data bug
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

I think I got this exception, because my app was not up to date. I believe it's essentially the "Opaque change" scenario except for a known type, but unknown property, so needs some sort of special handling (e.g. model versioning?)

Error: SystemTextJsonPatch.Exceptions.JsonPatchException: The target location specified by path segment 'Abbreviation' was not found.

at SystemTextJsonPatch.Exceptions.ExceptionHelper.ThrowJsonPatchException(JsonPatchError jsonPatchError)
   at SystemTextJsonPatch.Internal.ErrorReporter.<>c.<.cctor>b__2_0(JsonPatchError error)
   at SystemTextJsonPatch.Adapters.ObjectAdapter.Add(String path, Object value, Object objectToApplyTo, Operation operation)
   at SystemTextJsonPatch.Operations.Operation`1.Apply(TModel objectToApplyTo, IObjectAdapter adapter)
   at LcmCrdt.Changes.JsonPatchChange`1.ApplyChange(T entity, IChangeContext context)
   at SIL.Harmony.Changes.Change`1.ApplyChange(IObjectBase entity, IChangeContext context)
   at SIL.Harmony.SnapshotWorker.ApplyCommitChanges(SortedSet`1 commits)
   at SIL.Harmony.SnapshotWorker.UpdateSnapshots(SortedSet`1 commits)
   at SIL.Harmony.DataModel.UpdateSnapshots(CrdtRepository repo, SortedSet`1 commitsToApply)
   at SIL.Harmony.DataModel.SIL.Harmony.ISyncable.AddRangeFromSync(IEnumerable`1 commits)
   at SIL.Harmony.DataModel.SIL.Harmony.ISyncable.AddRangeFromSync(IEnumerable`1 commits)
   at SIL.Harmony.DataModel.SIL.Harmony.ISyncable.AddRangeFromSync(IEnumerable`1 commits)
   at SIL.Harmony.SyncHelper.SyncWith(ISyncable localModel, ISyncable remoteModel, JsonSerializerOptions serializerOptions)
   at SIL.Harmony.DataModel.SyncWith(ISyncable remoteModel)
   at FwLiteShared.Sync.SyncService.ExecuteSync(Boolean skipNotifications)
   at FwLiteShared.Projects.CombinedProjectsService.<>c.<<DownloadProject>b__16_1>d.MoveNext()
--- End of stack trace from previous location ---
   at LcmCrdt.CrdtProjectsService.CreateProject(CreateProjectRequest request)
   at LcmCrdt.CrdtProjectsService.CreateProject(CreateProjectRequest request)
   at LcmCrdt.CrdtProjectsService.CreateProject(CreateProjectRequest request)
   at LcmCrdt.CrdtProjectsService.CreateProject(CreateProjectRequest request)
   at FwLiteShared.Projects.CombinedProjectsService.<>c__DisplayClass16_0.<<DownloadProject>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at FwLiteShared.Projects.CombinedProjectsService.DownloadProject(ProjectModel project)
   at FwLiteShared.Projects.CombinedProjectsService.DownloadProjectByCode(String code, LexboxServer server, Nullable`1 userRole)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at LcmCrdt.Changes.JsonPatchChange.ApplyChange and follow the sync path through SnapshotWorker.ApplyCommitChanges and SyncHelper.SyncWith. Reproduce the project download or sync failure, then determine the expected handling for a patch targeting a known type with an unknown property; done means this case no longer throws unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.