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

Translation failed when packaged added to Net Standard 2.0 project #17

Open
evolcano opened this issue Nov 23, 2020 · 1 comment
Open

Comments

@evolcano
Copy link

System.Threading.Tasks.TaskCanceledException
HResult=0x8013153B
Message=A task was canceled.
Source=mscorlib
StackTrace:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at GoogleTranslateFreeApi.GoogleKeyTokenGenerator.<GetNewExternalKeyAsync>d__17.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GoogleTranslateFreeApi.GoogleKeyTokenGenerator.d__16.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at GoogleTranslateFreeApi.GoogleTranslator.<GetTranslationResultAsync>d__26.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GoogleTranslateFreeApi.GoogleTranslator.d__24.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at GoogleTrans.translater.d__0.MoveNext() in C:\Users\HMY\source\repos\stringCompare\GoogleTrans\translater.cs:line 21

This exception was originally thrown at this call stack:
[External Code]
GoogleTrans.translater.Trans() in translater.cs

@d4n3436
Copy link

d4n3436 commented Nov 25, 2020

Google Translate changed the way the API works and now it uses a different endpoint to get the translations.
The library fails to get the translation because it can no longer get the token.

More info here and here.

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

2 participants