10 Anonymouse Canister - How to get back the 31 TCycle?

Hi everyone… My TCycle are stucked for 2 years now… I don’t know how to get back the TCycles here…

I have acces to this User Interface :

To sum up :

I am controler of : 2lrqj-5qaaa-aaaal-qbibq-cai ( A cycle wallet created from nns interface)

and 2lrqj-5qaaa-aaaal-qbibq-cai is controller of 10 canister. (all create from its own user interface cycle wallet)

However, I lost the control of the 10 canister and I don’t know how to use 2lrqj-5qaaa-aaaal-qbibq-cai to get back the Tcycles.

Gemini or ChatGPT didn’t find a solution.

EDIT :

For an unknown reason, the T Cycles is quickly consuming automatically now since I made some tries… To preserve the remaining Cycle (that could be useful to unlock the children canister), I used :

dfx canister --network ic stop 2lrqj-5qaaa-aaaal-qbibq-cai

(and It works).

So I give you the interface when it’s up, it’s a Cycle Wallet :

I also tried a command like this:

passio@quentins-mini src % **dfx canister --network ic --wallet 2lrqj-5qaaa-aaaal-qbibq-cai status addr5-kyaaa-aaaal-qbkwa-cai**                     
Error: Failed to get canister status for 'addr5-kyaaa-aaaal-qbkwa-cai'.
Caused by: Failed to get canister status of addr5-kyaaa-aaaal-qbkwa-cai.
Caused by: Failed to call update function 'canister_status' regarding canister 'addr5-kyaaa-aaaal-qbkwa-cai'.
Caused by: Failed to construct wallet canister caller
Caused by: The replica returned a rejection error: reject code CanisterReject, reject message Only a controller or custodian can call this method., error code Some("IC0406")






passio@quentins-mini src % **dfx canister --network ic --wallet 2lrqj-5qaaa-aaaal-qbibq-cai stop addr5-kyaaa-aaaal-qbkwa-cai**
**Stopping code for canister addr5-kyaaa-aaaal-qbkwa-cai, with canister_id addr5-kyaaa-aaaal-qbkwa-cai**
Error: Failed to stop canister addr5-kyaaa-aaaal-qbkwa-cai.
Caused by: Failed to call update function 'stop_canister' regarding canister 'addr5-kyaaa-aaaal-qbkwa-cai'.
Caused by: Failed to construct wallet canister caller
Caused by: The replica returned a rejection error: reject code CanisterReject, reject message Only a controller or custodian can call this method., error code Some("IC0406")

Up please… :folded_hands: I only used native tools to create canisters and I couldn’t imagine It would have been so hard to get back my Tcycle

Make your dfx principal controller of your wallet canister first.
Then try to get canister ids of all the canisters of which this wallet canister is a controller.
After this, you need to upgrade code of this wallet canister to a normal canister with endpoints so that you can update controllers of all those 10 canisters from which you want to retrieve cycles.

To do so, you can use IC management canister endpoints like update-settings and update controllers of all those canisters.
After this is done, you can use “dfx canister delete” command to delete all these 10 canisters and pass flag - - withdraw cycles to as well, to withdraw cycles to any single wallet canister.

Note : There can be other ways to do this as well, this is just one of those ways.

Hi and thanks but… Would you happen to have a more detailed tutorial, please? I don’t know what to do with your instructions. I ever spent 3 hours before with manual, trying all commands.

At which step you are lost? Or feeling difficulty?
Are the steps not clear to you?

You can dm me as well, if thats helpful. I will try to write steps more clearly and in detail.

I believe I currently control my wallet canister with my DFX identity (since I’m able to start and stop it without issue).

Using the interface at canister_portefeuille.ic0.app, I can see the list of all canisters it controls — those are the ones I want to retrieve cycles from.

However, I’m unsure how to properly update the code of my wallet canister to turn it into a “regular” canister. An AI tool did recommend this approach, but I was afraid of making things worse, so I decided not to take the risk and instead came here to ask for help.

I haven’t developed on ICP for years, and even back then I was fairly new to DFX, working only on a small project.

So… I’m simply looking for guidance on how to safely update the code of my wallet canister — the right way.

What files do I need? What commands should I run?

Thanks

Up… please… Can someone help me to update my neuron ?
Thanks…

The command you’re looking for is

dfx canister delete --ic --wallet <your-wallet-id> --withdraw-cycles-to-canister <your-wallet-id> <canister-id>

That will send the remaining cycles to your wallet canister, which you can keep there or send using dfx wallet send <destination> <amount> --ic

Hi, I can’t use these methods… because my canisters are controlled by a wallet-canister (for which I am controler)… I am controller of the Wallet-Canister, but the wallet-canister have sub-canister for which I can’t be directly controller.

The --wallet <your-wallet-id> part of the call I wrote for you will use a feature called “call forwarding” to have the wallet canister make the call for you, since it is the controller. Try it!

Hi and thank you VERY MUCH, I tried your solution today :

For this :

Can you tell me what kind of config file should I use ? Thanks

Interesting, I didn’t think it would expect one for delete. What version of dfx are you using?

I would create a dfx config in an otherwise empty directory that looks like this:

{
  "canisters": {
    "target": {
       "type": "pull",
       "id": "addr5-kyaaa-aaaal-qbkwa-cai"
     }
}

If you are using the latest version of dfx (0.26.1 right now) you should then be able to make the call using

dfx canister delete target --ic --wallet 2lrqj-5qaaa-aaaal-qbibq-cai --withdraw-cycles-to-canister 2lrqj-5qaaa-aaaal-qbibq-cai

I created this dfx.json file :

And then u used this command :

dfx canister delete addr5-kyaaa-aaaal-qbkwa-cai --ic --wallet 2lrqj-5qaaa-aaaal-qbibq-cai --withdraw-cycles-to-canister 2lrqj-5qaaa-aaaal-qbibq-cai

And I got :

I can add you as controller if you can make some tests quicker than me.

I believe the issue is that your dfx principal is not a controller of the wallet. Try running dfx identity get-principal and adding that principal as a controller through the wallet web UI.

Thanks for your answer but. I’m controller. As I showed previously, I can start and stop the canister with the command.

Unfortunately there is a bit of a terminology confusion here - the IC has a list of who is allowed to make canister management operations (e.g. stop and start), which it calls ‘controllers’, and the wallet has a separate list of who is allowed to call its protected functions (e.g. delete another canister), which is also called ‘controllers’. I suspect you are a controller from the IC’s perspective but not the wallet’s. The command I would have suggested trying is dfx wallet controllers, but it looks like you can’t run it against a wallet that isn’t set as your primary. So for now, go to the web UI of 2lrqj-5qaaa-aaaal-qbibq-cai, and add your dfx principal as its controller, even if the NNS says it’s already there.

Thank, I understand. But, from : https://2lrqj-5qaaa-aaaal-qbibq-cai.ic0.app

How to add a new controller ? I don’t think I can.

Ah, my mistake. It looks like there isn’t a button in the web UI for that. In which case, what you can do is overwrite the wallet code, which will automatically add your dfx principal as a new controller. First uninstall the code with dfx canister uninstall-code, then set it up with dfx identity deploy-wallet. Then remember to add your II principal back as a controller with dfx wallet add-controller. I recommend using an older version of dfx when you install the wallet, there’s a known issue with the wallet canister in new dfx versions which will cause the web UI to stop working.

Can you give me a principal and I will add you as controller.

I have been able to delete and transfer cycle for 2 canister. they are They are detected as non-existent
Thank you, I surrend here. Thanks for your help. Anyone who want to try to get back cycle can give me a principal. I think there is about 20-25T cycle remaining.