All issues which aren't created with this template will get immediately closed.
const contract = web3js.eth.Contract(abi, address);
should (and used to) return a contract instance
instead it throws this error
web3-core-method.umd.js?b3db:226 Uncaught (in promise) TypeError: Duplicated method __ob__. This method is defined as RPC call and as Object method.
web3-core-method.umd.js?b3db:226 Uncaught (in promise) TypeError: Duplicated method __ob__. This method is defined as RPC call and as Object method.
at Object.get (web3-core-method.umd.js?b3db:226)
at observe (vue.runtime.esm.js?2b0e:961)
at defineReactive$$1 (vue.runtime.esm.js?2b0e:1002)
at Observer.walk (vue.runtime.esm.js?2b0e:914)
at new Observer (vue.runtime.esm.js?2b0e:902)
at observe (vue.runtime.esm.js?2b0e:970)
at defineReactive$$1 (vue.runtime.esm.js?2b0e:1002)
at Observer.walk (vue.runtime.esm.js?2b0e:914)
at new Observer (vue.runtime.esm.js?2b0e:902)
at observe (vue.runtime.esm.js?2b0e:970)
[NPM, Node, Web3.js, OS, device...]
most recent versions of npm, node, web3.js (beta 41). in browser (Chrome with metamask)
I'm encountering the same issue with version higher then beta 37. With beta 41 I got all kinds of typescript errors, so no idea what's going on there.
When I downgrade to =beta37 then it works again.
Thanks for submitting this issue!
I've tested it and can't reproduce this error. The thrown error has to come from somewhere else then on the creation of a Contract object. Could you provide further details about when this exactly happens?
This is due to vuejs attaching __ob__ to object as an oberserver, you should skip targets that starts with $ or _ https://011.vuejs.org/api/options.html
@kvhnuke Thanks for the clarification! will check that.
I have the same issue, and yes, I use Vue.js.
We are using Vue.js as well. Our workaround has been to stick with =beta37. Will upgrade to master once this is fixed
Current workaround I used is to use Object.freeze() on the contract that's added to vuex store.
I get this but freezing does not seem to help. Also using Vue
Have the same issue. But I don't even put the contract instance to the state. Just creating an instance by a getter. Any advices?
env:
1) vue + nuxt
2) [email protected]
and I'm using react what about on react?
The proxies who occur this problem will get removed in the 2.x branch as soon as I refactored the public API for BatchRequest. The ES6 Proxy object was required because of the parameters handling for BatchRequests. The solution with the Proxy object is the clean version to handle it without having N bindings.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions
Most helpful comment
This is due to vuejs attaching
__ob__to object as an oberserver, you should skip targets that starts with$or_https://011.vuejs.org/api/options.html