Skip to content

Metamask crashes after the connector starts #17

@dbarasti

Description

@dbarasti

I'm trying to authenticate transactions using metamask. I execute the following code but once I connect to page localhost:3333, MetaMask plugin crashes. It tries to show me the transaction notification but then goes blank.

async function connectToMetamask() {
  const connector = new MetaMaskConnector({
    port: 3333,
    onConnect() {
      console.log('MetaMask client connected')
    },
  });

  // Now go to http://localhost:3333 in your MetaMask enabled web browser.
  console.log("Go to http://localhost:3333");
  await connector.start();
  const web3 = new Web3(connector.getProvider());
  // Use web3 as you would normally do. Sign transactions in the browser.
  CampaignContract.setProvider(connector.getProvider());
}

Screenshot from 2020-06-19 12-10-59

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions