aragon / aragon-cli

CLI for creating and publishing Aragon apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dao install responds with Cannot read property 'replace' of undefined

ethene opened this issue Β· comments

πŸ› Bug Report

Cannot install token request app according the instruction:

aragon dao install token-request.aragonpm.eth --app-init-args

To Reproduce

  1. Retrieve dao apps command. Looks OK:
    aragon dao apps stablefund.aragonid.eth --environment aragon:mainnet
    β Ή Inspecting DAO
    βœ” Inspecting DAO
    βœ” Successfully fetched DAO apps for 0xedce78b7f8945a92974ea1587c5f8856b1b87a41
    β”‚ App β”‚ Proxy address β”‚ Content β”‚
    β”‚ kernel β”‚ 0xedce78b7f8945a92974ea1587c5f8856b1b87a41 β”‚ (No UI available) β”‚
    β”‚ acl β”‚ 0xe0f35ac8e6c8b8ab88d4798becc0865496d623ba β”‚ (No UI available) β”‚
    β”‚ evmreg β”‚ 0x3b207dab13a033205c5d678fd82f427c8a3d3343 β”‚ (No UI available) β”‚
    β”‚ token-manager@v2.1.9 β”‚ 0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc β”‚ ipfs:QmVTZuEn61Txfmjyp8UgKMibGbweJG315A8HBRCzaH2qsL β”‚
    β”‚ vault@v3.1.0 β”‚ 0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7 β”‚ ipfs:QmNhG1DctzrzDWrcAsbhHp184Tt3iCG33LJDfZPbj6WG3k β”‚
    β”‚ finance@v2.1.10 β”‚ 0x2be72a3db610bb6d280818503c94e8c9b6db787c β”‚ ipfs:QmWssF9eT1z4gDF9xZkW6BNhEs2ukGsmT6tXZkB8gKryys β”‚
    β”‚ voting@v2.1.9 β”‚ 0x241b27133d78177f1fb37ea26645bff0d1e1bbad β”‚ ipfs:QmZurkAwfTPGtiDCQr2mEv3fQ8171Yn4QNcA2FC7JUk22U β”‚
    β”‚ address-book@v0.0.5 β”‚ 0x4b6d83235cb0ab1cdce298b6d7b5082f9486c1fe β”‚ ipfs:QmYWjFR3xecabRF92JGPED2UwpeNqT9DDdmG5sUvFPY3E9 β”‚
    β”‚ allocations@v1.0.0 β”‚ 0x6f4f713fcf63ec4d16de98e8aa52ab48c1b67545 β”‚ ipfs:QmSfRFFU23NEBnkCCQj523ycQrLtxpCKS328MuMj9UynrJ β”‚
    β”‚ dot-voting@v0.0.8 β”‚ 0x5a85207224d849b268bccc94600f7793b157ec3b β”‚ ipfs:QmRDvsbtpchWSmzdff9EsERbYG54F2aCZA1zKbuqjEE8RC β”‚
    β”‚ projects@v0.0.10 β”‚ 0x5feeb0f6260eed3d11ac2e35aca5bce4f26047db β”‚ ipfs:QmYUiLYQDZbd5J64weWmPUSVokor3BUw4B7wiSf771CH8o β”‚
    β”‚ rewards@v0.0.8 β”‚ 0x5ef9a4ae569307c833f4a164733223e2416f3bdd β”‚ ipfs:QmPFGTLGJSCTz2v1BFdyHWD7Q7mPSv9ABVxSMB5ehptEZm β”‚

  2. Trying to run the aragon dao install command ends up with an error as per description:
    aragon dao install stablefund.aragonid.eth token-request.aragonpm.eth --app-init-args 0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7 0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc --environment aragon:mainnet
    βœ” Fetching token-request.aragonpm.eth@latest
    ↓ Checking installed version [skipped]
    β†’ Installing the first instance of token-request.aragonpm.eth in DAO
    βœ– Deploying app instance
    β†’ Cannot read property 'replace' of undefined
    Fetching deployed app
    βœ– Invalid initialization params for app. Check the arguments passed with the --app-init-args flag
    Cannot read property 'replace' of undefined

Same result appears when using another parameter format as per docs for --app-init-args:
aragon dao install stablefund.aragonid.eth token-request.aragonpm.eth --app-init-args ["'0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7', '0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc'"] --environment aragon:mainnet

Expected behavior

I expect the aragon-cli to respond with a better explanation of what should happen and if the parameters are correct or not

Actual Behavior

aragon-cli responds with the same error, not allowing to understand what is wrong with the parameters, aragon-cli or the dao

Cannot read property 'replace' of undefined

Same result appears when using another parameter format as per docs for --app-init-args:
aragon dao install stablefund.aragonid.eth token-request.aragonpm.eth --app-init-args ["'0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7', '0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc'"] --environment aragon:mainnet

Error handling should be improved, documentation adjusted with proper examples

Context

Mainnet

(Which network you are using the app with.)

Organization

stablefund.aragonid.eth

Environment

  • OS and OS version: [e.g. Linux Mint 18.0]
    MacOS 10.14.6
  • Browser and browser version: [e.g. Firefox 64.0]
  • Add any other context about the problem here.
    Aragon-cli from NPM

Hi @ethene, thanks for reporting this. It seems the instructions for the Token Request app may be outdated a little bit. The initialization takes 3 parameters: address,address,address[]. So you probably need to add an empty array as the third parameter:

aragon dao install stablefund.aragonid.eth token-request.aragonpm.eth --app-init-args 0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7 0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc "[]" --environment aragon:mainnet

Let me know if it worked.

Looks better, but it is still failing later:

aragon dao install stablefund.aragonid.eth token-request.aragonpm.eth --app-init-args 0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7 0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc "[]" --environment aragon:mainnet
βœ” Fetching token-request.aragonpm.eth@latest
βœ” Fetching token-request.aragonpm.eth@latest
↓ Checking installed version [skipped]
β†’ Installing the first instance of token-request.aragonpm.eth in DAO
❯ Deploying app instance
βœ– Executing newAppInstance(bytes32,address,bytes,bool) on 0xedce78b7f8945a92974ea1587c5f8856b1b87a41
β†’ transaction underpriced
Fetching deployed app
βœ– transaction underpriced

Could you try with a higher gas price with the following option?: --gas-Price

Closing this issue. Let us know if it still doesn't work and we'll reopen it.

Now it went further and executed some transaction but the app is still not deployed after everything.
Please, suggest if I need to open a new ticket:

aragon dao install stablefund.aragonid.eth token-request.aragonpm.eth --app-init-args 0xe8aa182d10252bed21cbe35a1f8cac9b0d9458a7 0xc1ee97ce717c1dfed21543ca56f23303c1d5dffc "[]" --environment aragon:mainnet --gas-price 37
βœ” Fetching token-request.aragonpm.eth@latest
βœ” Fetching token-request.aragonpm.eth@latest
↓ Checking installed version [skipped]
β†’ Installing the first instance of token-request.aragonpm.eth in DAO
βœ” Deploying app instance
↓ Fetching deployed app [skipped]
β†’ App wasn't deployed in transaction.

β„Ή Successfully executed: "Execute desired action as a token holder"

TX:
https://etherscan.io/tx/0x11911c9abc21ab2f9545088276fcfbca6a237a3328a377e335d3ddc105194092

App is not seen in the configuration, on UI or 'aragon dao apps'