Search
Write a publication
Pull to refresh
0
0
Кирилл @kknishev

User

Send message

что-то не то в запросе, видимо

починил:
/deleteWebhook
/getUpdates?offset=-1
/setWebhook

удалять Webhook пробовал неоднократно, без результата

чат не чистил, но предыдущие сообщения точно удалял и возможно, на этом месте и сломалось..

ERROR RequestID: d80686d5-50f8-40bc-8ec4-cefd6f55163b Code: 502 Message: Error during function invocation

{"errorMessage": "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: replied message not found", "errorType": "ApiTelegramException", "stackTrace": [" File \"/function/runtime/runtime.py\", line 212, in handle_event\n result = h(r.event, r.context)\n", " File \"/function/code/index.py\", line 116, in handler\n bot.process_new_updates([update])\n", " File \"/function/code/telebot/__init__.py\", line 740, in process_new_updates\n self.process_new_messages(new_messages)\n", " File \"/function/code/telebot/__init__.py\", line 775, in process_new_messages\n self._notify_command_handlers(self.message_handlers, new_messages, 'message')\n", " File \"/function/code/telebot/__init__.py\", line 6894, in _notify_command_handlers\n self._exec_task(\n", " File \"/function/code/telebot/__init__.py\", line 1198, in _exec_task\n raise e\n", " File \"/function/code/telebot/__init__.py\", line 1191, in _exec_task\n task(*args, **kwargs)\n", " File \"/function/code/telebot/__init__.py\", line 6801, in _run_middlewares_and_handler\n result = handler['function'](message)\n", " File \"/function/code/index.py\", line 44, in send_welcome\n bot.reply_to(\n", " File \"/function/code/telebot/__init__.py\", line 4528, in reply_to\n return self.send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)\n", " File \"/function/code/telebot/__init__.py\", line 1549, in send_message\n apihelper.send_message(\n", " File \"/function/code/telebot/apihelper.py\", line 264, in send_message\n return _make_request(token, method_url, params=payload, method='post')\n", " File \"/function/code/telebot/apihelper.py\", line 162, in _make_request\n json_result = _check_result(method_name, result)\n", " File \"/function/code/telebot/apihelper.py\", line 189, in _check_result\n raise ApiTelegramException(method_name, result, result_json)\n"]}

[ERROR] ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: replied message not found Traceback (most recent call last):   File "/function/runtime/runtime.py", line 212, in handle_event     result = h(r.event, r.context)   File "/function/code/index.py", line 116, in handler     bot.process_new_updates([update])   File "/function/code/telebot/__init__.py", line 740, in process_new_updates     self.process_new_messages(new_messages)   File "/function/code/telebot/__init__.py", line 775, in process_new_messages     self._notify_command_handlers(self.message_handlers, new_messages, 'message')   File "/function/code/telebot/__init__.py", line 6894, in _notify_command_handlers     self._exec_task(   File "/function/code/telebot/__init__.py", line 1198, in _exec_task     raise e   File "/function/code/telebot/__init__.py", line 1191, in _exec_task     task(*args, **kwargs)   File "/function/code/telebot/__init__.py", line 6801, in _run_middlewares_and_handler     result = handler['function'](message)   File "/function/code/index.py", line 44, in send_welcome     bot.reply_to(   File "/function/code/telebot/__init__.py", line 4528, in reply_to     return self.send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)   File "/function/code/telebot/__init__.py", line 1549, in send_message     apihelper.send_message(   File "/function/code/telebot/apihelper.py", line 264, in send_message     return _make_request(token, method_url, params=payload, method='post')   File "/function/code/telebot/apihelper.py", line 162, in _make_request     json_result = _check_result(method_name, result)   File "/function/code/telebot/apihelper.py", line 189, in _check_result     raise ApiTelegramException(method_name, result, result_json)

со настройкой шлюза разобрался, был некорректный id

проблема другая, заработало (чат ответил на /start) и почти сразу перестало :/
теперь после включения Webhook, идут постоянные запросы с одной и той же ошибкой:
"last_error_message": "Wrong response from the webhook: 502 Bad Gateway"

на api-шлюзе 502 также логируется
proxyapi.ru - отвечает корректно, проверил прямым запросом

Нужно ли при создании функции привязывать в Параметрах существующий Сервисный аккаунт? На скрине у вас он не выбран и в описании не сказано.

Попробовал с привязкой и без, всё равно ошибка на следующем шаге с API-шлюзом:
Invalid openapi spec: Cannot access service account ***: not exists or permission denied

Information

Rating
Does not participate
Location
Россия
Date of birth
Registered
Activity

Specialization

Technical Support Engineer
Lead
SQL
PostgreSQL
Linux
English