Skip to content
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

Microsoft Translator Provider: The request is not authorized because credentials are missing or invalid. #1665

Open
AlexSkrn opened this issue Oct 9, 2024 · 0 comments

Comments

@AlexSkrn
Copy link

AlexSkrn commented Oct 9, 2024

Microsoft Translator Provider 1.2.0.0 (same on version 1.1.5)
Trados Studio 2022 SR 2 version 17.2.10.19084

The plugin stops working about every 15 minutes with the error in the title. I need to open Project Settings and click OK. This seems to reset the plugin and it works for about another 15 minutes. This also affects the pre-translation of larger files during project preparation. It can only handle very small files. ChatGPT says that the problem might be here: MicrosoftTranslatorProvider/Service/MicrosoftService.cs There is no logic for refreshing the access token before it expires. And according to the Azure docs they do expire (I think it is from here: https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-reference#authenticating-with-an-access-token). I don't know if this is indeed the problem. This error affects many of my colleagues.

This is the error trace from the plugin log:
MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-10-09 17:16:32.5391 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)

@AlexSkrn AlexSkrn changed the title The request is not authorized because credentials are missing or invalid. Microsoft Translator Provider: The request is not authorized because credentials are missing or invalid. Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant