{"action":"created","issue":{"url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/2393","repository_url":"https://api.github.com/repos/MetaMask/metamask-extension","labels_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/2393/labels{/name}","comments_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/2393/comments","events_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/2393/events","html_url":"https://github.com/MetaMask/metamask-extension/issues/2393","id":266595255,"number":2393,"title":"MetaMask web3 instance doesn't return events/logs","user":{"login":"bwheeler96","id":1840364,"avatar_url":"https://avatars3.githubusercontent.com/u/1840364?v=4","gravatar_id":"","url":"https://api.github.com/users/bwheeler96","html_url":"https://github.com/bwheeler96","followers_url":"https://api.github.com/users/bwheeler96/followers","following_url":"https://api.github.com/users/bwheeler96/following{/other_user}","gists_url":"https://api.github.com/users/bwheeler96/gists{/gist_id}","starred_url":"https://api.github.com/users/bwheeler96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwheeler96/subscriptions","organizations_url":"https://api.github.com/users/bwheeler96/orgs","repos_url":"https://api.github.com/users/bwheeler96/repos","events_url":"https://api.github.com/users/bwheeler96/events{/privacy}","received_events_url":"https://api.github.com/users/bwheeler96/received_events","type":"User","site_admin":false},"labels":[{"id":602333251,"url":"https://api.github.com/repos/MetaMask/metamask-extension/labels/P1-asap","name":"P1-asap","color":"d22e2c","default":false},{"id":257037922,"url":"https://api.github.com/repos/MetaMask/metamask-extension/labels/T0-bug","name":"T0-bug","color":"fc2929","default":false},{"id":718035930,"url":"https://api.github.com/repos/MetaMask/metamask-extension/labels/bounty%20worthy","name":"bounty worthy","color":"96e05e","default":false}],"state":"open","locked":false,"assignee":{"login":"kumavis","id":1474978,"avatar_url":"https://avatars0.githubusercontent.com/u/1474978?v=4","gravatar_id":"","url":"https://api.github.com/users/kumavis","html_url":"https://github.com/kumavis","followers_url":"https://api.github.com/users/kumavis/followers","following_url":"https://api.github.com/users/kumavis/following{/other_user}","gists_url":"https://api.github.com/users/kumavis/gists{/gist_id}","starred_url":"https://api.github.com/users/kumavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumavis/subscriptions","organizations_url":"https://api.github.com/users/kumavis/orgs","repos_url":"https://api.github.com/users/kumavis/repos","events_url":"https://api.github.com/users/kumavis/events{/privacy}","received_events_url":"https://api.github.com/users/kumavis/received_events","type":"User","site_admin":false},"assignees":[{"login":"kumavis","id":1474978,"avatar_url":"https://avatars0.githubusercontent.com/u/1474978?v=4","gravatar_id":"","url":"https://api.github.com/users/kumavis","html_url":"https://github.com/kumavis","followers_url":"https://api.github.com/users/kumavis/followers","following_url":"https://api.github.com/users/kumavis/following{/other_user}","gists_url":"https://api.github.com/users/kumavis/gists{/gist_id}","starred_url":"https://api.github.com/users/kumavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumavis/subscriptions","organizations_url":"https://api.github.com/users/kumavis/orgs","repos_url":"https://api.github.com/users/kumavis/repos","events_url":"https://api.github.com/users/kumavis/events{/privacy}","received_events_url":"https://api.github.com/users/kumavis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":65,"created_at":"2017-10-18T18:27:06Z","updated_at":"2018-02-11T03:39:11Z","closed_at":null,"author_association":"NONE","body":"I can't get logs from my contract. The following code works fine with the default web3 implementation that comes with truffle:\r\n\r\n```\r\ncontract.MeEvent({}, { fromBlock: 0 }).get((err, data) => console.log(data))\r\n```\r\n\r\nBut 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.\r\n\r\nFor example in the truffle web3 instance, the following requests are logged by testrpc:\r\n\r\n```\r\neth_newFilter\r\neth_getFilterLogs\r\n```\r\n\r\nBut when using the MetaMask implementation, nothing is even submitted to the testrpc instance.\r\n\r\nI 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.\r\n\r\nThe 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"},"comment":{"url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/comments/364717489","html_url":"https://github.com/MetaMask/metamask-extension/issues/2393#issuecomment-364717489","issue_url":"https://api.github.com/repos/MetaMask/metamask-extension/issues/2393","id":364717489,"user":{"login":"lazaridiscom","id":35095758,"avatar_url":"https://avatars1.githubusercontent.com/u/35095758?v=4","gravatar_id":"","url":"https://api.github.com/users/lazaridiscom","html_url":"https://github.com/lazaridiscom","followers_url":"https://api.github.com/users/lazaridiscom/followers","following_url":"https://api.github.com/users/lazaridiscom/following{/other_user}","gists_url":"https://api.github.com/users/lazaridiscom/gists{/gist_id}","starred_url":"https://api.github.com/users/lazaridiscom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazaridiscom/subscriptions","organizations_url":"https://api.github.com/users/lazaridiscom/orgs","repos_url":"https://api.github.com/users/lazaridiscom/repos","events_url":"https://api.github.com/users/lazaridiscom/events{/privacy}","received_events_url":"https://api.github.com/users/lazaridiscom/received_events","type":"User","site_admin":false},"created_at":"2018-02-11T03:39:11Z","updated_at":"2018-02-11T03:39:11Z","author_association":"NONE","body":"@ All: an overdose of caffeine and @smarx excellent test-case (and \"hidden\" fix) made it possible to fix the issue on my side. Please test, and try to avoid to bring up non-related errors.\r\n\r\n@pelsasser , I did it in one chunk instead of spreading it over the days. I hope this fixes things on your side, to.\r\n\r\nIt is important to realize: the original authors did a good job: the code works! They are most possibly busy with other tasks, and so the code remains unmaintained, without any refactoring. This is fine... until a bug comes, or until another developer must take on work.\r\n\r\nWhat i want to say is: this issue is not resolved. Even if the fix works, the code needs to be refactored, thus anyone able to run a js-debugger can hunt the next bug."}}
{"actor":{"display_login":"lazaridiscom"}}