hashgraph / hedera-json-rpc-relay

Implementation of Ethereum JSON-RPC APIs for Hedera
Apache License 2.0
50 stars 68 forks source link

Metamask hangs when trying to connect to mainnet in Hashio #2881

Closed ebadiere closed 1 month ago

ebadiere commented 1 month ago

Description

When trying to connect metamask to mainnet on hashio it just hangs.

Steps to reproduce

Try to connect your metamask to HashIO's mainnet, https://mainnet.hashio.io/api

Notice that it just spins and does not proceed forward.

Additional context

As part of the connection process metamask runs an eth_getBalance. When running eth_getBalance from postman, it hangs for me as well.

In the logs I am seeing the error below. It may be related:

INFO 2024-08-26T20:53:32.187781979Z [resource.labels.containerName: hedera-json-rpc-relay] [2024-08-26 20:53:30.496 +0000] ERROR (cache-service/84 on mainnet-hashio-6c5898cb49-5mq4f): [Request ID: testRequest] Error occurred while getting the cache from Redis. Fallback to internal cache. Error is: SyntaxError: Unexpected token 'O', "OK" is not valid JSON
  {
    "textPayload": "[2024-08-26 20:53:30.496 +0000] \u001b[31mERROR\u001b[39m (cache-service/84 on mainnet-hashio-6c5898cb49-5mq4f): \u001b[36m[Request ID: testRequest] Error occurred while getting the cache from Redis. Fallback to internal cache. Error is: SyntaxError: Unexpected token 'O', \"OK\" is not valid JSON\u001b[39m",
    "insertId": "j9l8qk3qvr03ho3r",
    "resource": {
      "type": "k8s_container",
      "labels": {
        "location": "us-central1",
        "container_name": "hedera-json-rpc-relay",
        "project_id": "hash-io",
        "pod_name": "mainnet-hashio-6c5898cb49-5mq4f",
        "cluster_name": "hashiomainnet-cluster-2022",
        "namespace_name": "mainnet"
      }
    },
    "timestamp": "2024-08-26T20:53:32.187781979Z",
    "severity": "INFO",
    "labels": {
      "k8s-pod/app": "mainnet-hashio",
      "compute.googleapis.com/resource_name": "gke-hashiomainnet-cl-hashio2022070119-8dfcfc22-l9md",
      "k8s-pod/app_kubernetes_io/instance": "mainnet-hashio",
      "k8s-pod/app_kubernetes_io/name": "mainnet-hashio",
      "k8s-pod/pod-template-hash": "6c5898cb49"
    },
    "logName": "projects/hash-io/logs/stdout",
    "receiveTimestamp": "2024-08-26T20:53:34.220386763Z"
  }

Hedera network

mainnet

Version

v0.54.3

Operating system

macOS

ebadiere commented 1 month ago

Deploying, which causes new instances of the kubernetes pods to start, seems to have resolved this issue for now. I'll keep monitoring.

quiet-node commented 1 month ago

Is this still relevant after the K8s pod restart?

ebadiere commented 1 month ago

No. Restarting K8s seems to have resolved it.