Content-Length: 280534 | pFad | https://github.com/interactions-py/interactions.py/issues/1651

97 GitHub · Where software is built
Skip to content

[BUG] Websocket Heartbeat Interval TypeError on reconnect #1651

Open
@Scrxtchy

Description

@Scrxtchy

Library Version

userapps @ 73c73fd

Describe the Bug

During a gateway reconnect event, the application crashed due to the either the d or heartbeat_interval values being not set, or the event payload somehow also being None

Steps to Reproduce

  1. Run app
  2. Wait for or force Reconnect
  3. receive invalid data?
  4. Crash

Expected Results

Library should either raise an error or handle it

Minimal Reproducible Code

No response

Traceback

POST::https://discord.com/api/v10/interactions/{clientid}/{token}/callback: 404
Ignoring exception in Autocomplete Callback for /ranking team - Option: SlashCommandOption(): HTTPException: 404|Not Found || Unknown interaction
Shard ID 0 | Traceback (most recent call last):
  File "/mnt/mpathaf/scratch/hidden/june/lib/python3.10/site-packages/interactions/api/gateway/state.py", line 110, in _ws_connect
    await self.gateway.run()
  File "/mnt/mpathaf/scratch/hidden/june/lib/python3.10/site-packages/interactions/api/gateway/gateway.py", line 171, in run
    await self.dispatch_opcode(data, op)
  File "/mnt/mpathaf/scratch/hidden/june/lib/python3.10/site-packages/interactions/api/gateway/gateway.py", line 194, in dispatch_opcode
    return await self.reconnect(resume=True, url=self.ws_resume_url)
  File "/mnt/mpathaf/scratch/hidden/june/lib/python3.10/site-packages/interactions/api/gateway/gateway.py", line 281, in reconnect
    await super().reconnect(resume=resume, code=code, url=url)
  File "/mnt/mpathaf/scratch/hidden/june/lib/python3.10/site-packages/interactions/api/gateway/websocket.py", line 262, in reconnect
    self.heartbeat_interval = hello["d"]["heartbeat_interval"] / 1000
TypeError: 'NoneType' object is not subscriptable

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have attempted to debug this myself, and I believe this issue is with the library

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/interactions-py/interactions.py/issues/1651

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy