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

[RPC] Some built-in methods error #5451

Closed
Vexed01 opened this issue Nov 25, 2021 · 0 comments · Fixed by #5453
Closed

[RPC] Some built-in methods error #5451

Vexed01 opened this issue Nov 25, 2021 · 0 comments · Fixed by #5453
Assignees
Labels
Category: RPC/ZMQ methods Changing or adding RPC methods to cogs/core commands Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.

Comments

@Vexed01
Copy link
Contributor

Vexed01 commented Nov 25, 2021

What Red version are you using?

3.4.14

What were you trying to do?

Use the built-in CORE__LOAD RPC method to load a cog via RPC.

What did you expect to happen?

The cog to load and some form of output through RPC confirming it succeeded (which looking at the code would be a tuple)

What actually happened?

The RPC server tried to serialize a tuple (which was returned from CoreLogic._load) but it can't serialize it.

Bot error:
https://img.vexcodes.com/hUm2gu

RPC client error:
https://img.vexcodes.com/W8CtEJ

How can we reproduce this error?

  1. Start red with --rpc
  2. Start up an RPC client
  3. Call the CORE__LOAD function with any arguments
  4. Observe RPC returning Internal Error and the bot logs saying serialization error.

Anything else?

Reproduction code, using the RPC library Red uses:

from aiohttp_json_rpc import JsonRpcClient

client = JsonRpcClient()
await client.connect("localhost", 6133)

try:
    await client.call("CORE__LOAD", ["customcom"])  # raises RpcInternalError
finally:
    await client.disconnect()

CORE__RELOAD is broken in the same way as CORE__LOAD

I would expect CORE_UNLOAD to also be broken but instead it does this:
https://img.vexcodes.com/X1OvRx

@Vexed01 Vexed01 added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label Nov 25, 2021
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label Nov 25, 2021
@Vexed01 Vexed01 changed the title [RPC] [RPC] Some built-in methods error Nov 25, 2021
@Jackenmen Jackenmen added Status: In Progress There's a PR open to deal with this, or an org member is working on this internally and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels Nov 25, 2021
@Jackenmen Jackenmen added the Category: RPC/ZMQ methods Changing or adding RPC methods to cogs/core commands label Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: RPC/ZMQ methods Changing or adding RPC methods to cogs/core commands Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants