Skip to content

[Bug]: QQ Bot adapter connect() missing is_reconnect parameter #57671

Description

@YaYaSilverwing

Bug Description

QQ Bot adapter fails to connect because connect() method signature doesn’t match the base class. The base class BasePlatformAdapter.connect() expects an is_reconnect keyword argument, but QQAdapter.connect() doesn’t accept it.

Steps to Reproduce

  1. Configure QQ Bot in config.yaml (AppID / AppSecret)
  2. Start gateway: hermes gateway run
  3. See error: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'
  4. QQ Bot stays offline

Expected Behavior

QQ Bot should connect successfully and respond to messages.

Actual Behavior

Gateway fails to connect QQ Bot and keeps retrying with the same error.

Affected Component

Other

Messaging Platform (if gateway-related)

No response

Debug Report

Report:       https://paste.rs/MiCTW
agent.log:    https://paste.rs/VEANw
gateway.log:  https://paste.rs/R9mUD

Operating System

ubuntu 26.04

Python Version

3.12.0

Hermes Version

0.18.0

Additional Logs / Traceback (optional)

ERROR gateway.run: ✗ qqbot error: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'

Root Cause Analysis (optional)

  • base.py defines: async def connect(self, *, is_reconnect: bool = False) -> bool:

  • adapter.py has: async def connect(self) -> bool:

The is_reconnect parameter was added to the base class but QQ Bot adapter was not updated.

Proposed Fix (optional)

Change line 281 in gateway/platforms/qqbot/adapter.py from:

 async def connect(self) -> bool:

to:

async def connect(self, *, is_reconnect: bool = False) -> bool:

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsbugcomp/gatewayGateway runner, session dispatch, deliveryduplicateThis issue or pull request already existsplatform/qqbotQQ Bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current mainsweeper:risk-message-deliverySweeper risk: may drop, duplicate, misroute, or suppress messagestype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions