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

crash on 'reload' #1570

Open
law opened this issue Jul 8, 2020 · 2 comments
Open

crash on 'reload' #1570

law opened this issue Jul 8, 2020 · 2 comments

Comments

@law
Copy link
Contributor

law commented Jul 8, 2020

With Opsdroid 0.19.0, python 3.7.7, and including the 'devtools' skill, a 'reload' will cause Opsdroid to crash. Specifically:

INFO opsdroid.core: Received stop signal, exiting.
INFO opsdroid.core: Removing skills...
INFO opsdroid.core: Removed infra-api.
INFO opsdroid.core: Removed infra-api.
INFO opsdroid.core: Removed infra-api.
INFO opsdroid.core: Removed infra-api.
INFO opsdroid.core: Removed infra-api.
INFO opsdroid.core: Removed devtools.
INFO opsdroid.core: Removed devtools.
INFO opsdroid.core: Stopping connector websocket...
INFO opsdroid.core: Stopped connector websocket.
INFO opsdroid.core: Stopping database inmem...
INFO opsdroid.core: Stopped database inmem.
INFO opsdroid.core: Stopping web server...
INFO opsdroid.core: Stopped web server.
INFO opsdroid.core: Stopping cron...
INFO opsdroid.core: Stopped cron
INFO opsdroid.core: Stopping pending tasks...
INFO opsdroid.core: Stopped pending tasks.
INFO opsdroid.configuration: Loaded config from configuration.yaml.
WARNING opsdroid.helper: Opsdroid has a new configuration format since version 0.17.0, we will change your configuration now. Please read on how to migrate in the documentation.
WARNING opsdroid.helper: Opsdroid has a new configuration format since version 0.17.0, we will change your configuration now. Please read on how to migrate in the documentation.
WARNING opsdroid.loader: No databases in configuration. This will cause skills which store things in memory to lose data when opsdroid is restarted.
INFO opsdroid.connector.slack: Connecting to Slack.
ERROR opsdroid.core: Exception when running skill 'devtools'.
Traceback (most recent call last):
  File "/Users/lwhalen/sandbox/infrabot/venv/lib/python3.7/site-packages/opsdroid/core.py", line 422, in run_skill
    return await skill(self, config, event)
  File "/Users/lwhalen/Library/Application Support/opsdroid/opsdroid-modules/skill/devtools/__init__.py", line 8, in reload
    await opsdroid.reload()
  File "/Users/lwhalen/sandbox/infrabot/venv/lib/python3.7/site-packages/opsdroid/core.py", line 243, in reload
    await self.load()
  File "/Users/lwhalen/sandbox/infrabot/venv/lib/python3.7/site-packages/opsdroid/core.py", line 189, in load
    await self.start_connectors(self.modules["connectors"])
  File "/Users/lwhalen/sandbox/infrabot/venv/lib/python3.7/site-packages/opsdroid/core.py", line 346, in start_connectors
    await connector.connect()
  File "/Users/lwhalen/sandbox/infrabot/venv/lib/python3.7/site-packages/opsdroid/connector/slack/__init__.py", line 88, in connect
    self.auth_info = (await self.slack.api_call("auth.test")).data
concurrent.futures._base.CancelledError
ERROR slack.rtm.client: When calling '#wrapper()' in the 'opsdroid.connector.slack.events' module the following error was raised: 
INFO slack.rtm.client: Caught a raised exception () while dispatching a TEXT message ({"client_msg_id":"8a3f6402-ca96-xxxx-b622-70ec82180ad2","suppress_notification":false,"type":"message","text":"reload","user":"userid","team":"teamid","blocks":[{"type":"rich_text","block_id":"nWJPH","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"reload"}]}]}],"source_team":"teamid","user_team":"teamid","channel":"channelid","event_ts":"event-ts-42.003100","ts":"1594168242.003100"})

@jacobtomlinson
Copy link
Member

This looks like a bug in the Slack connector not gracefully handling the disconnect. I'm going to move this over to the core repo.

Could you share your config so we can try to reproduce?

@jacobtomlinson jacobtomlinson transferred this issue from opsdroid/skill-devtools Jul 8, 2020
@law
Copy link
Contributor Author

law commented Jul 8, 2020

Certainly:

welcome-message: true

connectors:
  - name: websocket
  - name: slack
    token: $SLACK_TOKEN

skills:
  - name: devtools
  - name:my_project_skill
    path: ./skills-cache/my_project_skill
    no-cache: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants