# Blob arguments for for init and post\_upgrade come in as an empty array

**URL:** <https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117>\
**Category:** Developers\
**Tags:** dfx\
**Created:** [January 30, 2024, 3:30am UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117 "2024-01-30T03:30:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdemann](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bdemann/32/6303_2.png) [@bdemann](https://forum.dfinity.org/u/bdemann)\
**Post date:** [January 30, 2024, 3:30am UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117/1 "2024-01-30T03:30:26Z")

</div>

I have the following rust canister

```rust
#[ic_cdk::init]
fn my_init(param: Vec<u8>) {
    ic_cdk::println!("INIT: {:?}", param)
}

#[ic_cdk::post_upgrade]
fn my_post(param: Vec<u8>) {
    ic_cdk::println!("POST: {:?}", param)
}

```

Which I am trying to build with this following command

```bash
dfx deploy init_blob --argument '(vec {185; 204})'

```

But I get the following output

```bash
[Canister bkyz2-fmaaa-aaaaa-qaaaq-cai] INIT: []

```

I started seeing this issue on dfx version 0.15.3-largewasm.0 and I am still seeing it on 0.16.0  
Version 0.15.3 and earlier works fine.

Any ideas what’s going on?

---

<div class="post-metadata">

**Author:** ![Kjae](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kjae/32/13984_2.png) [@Kjae](https://forum.dfinity.org/u/Kjae)\
**Post date:** [January 30, 2024, 4:27am UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117/2 "2024-01-30T04:27:35Z")

</div>

Could this be a subnet issue?

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [January 30, 2024, 11:38am UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117/3 "2024-01-30T11:38:28Z")

</div>

@Vivienne we found this problem while running the Azle test suite, seems to be a major regression in dfx.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [January 30, 2024, 12:23pm UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117/4 "2024-01-30T12:23:13Z")

</div>

IIRC we moved to Candid 0.10 with this version bump. I’ll investigate

---

<div class="post-metadata">

**Author:** ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)\
**Post date:** [January 30, 2024, 5:31pm UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117/5 "2024-01-30T17:31:52Z")

</div>

I can reproduce this locally, probably some changes in Candid 0.10 caused this.

Here is what I found so far: `--argument '(vec {185:nat8; 204:nat8})'` and `--argument 'blob "\be\ef"'` works.

I will report back when I know more.

---

<div class="post-metadata">

**Author:** ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)\
**Post date:** [January 30, 2024, 6:08pm UTC](https://forum.dfinity.org/t/blob-arguments-for-for-init-and-post-upgrade-come-in-as-an-empty-array/27117/6 "2024-01-30T18:08:41Z")

</div>

It should be fixed here: [fix IDLValue blob conversion by chenyan-dfinity · Pull Request #517 · dfinity/candid · GitHub](https://github.com/dfinity/candid/pull/517)

Before that lands in dfx, I would suggest to use the `blob "\xx\xx"` syntax for `vec nat8` type.
