-
Notifications
You must be signed in to change notification settings - Fork 41
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
Bot webhook is setup but bot is not responding. Webhook does not seem to be be reciving anything #41
Comments
Hi @akshaykadidal- How are you initializing your bot? Have you set an "approved_*" parameter on the constructor to allow yourself to talk to the bot. There's 3 approved parameters:
To allow your specific user, you would do something like this: bot = WebexBot(teams_bot_token=os.getenv("WEBEX_TEAMS_ACCESS_TOKEN"),
approved_users=["myemail@domain.com"], # add your e-mail address here
bot_name="My Teams Ops Bot",
include_demo_commands=True) |
I have not filled in any of these optional parameters. I see that I get a warning. how can I check if my requests are reaching the websocket? |
In a 1:1 conversation with a bot, I see log messages like:
My "driver" script is really simple with a fresh checkout: ~/dev/webex_bot$ cat tester.py
import os
from webex_bot.commands.echo import EchoCommand
from webex_bot.webex_bot import WebexBot
# Create a Bot Object
bot = WebexBot(teams_bot_token=os.getenv("WEBEX_TEAMS_ACCESS_TOKEN"),
bot_name="My Teams Ops Bot",
include_demo_commands=True)
# Add new commands for the bot to listen out for.
bot.add_command(EchoCommand())
# Call `run` for the bot to wait for incoming messages.
bot.run() |
Where are we on this issue? I'm having the exact same observation. |
Are you behind a proxy? |
I don't think so, but I don't want to give the false response. I'm in the campus network and I'm waiting the response from IT. |
I worked with IT and they guided me to disable the virtual proxy in the cloud. However after that, I'm still having the same observation. On the terminal, it only shows the following logs. No events displayed when webex client chats to the bot. ... The network connection looks all OK. Any suggestions? |
Are you doing a 1:1 chat or in a room? If it's a room, you need to invite the bot and You can turn on debug logging and see if that reveals anything. You should see some PING/PONG messages.
|
I'm on 1:1 chat. Here is what I did: 1, Deleted the bot and recreatd Report1116@webex.bot on developer.webex.com. Just in case. 2, Updated the example.py with 3 new lines per your suggestion: 3, Set the environment and run python example.py on my Windows machine: 4, on the searching header of my webex client, I filled in Report1116@webex.bot. Type something there. Unfortunately no response. On the terminal, nothing is displayed. Is there a way to check if Webex cloud receives any info to the given bot and if webex cloud ever tried to send request to my Windows computer? |
Sorry, I forgot the webex bot creates its own logging handler which kind of breaks the normal python logging config. Try setting env var
No, not that I'm aware of. |
With the update, it does pop up a lot on the terminal. Enve ping/pong looks all good, I still don't see any response in webex client. No updates on logs either. |
I don't have an answer. I agree the logs look ok and don't see an obvious problem. I talked with someone and the recommendation was to try the (supported) project at https://github.com/webex/webex-js-sdk/ to see if that works/fails. |
I am having the same issue |
So I tried running the code on replit, to see if the issue is something on my side, but it still doesn't work, any ideas? |
Same issue here. node bot is working well. Could be something related to socket package 10.2? |
Hi figure out, Cisco changed some configuration about device data, please register for the notification over the websocket in the device data: DEVICE_DATA = {
} |
Closing as duplicate of #48 |
Description
Websocket is open. But the bot does not respond.
The text was updated successfully, but these errors were encountered: