govern icon indicating copy to clipboard operation
govern copied to clipboard

Cannot deploy subgraph locally

Open sorenrood opened this issue 3 years ago • 3 comments

I am following instructions from this page.

After running sudo yarn init:dev:env I'm getting the following error:

Screen Shot 2022-01-19 at 8 45 29 PM

Full error here:

ubuntu@sorenserver:~/govern$ sudo yarn init:dev:env
yarn run v1.22.17
$ scripts/init.dev.env.sh
$ hardhat compile --force
Compiling 27 files with 0.6.8
@aragon/govern-contract-utils/contracts/erc165/ERC165.sol:16:5: Warning: Function state mutability can be restricted to pure
    function supportsInterface(bytes4 _interfaceId) virtual public view returns (bool) {
    ^ (Relevant source part starts here and spans across multiple lines).

Compilation finished successfully
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
**                                                                              **
**                    Contracts compiled and ABIs extracted                     **
**                                                                              **
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$ HOST_UID=$(id -u) HOST_GID=$(id -g) docker-compose down
Removing govern-server_graph-node_1 ... done
Removing govern-server_postgres_1   ... done
Removing govern-server_ipfs_1       ... done
Removing govern-server_ganache_1    ... done
Removing network govern-server_default
$ HOST_UID=$(id -u) HOST_GID=$(id -g) docker-compose up -d
Creating network "govern-server_default" with the default driver
Creating govern-server_postgres_1 ... done
Creating govern-server_ipfs_1     ... done
Creating govern-server_ganache_1  ... done
Creating govern-server_graph-node_1 ... done
Waiting until containers are ready...
 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
**                                                                              **
**                    All containers started successfully                       **
**                                                                              **
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$ graph create aragon/aragon-govern-rinkeby --node http://localhost:8020
Could not get access token from libsecret (usually gnome-keyring or ksecretservice): 

Cannot store the access token because dependencies are missing. If you
are on Linux, try installing 'libsecret-1-dev' (Debian, Ubuntu etc.) or
'libsecret-devel' (RedHat, Fedora etc.) and reinstalling Graph CLI
afterwards.

The original error was: Cannot find module 'keytar'
Require stack:
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/@graphprotocol/graph-cli/src/command-helpers/auth.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/@graphprotocol/graph-cli/src/commands/auth.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/gluegun/build/loaders/module-loader.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/gluegun/build/loaders/command-loader.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/gluegun/build/runtime/runtime.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/gluegun/build/domain/builder.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/gluegun/build/index.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/@graphprotocol/graph-cli/src/cli.js
- /home/ubuntu/govern/packages/govern-subgraph/node_modules/@graphprotocol/graph-cli/bin/graph
      
Continuing without an access token

Created subgraph: aragon/aragon-govern-rinkeby
 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
**                                                                              **
**                            Subgraph created locally                          **
**                                                                              **
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$ LOCAL=true scripts/deploy.sh aragon govern rinkeby

> Building manifest file subgraph.yaml
Generating manifest from data file: manifest/data/rinkeby.json
{
  "network": "rinkeby",
  "dataSources": {
    "GovernRegistry": [
      {
        "name": "GovernRegistry",
        "address": "0xf46253ef29FaedAbf63AA8cA6c0A41CbbdC93948",
        "startBlock": 9063490
      }
    ]
  }
}

> Generating types
  Apply migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
  Apply migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
  Apply migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
  Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2
✔ Apply migrations
✖ Failed to load subgraph from subgraph.yaml: Error in subgraph.yaml:

  Path: templates > 0 > mapping > abis > 1 > file
  File does not exist: ../govern-contract-utils/abi/contracts/erc20/ERC20.sol/ERC20.json
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
**                                                                              **
**                     Couldn't deploy the subgraph locally                     **
**                                                                              **
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ubuntu@sorenserver:~/govern$ 

sorenrood avatar Jan 20 '22 04:01 sorenrood

Just trying to get started. Any help would be appreciated!

sorenrood avatar Jan 20 '22 04:01 sorenrood

Screen Shot 2022-01-19 at 8 53 12 PM

Looks like it's looking for this file, which does not exist...

sorenrood avatar Jan 20 '22 04:01 sorenrood

My very hacky solution was to create the file and reference the ERC20 ABI from here: https://gist.github.com/veox/8800debbf56e24718f9f483e1e40c35c

Screen Shot 2022-01-19 at 9 15 49 PM

sorenrood avatar Jan 20 '22 05:01 sorenrood