# Anonymous Canister

**URL:** <https://forum.dfinity.org/t/anonymous-canister/5449>\
**Category:** Developers\
**Created:** [June 23, 2021, 12:36pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449 "2021-06-23T12:36:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![boxBox](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@boxBox](https://forum.dfinity.org/u/boxBox)\
**Post date:** [June 23, 2021, 12:36pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/1 "2021-06-23T12:36:11Z")

</div>

After topping up cycles and trying to run “dfx deploy --network ic”, i received the following messages:  
Deploying all canisters.  
Creating canisters…  
Creating canister “XXXXXX”…  
An error happened during communication with the replica: error sending request for url ([https://ic0.app/api/v2/canister/rs3zr-XXXXX-XXXXX-XXXXX-cai/read\_state](https://ic0.app/api/v2/canister/rs3zr-XXXXX-XXXXX-XXXXX-cai/read_state)): http2 error: protocol error: not a result of an error

Now, in my cycles wallet, I see an anonymous canister that I am unsure of how to use:  
Anonymous Canister  
r4zuz-XXXXX-XXXXX-XXXXX-cai  
11000000000000 TC

How do I deploy to that specific canister? Are my cycles locked in a canister that I am unable to access due to the http2 error? Thank you!

---

<div class="post-metadata">

**Author:** ![matthewhammer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/matthewhammer/32/323_2.png) [@matthewhammer](https://forum.dfinity.org/u/matthewhammer)\
**Post date:** [June 23, 2021, 12:49pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/2 "2021-06-23T12:49:39Z")

</div>

Perhaps retry the `deploy` again?

Regarding the IDs – `dfx` is stashing the canister ID that you were assigned. I believe that something went wrong, however, before the Wasm could be uploaded. It seems like the failure happens between creating the ID and uploading the Wasm to that ID. Ordinarily, both would occur during `deploy` and you’d be able to interact with your canister after the deployment finishes. In this case, you’ve got a canister ID but I believe, no active canister code (no Wasm) uploaded there, IIUC.

Try doing `tree .dfx/local`.

For my project, I see a list of files with `.did` and `.wasm` as well as a `canister_ids.json` file.

Do you see a tree there with these files?

If so, then perhaps just redo the `deploy` again and see if the error persists. The canister IDs will not be recreated, IIUC.

---

<div class="post-metadata">

**Author:** ![boxBox](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@boxBox](https://forum.dfinity.org/u/boxBox)\
**Post date:** [June 23, 2021, 1:04pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/3 "2021-06-23T13:04:51Z")

</div>

Hi Matthew,

If I run `deploy` again, it asks for 11T more cycles. I do see canister IDs in `.dfx/local`. This project was an example project from the list of tutorials that I am trying to deploy. I also see the `.did` and `.wasm` files.

Could it be an issue that I cloned a sample project?

---

<div class="post-metadata">

**Author:** ![matthewhammer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/matthewhammer/32/323_2.png) [@matthewhammer](https://forum.dfinity.org/u/matthewhammer)\
**Post date:** [June 23, 2021, 1:14pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/4 "2021-06-23T13:14:00Z")

</div>

Do you mind sharing the specific example you are using? I’ll try it myself, and see if there’s just some stale issues in that example that haven’t been addressed for the latest dfx version.

Perhaps you can separately try a local deployment? Both should work, and this doesn’t address the behavior you see on the IC network, but it may provide more information about what is happening.

What happens if you try this?

`dfx start --clean --background` (if you are not already running a local replica)

`dfx deploy --no-wallet`

That is use the local replica, not on the IC network (no `--network=ic`) and avoid the wallet factor entirely by saying `--no-wallet`

Does that local deployment complete successfully?

---

<div class="post-metadata">

**Author:** ![matthewhammer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/matthewhammer/32/323_2.png) [@matthewhammer](https://forum.dfinity.org/u/matthewhammer)\
**Post date:** [June 23, 2021, 1:31pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/5 "2021-06-23T13:31:48Z")

</div>

> [@boxBox](#):
>
> Could it be an issue that I cloned a sample project?

I don’t believe so, no.

To see the status of your canister on the network, a colleague recommends you try

`dfx canister status CanisterName`

Does that work? What do you see?

---

<div class="post-metadata">

**Author:** ![boxBox](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@boxBox](https://forum.dfinity.org/u/boxBox)\
**Post date:** [June 23, 2021, 1:43pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/6 "2021-06-23T13:43:10Z")

</div>

Looking back through the project, I did not clone a sample project. I used `dfx new` to create it. I am able to deploy and run the project locally. If I run `dfx canister status` locally, I get this output:

Canister status call result for XXXXXXX.  
Status: Running  
Controller: rwlgt-iiaaa-aaaaa-aaaaa-cai  
Memory allocation: 0  
Compute allocation: 0  
Freezing threshold: 2\_592\_000  
Memory Size: Nat(BigUint { data: [456073] })  
Balance: 4\_000\_000\_000\_000 Cycles  
Module hash: 0xc0af73985106ca297cf59068599ccbb1ab6505d28bf3802ed8ce11ece238ae9d

I’ve run the following commands, and it looks like it just created a new canister…

`dfx canister --network ic status XXXX`  
Cannot find canister id. Please issue ‘dfx canister --network ic create XXXX’.  
`dfx canister --network ic create XXXX`  
Creating canister “XXXX”…  
“XXXXX” canister created on network “ic” with canister id: “ro7da-XXXXX-XXXXX-XXXX-cai”

I will just add more cycles and see if I can get it to deploy.

---

<div class="post-metadata">

**Author:** ![claudio](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/claudio/32/322_2.png) [@claudio](https://forum.dfinity.org/u/claudio)\
**Post date:** [June 23, 2021, 1:43pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/7 "2021-06-23T13:43:31Z")

</div>

Not sure what is going on but I suspect dfx deploy has created and provisioned the canister, but failed to install the code.  
Try something like

```auto
dfx canister --network ic install XXXXXX

```

(or see `dfx canister --help`)

And see what happens. You may need to specify a wallet to pay for the installation, unless it just uses the default wallet. (I’m no dfx expert, unfortunately).

---

<div class="post-metadata">

**Author:** ![boxBox](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@boxBox](https://forum.dfinity.org/u/boxBox)\
**Post date:** [June 23, 2021, 1:55pm UTC](https://forum.dfinity.org/t/anonymous-canister/5449/8 "2021-06-23T13:55:32Z")

</div>

Okay, the issue seems to be solved now w/o no cycles lost to the ether. After @matthewhammer suggested to run `dfx canister status`, it told me to run `dfx canister --network ic create PROJECT_NAME` which i did (spending 4T cycles). In my root folder, it created a `canister_ids.json`. I copied the format from the `.dfx/local` version and replaced the local id’s with the Anonymous Canister canister id’s listed in my Cycles Wallet. The project successfully deployed after that. Thank you @claudio and matthewhammer for the thoughtful responses!

here is the canister\_ids.json file that was created in my root project folder:

```auto
{
  "PROJECT_NAME": {
    "ic": "XXXXX-XXXXX-XXXXX-XXXXX-cai"
  },
  "PROJECT_NAME_assets": {
    "ic": "XXXXX-XXXXX-XXXXX-XXXXX-cai"
  }
}

```
