Closed WinSide closed 4 years ago
Have the same problem.
same problem
Same. Help please
same problem
Okay, this problem is caused by this bug https://bugs.openjdk.java.net/browse/JDK-8173620 I've solved it by using following workaround
try {
(DefaultBotSession) telegramBotsApi.registerBot(telegramBot);
} catch (Exception e) {
// logging
} catch (InternalError e) {
// https://bugs.openjdk.java.net/browse/JDK-8173620
if (e.getCause() instanceof InvocationTargetException && e.getCause().getCause() instanceof IOException) {
IOException cause = (IOException) e.getCause().getCause();
// logging
}
// if it's not jdk bugged error then propagate it
throw e;
}
If the bug is in openJDK, I guess we can close this issue, right? @WinSide can you check if the workaround works for you as well?
Does Someone try this solution? Somebody prove this to close issure.
This bug was resolved in OpenJDK since 13 version. However, I think we should include a workaround to the library because the most popular java version still 8-11.
The workaround mentioned by Raschudesny works only with registration webhook but doesn't help when long-polling bot getting updates.
@rubenlagus please can you review and accept my PR #719
When using HTTP proxy I got exception
Code from Wiki - https://github.com/rubenlagus/TelegramBots/wiki/Using-Http-Proxy#with-authentication