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

JSON-RPC: invalid request_id #1179

Open
hokaxbt opened this issue Jan 3, 2025 · 1 comment · May be fixed by #1180
Open

JSON-RPC: invalid request_id #1179

hokaxbt opened this issue Jan 3, 2025 · 1 comment · May be fixed by #1180
Labels
bug Something isn't working community Reported or suggested by our awesome users

Comments

@hokaxbt
Copy link

hokaxbt commented Jan 3, 2025

Steps to reproduce:

Defineevm_node datasource:

datasources:
  evm_node:
    kind: evm.node
    url: ${RPC_URL}

Use w3 inside handler:

w3 = ctx.get_evm_node_datasource("evm_node").web3

Interact with w3.

What did you expect to happen:

Request doesn't return error.

What actually happened:

Request return error:

web3.exceptions.BadResponseFormat: The response was in an unexpected format and unable to be parsed. "id" must be an integer or a string representation of an integer. The raw response is: {'jsonrpc': '2.0', 'id': 'fb9bef5f7a5d40029924a3e72f65fa26', 'result': '0x1'}

I'm not sure if this issue affects only on newer versions of web3. I've tested with another RPC provider using web3==7.2.0, but the issue persists.

request_id = uuid4().hex

Environment

  • Python version: 3.12
  • DipDup version or commit hash: 8.1.3
  • Database engine version: n/a
  • Hasura version: n/a
  • Are you in docker? no
  • Can you reproduce this issue on next? n/a
@hokaxbt
Copy link
Author

hokaxbt commented Jan 3, 2025

hokaxbt added a commit to hokaxbt/dipdup that referenced this issue Jan 3, 2025
This was referenced Jan 3, 2025
@droserasprout droserasprout added bug Something isn't working community Reported or suggested by our awesome users labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Reported or suggested by our awesome users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants