dfinity / dfinity/sdk

`deploy` and `install` have different argument syntax

Open
#3,495 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
Rust
Stars
204
Forks
98
PR merge metrics
No merged PRs in 30d

Description

I tried the following:

  1. dfx deploy icrc_nft --argument 'record {icrc7_args = null; icrc30_args =null; icrc3_args =null;}'
  2. dfx canister install --wasm icrc_nft.wasm --argument 'record {icrc7_args = null; icrc30_args =null; icrc3_args =null;}' r7inp-6aaaa-aaaaa-aaabq-cai

I expected to see this happen: install accepts the same argument

Instead, this happened: install required me to add brackets

error: parser error
  ┌─ Candid argument:1:1
  │
1 │ record {icrc7_args = null; icrc30_args =null; icrc3_args =null;}
  │ ^^^^^^ Unexpected token
  │
  = Expects "("

Error: Failed to install wasm module to canister 'r7inp-6aaaa-aaaaa-aaabq-cai'.
Caused by: Failed to install wasm module to canister 'r7inp-6aaaa-aaaaa-aaabq-cai'.
  Failed to create argument blob.
    Invalid argument: Invalid Candid values: Candid parser error: Unrecognized token `Record` found at 0:6
Expected one of "("
Meta

dfx --version:

dfx 0.15.2
Further log output

<log output>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two commands shown in the issue, comparing dfx deploy with dfx canister install and their handling of the Candid argument. Trace the argument-parsing entry points for both commands. Done means install accepts the same argument syntax as deploy, with the reported parser error covered by verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.