Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Websocket logs subscription not supported by Geth Client #2206

Closed
Ruj89 opened this issue Jan 26, 2022 · 4 comments
Closed

Websocket logs subscription not supported by Geth Client #2206

Ruj89 opened this issue Jan 26, 2022 · 4 comments
Assignees
Milestone

Comments

@Ruj89
Copy link

Ruj89 commented Jan 26, 2022

Platform: node:lts-alpine Docker image
Ganache: v7.0.0
Node: v16.13.2
npm: 8.1.2
Go: 1.17.4
go-ethereum: v1.10.15

Description:

When I receive a log, after a subscription, the go-ethereum library try to send through a chan the Log typed object, but it cannot marshal the Ganache websocket message:

json: cannot unmarshal array into Go value of type types.Log

Steps to reproduce:

  1. Deploy a smart contract;
  2. Listen to the ganache ws endpoint for a event with a Geth client;
  3. Execute a smart contract method that calls an event.

Expected result:
The Ganache WS server sends a canonical event message JSON object to Geth client.

Actual result:
The Ganache WS server sends an array of objects to Geth client.

Notes:
On Ganache CLI v6.12.2 the JSON event message was correctly parsed.

@davidmurdoch
Copy link
Member

Hi, thanks for opening the issue. We'll look into it!

@davidmurdoch davidmurdoch added this to the 7.0.x milestone Jan 31, 2022
@MicaiahReid MicaiahReid self-assigned this Jan 31, 2022
@ndzik
Copy link

ndzik commented Feb 1, 2022

Just for completeness and because I just encountered this issue: I can confirm this.

json: cannot unmarshal array into Go value of type types.Log errors for subscriptions with Ganache: v7.0.1.

I can also confirm that Ganache CLI v6.12.2 works as expected for the time being (:

@davidmurdoch
Copy link
Member

@ndzik Thanks for the additional confirmation. We've found the root cause and are working on a fix now.

@MicaiahReid
Copy link
Contributor

This should be fixed in v7.0.2!

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

No branches or pull requests

4 participants