Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

SubscribeFilterLogs: The method eth_logs does not exist/is not available #9

Closed
thapakazi opened this issue Sep 25, 2018 · 3 comments
Closed

Comments

@thapakazi
Copy link

Hello @miguelmota I am following up your awesome book.
My requirement is to read the event log of a Transfer(from, to, value) function. I am using SubscribeFilterLogs for continuous log streaming and updating my other dbs.

But I am little bit stuck head over to this obfuscating error msg:

The method eth_logs does not exist/is not available

I have posted the issuse on slack:golang#ethereum room

I am quiet sure, error is pooping from this line:

query := ethereum.FilterQuery{
Addresses: []common.Address{contractAddress},
}
logs := make(chan types.Log)
sub, err := client.SubscribeFilterLogs(context.Background(), query, logs)

But couldn't figure out why though. The closest google match relation I found is on this thread: ethereum/go-ethereum#310 (comment)

Am I missing something import here. I have just started the websocket with admin.startWS("0.0.0.0", 8546, "*","*") , I am sure, I can telnet to that port.

/cc @miguelmota

@miguelmota
Copy link
Owner

miguelmota commented Sep 25, 2018

@thapakazi is ws://127.0.0.1:8546 the url your ethclient is dialing to? If not try that

@miguelmota
Copy link
Owner

This should work

admin.startWS("0.0.0.0", 8546, "*")

or

admin.startWS("0.0.0.0", 8546, "*", "db,eth,net,web3,personal,web3")

Please reopen if having same issue

@thapakazi
Copy link
Author

Yep it works, thanks.
Lets document this somewhere :neckbeard:

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

No branches or pull requests

2 participants