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

Setting error: true in LoggerOptions gives vague error when sending media. #148

Closed
iamcosmin opened this issue Aug 15, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@iamcosmin
Copy link
Contributor

When using replyWithVideo or replyWithPhoto, while error is enabled in LoggerOptions, Televerse throws a vague error and does not send the media.

│ TelegramException [500]:
│
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄   
│ #0   HttpClient._dioCatch (package:televerse/src/utils/http.dart:32:7)
│ #1   HttpClient.multipartPost (package:televerse/src/utils/http.dart:114:7)
│ #2   <asynchronous suspension>
│ #3   RawAPI.sendVideo (package:televerse/src/televerse/raw_api.dart:564:18)
│ #4   <asynchronous suspension>
│ #5   MessageMixin.replyWithVideo (package:televerse/src/televerse/context/mixins/message_mixin.dart:178:12)
│ #6   <asynchronous suspension>
│ #7   processVideoLink (file:///D:/Programming/Projekt/cosminobot/bin/handlers/on/url/videodl.dart:17:7)

Do note that, when using InputFile.fromFileId or InputFile.fromUrl, this error does not occur. I only had it happen with InputFile.fromBytes and InputFile.fromFile.

@HeySreelal
Copy link
Owner

Thanks for the report, lemme check that quickly :)

@HeySreelal
Copy link
Owner

Hey @iamcosmin, just released v1.10.11 fixes this issue.

It was some encoding issue. Basically, I blindly called jsonEncode on the request body, and when the body contains FormData it all went crashing down.

Thanks again for reporting :)

@HeySreelal HeySreelal added the bug Something isn't working label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants