Skip to content

MetaMask web3 instance doesn't return events/logs #2393

@bwheeler96

Description

@bwheeler96

I can't get logs from my contract. The following code works fine with the default web3 implementation that comes with truffle:

contract.MeEvent({}, { fromBlock: 0 }).get((err, data) => console.log(data))

But when I run the same code in a browser using the MetaMask version of web3, nothing happens. The promise never returns, and nothing is ever even sent to the network.

For example in the truffle web3 instance, the following requests are logged by testrpc:

eth_newFilter
eth_getFilterLogs

But when using the MetaMask implementation, nothing is even submitted to the testrpc instance.

I read the compatibility guide and am following it pretty closely. I can send transactions and call contracts just fine. I simple can not filter events.

The web3 version MetaMask is injecting is 0.20.2 and the version that truffle builds with is 0.16.0. Hopefully web3 doesn't have any breaking changes in minor versions

Metadata

Metadata

Assignees

Labels

type-bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions