Skip to content

[Bug]: MetaMask stays loading indefinetly and get error StreamProvider - Unknown response id for response: [object Object] when doing *some* contract interactions #17467

Description

@seaona

Describe the bug

Problem: when I call the function for mint an ERC1155 token, MetaMask stays loading indefinetly and I get the console error Error in event handler: Error: StreamProvider - Unknown response id for response: [object Object] .

mint-erc1155-streamprovider.mp4

This also happens when I call another contract function.

streamprovider-error.mp4

[EDITED] It seems the error could start whenever we deploy a contract. It's not 100% deterministic, so further investigation needs to be done.

Steps to reproduce [EDITED]

  1. Go to Remix https://remix.ethereum.org/
  2. Create a contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

contract Fallback {
    event Log(string func, uint gas);
    fallback() external payable {
        emit Log("fallback", gasleft());
    }
    receive() external payable {
        emit Log("receive", gasleft());
    }
    function getBalance() public view returns (uint) {
        return address(this).balance;
    }
}
  1. Deploy this contract on Goerli - see error on console // if not, deploy another contract
  2. Create another contract
contract SendToFallback {
    uint val = 0;
    function transferToFallback(address payable _to) public payable {
        _to.transfer(msg.value);
    }

    function callFallback(address payable _to) public payable {
        (bool sent, ) = _to.call{value: msg.value}("");
        require(sent, "Failed to send Ether");
    }
    function count(uint _val) public {
        val = _val;
    }
}
  1. Deploy this contract on Goerli - see error on console

After this, we are into a broken state, shown in the videos above.

Error messages or log output

No response

Version

develop [EDITED]

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions