sillsdev / sillsdev/serval

GetWordGraph errors

Open
#797 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3
Forks
2
Avg merge
3d 1h
Merged PRs (30d)
3

Description

We've seen a handful of this error on production:

Grpc.Core.RpcException: Status(StatusCode="Unknown", Detail="Exception was thrown by handler.")
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task, ConfigureAwaitOptions options)
   at System.Runtime.CompilerServices.TaskAwaiter<TResult>.GetResult()
   at Serval.Translation.Services.EngineService+<GetWordGraphAsync>d__13.MoveNext() in /app/src/Serval/src/Serval.Translation/Services/EngineService.cs:line 112
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task, ConfigureAwaitOptions options)
   at System.Runtime.CompilerServices.TaskAwaiter<TResult>.GetResult()
   at Serval.Translation.Controllers.TranslationEnginesController+<GetWordGraphAsync>d__16.MoveNext() in /app/src/Serval/src/Serval.Translation/Controllers/TranslationEnginesController.cs:line 313

on the machine end:

Grpc.AspNetCore.Server.ServerCallHandler[7]
      Error status code 'Aborted' with detail 'The engine must be built first.' raised.
      Serval.Machine.Shared.Utils.EngineNotBuiltException: The engine must be built first.
         at Serval.Machine.Shared.Services.SmtTransferEngineService.GetBuiltEngineAsync(String engineId, CancellationToken cancellationToken) in /app/src/Machine/src/Serval.Machine.Shared/Services/SmtTransferEngineService.cs:line 288
         at Serval.Machine.Shared.Services.SmtTransferEngineService.GetWordGraphAsync(String engineId, String segment, CancellationToken cancellationToken) in /app/src/Machine/src/Serval.Machine.Shared/Services/SmtTransferEngineService.cs:line 141
         at Serval.Machine.Shared.Services.ServalTranslationEngineServiceV1.GetWordGraph(GetWordGraphRequest request, ServerCallContext context) in /app/src/Machine/src/Serval.Machine.Shared/Services/ServalTranslationEngineServiceV1.cs:line 78

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 with GetWordGraphAsync in Serval.Translation/Services/EngineService.cs and TranslationEnginesController.cs, then trace the machine-side calls in SmtTransferEngineService.cs and ServalTranslationEngineServiceV1.cs at the reported lines. Determine the expected behavior when the engine is not built, then add coverage showing that GetWordGraph handles that state correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, grpc
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.