Not able to retrieve Server TMs using Trados Studio 2022 SR1 API with Groupshare CU9

Hello,

since I upgraded my Groupshare Server from CU8.1 to GS2020 SR1 CU9, I receive an internal server error (500) when calling GetTranslationMemories.

I also took the leap and installed a complete fresh Windows 2022 Server with SQLExpress 2022 and GS 2020 SR1 CU9 - so a complete virgin installation. All I did was upload one test TM through the GS web UI, everything else should be factory defaults. Still the problem persists.

This is my code - it has worked for years and I can still positively test it against CU7 and CU8.1 of Groupshare 2020 SR1.

However, not anymore with CU9. Is this code not compatible any longer? If so, which method should I use instead?

>>>>>>>>>>

Public Function GetServerTMs()

Dim ServerUri As New System.Uri(ServerURL & ":" & Portnumber)

Dim TMServer As New TranslationProviderServer(ServerUri, False, Username, Password)

For Each ServerBasedTranslationMemory In TMServer.GetTranslationMemories()   <---- Internal server Error (500) happens here 

Dim ServerTM As String = ServerBasedTranslationMemory.Name

Msgbox(ServerTM)

Next

Return 0

End Function

>>>>>>>>>>>

This is the output in the debugger:

Screenshot of Trados Studio code with an error message popup indicating 'System.AggregateException: One or more errors occurred. --- System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).'

Server-side I find this in TMService.log when the error occurs:

2023-08-25 04:36:14.6434|WIN-DGSP368NVJB|Error|THREAD_ID:53|TR_ID:|EX:Object reference not set to an instance of an object.|DefaultExceptionHandler System.NullReferenceException: Object reference not set to an instance of an object.
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.ParsingHelper.GetPropertyName(CollectionNavigationNode property)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.AnyNodeParser.ParseInternal(AnyNode expression, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.AbstractSingleValueNodeParser`1.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.ODataQueryOptionsParser.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.ODataQueryOptionsParser.Parse[T](SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.UnaryOperatorNodeParser.ParseInternal(UnaryOperatorNode expression, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.AbstractSingleValueNodeParser`1.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.ODataQueryOptionsParser.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.BinaryOperatorNodeParser.ParseInternal(BinaryOperatorNode expression, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.AbstractSingleValueNodeParser`1.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.ODataQueryOptionsParser.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.BinaryOperatorNodeParser.ParseInternal(BinaryOperatorNode expression, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.AbstractSingleValueNodeParser`1.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.ResourceQuery.WebApi.Parsing.ODataQueryOptionsParser.Parse(SingleValueNode node, String resourceIdFieldName)
at Sdl.Services.Common.AspNetCore.RestApi.OData.ODataQueryOptionsExtensions.ToResourceFilterExpression(SingleValueNode odataFilterExpression, String resourceIdFieldName)
at Sdl.Services.Common.AspNetCore.RestApi.OData.ODataQueryOptionsExtensions.ToResourceListOptions[T](ODataQueryOptions`1 options, Int32 maxNodeCount)
at Sdl.TMService.RestApi.Controllers.TranslationMemoriesController.Get(ODataResourceQueryOptions`1 options) in D:\a\1\s\TMService\RestApi\Controllers\TranslationMemoriesController.cs:line 1224
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Sdl.TMService.Common.Runtime.EntitlementVerificationMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\TMService\Sdl.TMService.Common.Runtime\EntitlementVerificationMiddleware.cs:line 46
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Sdl.Services.Common.AspNetCore.RestApi.Middleware.ExecutionContextMiddleware.InvokeAsync(HttpContext context)
at Sdl.Services.Common.AspNetCore.RestApi.Authentication.AuthenticationRequestMiddleware.InvokeAsync(HttpContext context)
at Sdl.TMService.Common.Runtime.ExceptionHandling.ExceptionHandlingMiddleware.Invoke(HttpContext context) in D:\a\1\s\TMService\Sdl.TMService.Common.Runtime\ExceptionHandling\ExceptionHandlingMiddleware.cs:line 30

Many thanks for you help with this one!

Tom



Generated Image Alt-Text
[edited by: Trados AI at 4:11 AM (GMT 0) on 5 Mar 2024]
Parents
  •  

     will probably respond in due course (especially when I move it to the right forum!) but in response to this:

    The forum thread was determined to be SPAM (by 'Text Repetition'). The author responded on .

    Author's Response

    Hi, why was my post removed? This is a serious problem for me - can you please review your decision? Many thanks, Tom

    Probably down to adding all that code into the body of the post  Sometimes it works and sometimes it doesn't.  If you insert it as a code block it normally gets through without a problem.  We get a lot of spammers trying to spoil the experience for everyone else so we're quite tough on them... at least we try to be!

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  •  

     will probably respond in due course (especially when I move it to the right forum!) but in response to this:

    The forum thread was determined to be SPAM (by 'Text Repetition'). The author responded on .

    Author's Response

    Hi, why was my post removed? This is a serious problem for me - can you please review your decision? Many thanks, Tom

    Probably down to adding all that code into the body of the post  Sometimes it works and sometimes it doesn't.  If you insert it as a code block it normally gets through without a problem.  We get a lot of spammers trying to spoil the experience for everyone else so we're quite tough on them... at least we try to be!

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children