graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.92k stars 980 forks source link

[Bug] network not supported by registrar: no network near-testnet found on chain near #5690

Open fewensa opened 3 weeks ago

fewensa commented 3 weeks ago

Bug report

Failed to deploy local subgraph, Can you support near local mode?

I'm try to deploy to local subgraph instance use https://github.com/ringecosystem/xapi-offchain/blob/88a75de6c0f1332fa88a762cf0f3907f9b8be931/packages/near-indexer/docker-compose.yml

related:

code: https://github.com/ringecosystem/xapi-offchain/tree/88a75de6c0f1332fa88a762cf0f3907f9b8be931/packages/near-indexer

Relevant log output

# npm run deploy:darwinia -- xapi-near-testnet subgraph.yaml 

> @ringdao/xapi-indexer-near@0.0.1 deploy:darwinia
> graph deploy --node https://example.com/training/deploy/ --ipfs https://ipfs.network.thegraph.com xapi-near-testnet subgraph.yaml

 ›   Warning: In next version, we are removing this flag in favor of '--deploy-key'
Which version label to use? (e.g. "v0.0.1"): v0.0.1
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
  Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
  Compile data source: receipts => build/receipts/receipts.wasm
✔ Compile subgraph
  Copy schema file build/schema.graphql
  Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
  Add file to IPFS build/schema.graphql
                .. QmR95rdKW6dJ31jtWFFQR98zW3wWzzKxnM7evaHFCriK1v
  Add file to IPFS build/receipts/receipts.wasm
                .. QmYxmWjqpRTnDVRhoXSnQu9nyeT5qWZCtUSAS29Mr4DTet
✔ Upload subgraph to IPFS

Build completed: QmWWcnUXaZMmW4WPvbYL6m6PGuZx9HgFVrDDYySxf3Ht2E

✖ Failed to deploy to Graph node https://example.com/training/deploy/: network not supported by registrar: no network near-testnet found on chain near
UNCAUGHT EXCEPTION: Error: EEXIT: 1

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

OS information

None

tynevosa commented 2 weeks ago

Hi, I'm facing the same issue, is this solved?

andrewmatte commented 6 hours ago

https://ethereum.stackexchange.com/questions/99409/failed-to-deploy-to-graph-node-ethereum-network-not-supported-by-registrar-mai

"That error message “Ethereum network not supported by registrar: mainnet” can be misleading, at least it was in my case. I was getting this error because I had run hardhat node on the host, but not with --hostname 0.0.0.0, and I presume that the same would apply for ganache-cli.

Since the graph-node Docker container is configured to look for an Ethereum network named mainnet at the host’s IP address on the Docker internal network, it couldn’t see the hardhat node that was listening on 127.0.0.1. So really the error wasn’t that “mainnet” wasn’t supported, but that the IP address configured for “mainnet” could not be reached. Running hardhat node --hostname 0.0.0.0 did the trick."

Does this help you?