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

[BUG] #1159

Closed
MagisterMegumin opened this issue Oct 26, 2020 · 6 comments
Closed

[BUG] #1159

MagisterMegumin opened this issue Oct 26, 2020 · 6 comments

Comments

@MagisterMegumin
Copy link

MagisterMegumin commented Oct 26, 2020

  • [×] 我已知晓并同意,如果我不遵循以下格式提交 issue,或者我使用的并非最新版本的 SSPanel UIM,或者我没有提供足够的信息,或者我没有选中这些框,则我的 issue 可能会被无条件关闭和锁定。 I acknowledge if I don't follow the format below, or I'm on an old commit, or I fail to provide sufficient information, or I don't check these box, my issue could be closed without any notice.
  • [×] 我已确认我已经阅读过使用文档、Wiki,并在 issue 列表中查找相似的问题。I certify that I have read project Wiki and other issue may related to this one.
  • [×] 我已知晓并同意,如果我不同意上述条件却仍然提交 issue,或即使同意上述条件但在提交 issue 时不按照条件执行,我的 issue 可被 SSPanel UIM 维护团队视为 spam、并在必要时会被举报到 GitHub。 I acknowledge if I disagree with the conditions above but still submit a issue, or if I agree conditions above but do not follow them when submitting a issue, my issue could be considered as spam by the SSPanel UIM maintenance team, and might be reported to GitHub if necessary.

Environment 环境
Your OS info, PHP/MySQL version and so on... 你的操作系统信息、PHP/MySQL 版本、以及其它所有可能相关的信息。

Commit
The commit you on. 你当前的 SSPanel UIM 位于哪条 commit。

Bug
Telegram bot 不会对消息作出回应,但是进行修改节点信息、修改公告等操作时它会发出提醒消息。
Reproduce
在群组中或私聊发送command给bot,bot不回复任何消息,这个情况是今天凌晨开始出现的,此前bot一直都在正常运作,并且此问题发生前没有修改任何文件。

Expected behavior
bot对收到的command做出相应的回应

Logs
尝试使用php xcat setTelegram进行修复,得到如下报错(网站已开启https)
PHP Fatal error: Uncaught TelegramBot\Api\HttpException: Bad Request: bad webhook: HTTPS url must be provided for webhook in /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php:281
Stack trace:
#0 /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php(258): TelegramBot\Api\BotApi::curlValidate(Resource id #106, '{"ok":false,"er...')
#1 /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php(227): TelegramBot\Api\BotApi->executeCurl(Array)
#2 /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php(437): TelegramBot\Api\BotApi->call('setWebhook', Array)
#3 /www/wwwroot/a.com/app/Command/XCat.php(267): TelegramBot\Api\BotApi->setWebhook('http://a.com...')
#4 /www/wwwroot/a.com/app/Command/XCat.php(45): App\Command\XCat->setTelegram()
#5 /www/wwwroot/a.com/xcat(11): App\Command\XCat->boot()
#6 {main}
thrown in /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php on line 281

Fatal error: Uncaught TelegramBot\Api\HttpException: Bad Request: bad webhook: HTTPS url must be provided for webhook in /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php:281
Stack trace:
#0 /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php(258): TelegramBot\Api\BotApi::curlValidate(Resource id #106, '{"ok":false,"er...')
#1 /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php(227): TelegramBot\Api\BotApi->executeCurl(Array)
#2 /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php(437): TelegramBot\Api\BotApi->call('setWebhook', Array)
#3 /www/wwwroot/a.com/app/Command/XCat.php(267): TelegramBot\Api\BotApi->setWebhook('http://a.com...')
#4 /www/wwwroot/a.com/app/Command/XCat.php(45): App\Command\XCat->setTelegram()
#5 /www/wwwroot/a.com/xcat(11): App\Command\XCat->boot()
#6 {main}
thrown in /www/wwwroot/a.com/vendor/telegram-bot/api/src/BotApi.php on line 281

Addition
Additional context here. 如有可能,请提供更多相关资料。

@ghost
Copy link

ghost commented Oct 26, 2020

@MagisterMegumin 请检查baseURL是不是https

@Anankke
Copy link
Owner

Anankke commented Oct 26, 2020

不是 https 没法用

@Anankke Anankke closed this as completed Oct 26, 2020
@MagisterMegumin
Copy link
Author

感谢,把baseURL改为https后解决了,但是此前一直是http但没有出现上述问题(。﹏。)

@Anankke
Copy link
Owner

Anankke commented Oct 26, 2020

Telegram 就没有允许过 http,怎么可能没有问题

@Sakitami
Copy link

Sakitami commented Apr 3, 2021

抱歉,我这里的baseURL是https,然后遇到了类似的问题,仅会通知节点修改、公告修改等信息,但不能对用户的指令作出回应。
php xcat Tool SetTelegram 的报错:
PHP Fatal error: Uncaught Telegram\Bot\Exceptions\TelegramOtherException: Bad Request: bad webhook: Failed to resolve host: Temporary failure in name resolution in /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/Exceptions/TelegramResponseException.php:58
Stack trace:
#0 /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/TelegramResponse.php(174): Telegram\Bot\Exceptions\TelegramResponseException::create()
#1 /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/TelegramResponse.php(204): Telegram\Bot\TelegramResponse->makeException()
#2 /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/TelegramResponse.php(65): Telegram\Bot\TelegramResponse->decodeBody()
#3 /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/TelegramClient.php(138): Telegram\Bot\TelegramResponse->__construct()
#4 /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/TelegramClient.php(119): Telegram\Bot\TelegramClient->getResponse()
#5 /www/wwwroot/mbs.skiturbo in /www/wwwroot/mbs.skiturbo.xyz/vendor/irazasyed/telegram-bot-sdk/src/Exceptions/TelegramResponseException.php on line 58

@AutisticShark
Copy link
Contributor

你這個是機器的DNS有問題,無法解析API域名。

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

4 participants