Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Handling Metamask's lack of websocket support/Web3 1.0 #10

Closed
sprice opened this issue Feb 22, 2018 · 16 comments
Closed

Handling Metamask's lack of websocket support/Web3 1.0 #10

sprice opened this issue Feb 22, 2018 · 16 comments

Comments

@sprice
Copy link

sprice commented Feb 22, 2018

First of all. This looks super amazing! Thank you!

Using this with Metamask results in Error: The current provider doesn't support subscriptions: MetamaskInpageProvider metamask-extension/2601 & metamask-extension/2350

Does this mean that the subscription parts of Drizzle can't be used with Metamask at the moment?

edit: Note I'm using the drizzle truffle box with Ganache

@andytudhope
Copy link

Same error as above for me 👍

@Coolpix
Copy link

Coolpix commented Feb 28, 2018

Same for me!

@apanizo
Copy link

apanizo commented Feb 28, 2018

The same result using the same environment, but if I disable metamask... I get..

EDIT: That problem was caused because I did not have the latest (beta) version of ganache-cli (see my next comment).

screenshot 2018-02-28 17 09 57

Let me know if I should open a new issue or need something else.

And... congrats! The project looks amazing!

@apanizo
Copy link

apanizo commented Feb 28, 2018

Sorry! My bad, after reading this and this, I realised I just needed to update my ganache-cli version.

Thanks!

@sprice
Copy link
Author

sprice commented Feb 28, 2018

Ah. I'm using the Ganache App (1.0.2). I guess I need to switch over to the CLI and wait for the app to be updated. Thanks.

I'm going to test this out tonight to be sure and then likely close the issue.

@apanizo
Copy link

apanizo commented Feb 28, 2018

Oh sorry, I just tried to say the ws problem, which only happens if you disable Metamask, was solved after updating the ganache-cli to the beta version, but the error you reported, using Metamask, is still there. We have to wait until Metamask is updated.

In other words, this issue makes sense 👍

@jaderiverstokes
Copy link

I'm working on an app using ws with drizzle to load data and metamask to process the transactions. So it is possible, although it's quite messy.

@elie222
Copy link

elie222 commented Mar 6, 2018

So seems like Drizzle is mostly unusable right now as MetaMask is the main way to interact with Dapps?

@elie222
Copy link

elie222 commented Mar 6, 2018

Would it be possible to use Infura for websockets and MetaMask for everything else?

I see Infura recently added WS support:
INFURA/infura#29

@davekaj
Copy link

davekaj commented Mar 6, 2018

@elie222 yes, i have done that as a solution. you need to keep track of two different web3 instance. it is a hacky solution that works for now

@elie222
Copy link

elie222 commented Mar 6, 2018 via email

@keithpops
Copy link

@cooper-sloan && @davekaj I'm very interested in seeing what methods you've come up with in managing multiple web3 instances to use drizzle with MetaMask. I've also been investigating this and would love to see what other solutions people have come up.

@arjunyel
Copy link

arjunyel commented Mar 7, 2018

If anyone could write up a quick tutorial on the workaround for using Drizzle with metamask that would be a HUGE help to the community :)

@davekaj
Copy link

davekaj commented Mar 7, 2018

damn, sorry was not paying enough attention, i have not done this with drizzle. i only did it with a normal react project

@balasan
Copy link

balasan commented Mar 24, 2018

I got it working with Metamask — using infura rpc for websocket updates and metamask for accounts and transactions: https://github.com/relevant-community/drizzle/blob/master/src/Drizzle.js

It's building on PR #15 but also storing the Metamask instance of web3 and using it for drizzle contract calls.

Beware my fork has some braking changes in the accounts reducer - list of accounts is now stored in ids field to accommodate and additional balances field.

@OnlyOneJMJQ
Copy link
Contributor

OnlyOneJMJQ commented Apr 22, 2018

Right off the bat I've got to apologize for not hopping in this conversation earlier!

Today, Drizzle supports MetaMask via a fallback to their very own eth-block-tracker package (see release v1.1.4). Release notes for v1.1 are also relevant as it was the first time MetaMask support rolled out.

Hope you'll all give it another shot if you haven't already. 🙂

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