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

Google translate is giving unhandled exception and crashing the application #12

Closed
vishalxl opened this issue Sep 12, 2022 · 2 comments
Closed

Comments

@vishalxl
Copy link
Owner

Unhandled exception:
Connection closed before full header was received
#0      IOClient.send (package:http/src/io_client.dart:90:7)
<asynchronous suspension>
#1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:32)
<asynchronous suspension>
#2      _withClient (package:http/http.dart:164:12)
<asynchronous suspension>
#3      GoogleTranslator.translate (package:translator/src/google_translator.dart:51:18)
<asynchronous suspension>
@vishalxl
Copy link
Owner Author

vishalxl commented Oct 6, 2022

Seeing this likely unrelated error. Its seen both on windows Terminal, and on Ubuntu elf file running in WSL.

Refreshing...
Unhandled exception:
Instance of 'LanguageNotSupportedException'
#0      LanguageList.[] (package:translator/src/langs/language.dart:128:5)
#1      GoogleTranslator.translate (package:translator/src/google_translator.dart:79:36)
<asynchronous suspension>

Some lanaguages like 'qu'/Quechua aren't mentioned in the Dart package, which means that if the Google Translate service returns such a language, this exception is thrown.

@vishalxl
Copy link
Owner Author

vishalxl commented Oct 6, 2022

Fixed it by catching the exception.

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