# Topping up canister just hanging

**URL:** <https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899>\
**Category:** Developers\
**Tags:** Functional-Programming\
**Created:** [October 7, 2024, 7:36am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899 "2024-10-07T07:36:42Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 7, 2024, 7:36am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/1 "2024-10-07T07:36:42Z")

</div>

I can’t seem to send cycles:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/b/3/b347c3317dab2e043b2a4bff9767ba9a91528f91.jpeg)

Maybe I need to wait… It just hangs forever

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 7, 2024, 7:59am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/2 "2024-10-07T07:59:05Z")

</div>

Restarted my PC and it worked… weird.

---

<div class="post-metadata">

**Author:** ![marc0olo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/marc0olo/32/17290_2.png) [@marc0olo](https://forum.dfinity.org/u/marc0olo)\
**Post date:** [October 7, 2024, 8:05am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/3 "2024-10-07T08:05:44Z")

</div>

Hi @jamesbeadle,

I can’t judge about the command that send cycles, but I am glad it worked now! 🙂

Definitely it shouldn’t be stuck and leave you without any feedback. Wondering when this can happen 🤔 (cc @Vivienne)

In the future it would be great if you share the commands or at least the canister id in a written form such as `y22zx-giaaa-aaaal-qmzpq-cai`. That makes it easier to analyse stuff quickly, though it isn’t that important in your case.

---

<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:** [October 7, 2024, 8:06am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/4 "2024-10-07T08:06:42Z")

</div>

I assume your wallet is on one of the overloaded subnets and did not respond because of that

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 7, 2024, 8:13am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/5 "2024-10-07T08:13:03Z")

</div>

Yeah like now, it’s still hanging:

```auto
dfx wallet --network ic send y22zx-giaaa-aaaal-qmzpq-cai 25_000_000_000_000

```

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/6/4/6473dfd1e6e624626c4fcced7b22ca4a74fdb3d9.jpeg)

I’ll just keep trying

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 7, 2024, 8:25am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/6 "2024-10-07T08:25:29Z")

</div>

Yeah so worked again after a little while

---

<div class="post-metadata">

**Author:** ![Ray04](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ray04/32/24164_2.png) [@Ray04](https://forum.dfinity.org/u/Ray04)\
**Post date:** [October 7, 2024, 8:26am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/7 "2024-10-07T08:26:11Z")

</div>

I’m just a new person here.  
But, I noticed that the top-up canister command recently changed from  
Existing: dfx cycles top-up AMOUNT CANISTER\_ID --network ic  
New: dfx cycles top-up CANISTER\_ID AMOUNT --network ic

and I see that you’re using send rather than top-up, this could be a rookie mistake from my side, but can it be that it’s the command fault? or could be the load like @Vivienne said, but can you try the top-up command?

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 7, 2024, 9:41am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/8 "2024-10-07T09:41:33Z")

</div>

Ah nice spot could be this, I’ve actually got them topped up but I’ll try this new command next time.

The command I was using ultimately worked, just kept intermittently timing out.

---

<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:** [October 7, 2024, 11:34am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/9 "2024-10-07T11:34:34Z")

</div>

> [@Ray04](#):
>
> Existing: dfx cycles top-up AMOUNT CANISTER\_ID --network ic  
> New: dfx cycles top-up CANISTER\_ID AMOUNT --network ic

I don’t think that specifically changed, but `dfx ledger top-up`, dfx cycles top-up`, and `dfx canister deposit-cycles` have no consistent order of arguments.

In general I try to steer people away from `dfx wallet send` as it calls `wallet_receive` on the target canister which the target canister then needs to accept manually. The other commands all do `deposit_cycles` via the management canister, which will always succeed

---

<div class="post-metadata">

**Author:** ![Ray04](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ray04/32/24164_2.png) [@Ray04](https://forum.dfinity.org/u/Ray04)\
**Post date:** [October 7, 2024, 11:49am UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/10 "2024-10-07T11:49:09Z")

</div>

here: [fix: topping-up-canister Option 2 command by wantedbear007 · Pull Request #3548 · dfinity/portal · GitHub](https://github.com/dfinity/portal/pull/3548)  
I see that on entering the existing order there’s an error generated:  
invalid value ‘jqylk-byaaa-aaaal-qbymq-cai’ for ‘’: Unknown amount specifier: ‘i’  
Can you confirm me this please?  
and apparently this pull was approved and docs are updated accordingly also, so I’d like to know if the change is necessary or not, thanks.

---

<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:** [October 7, 2024, 12:35pm UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/11 "2024-10-07T12:35:28Z")

</div>

The `--help` flag is always the source of truth. That output is autogenerated by `clap` (the CLI args parsing crate we use).

```plaintext
❯ dfx cycles top-up --help
Send cycles to a canister

Usage: dfx cycles top-up [OPTIONS] <TO> <AMOUNT>

```

So yes, that PR was correct

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 14, 2024, 1:14pm UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/12 "2024-10-14T13:14:50Z")

</div>

Hi @Vivienne,

How do I add cycles to use this command:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/1/e/1e37c222df44739acdd41cdcb63b22b67b7094b4.png)

I have a cycles canister in my NNS account but not sure how i get it so i can use it with dfx cycles for my user.

---

<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:** [October 14, 2024, 1:24pm UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/13 "2024-10-14T13:24:27Z")

</div>

You have to `deposit` to the cycles ledger with cycles attached, specifying `(record { to = record {owner = principal "[...]"}})` in the args. I don’t think that’s possible using the NNS dapp

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [October 14, 2024, 1:40pm UTC](https://forum.dfinity.org/t/topping-up-canister-just-hanging/35899/14 "2024-10-14T13:40:24Z")

</div>

I got it working with this command:

```auto
dfx canister --network ic deposit-cycles 30_000_000_000_000 5gbds-naaaa-aaaal-qmzqa-cai

```

Thanks
