# Issues with deployment with dfx replica returns not found

**URL:** <https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753>\
**Category:** Command Line Tools\
**Created:** [May 5, 2022, 8:12pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753 "2022-05-05T20:12:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [May 5, 2022, 8:12pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/1 "2022-05-05T20:12:05Z")

</div>

using dfx 0.9.3  
I’m not sure how to debug this or what I can do. I’m running the following command to deploy

```auto
dfx deploy --network ic --with-cycles 1000000000000 --wallet itkk3-mb5lj-jqgt2-3y6fb-sv7rp-aoqhq-efyr7-edb4m-czqiz-43vor-kae

```

and getting this result after build

```auto
Building frontend...
Installing canisters...
Installing code for canister candymachine, with canister_id j6mtw-iaaaa-aaaam-qafnq-cai
Error: The replica returned an HTTP Error: Http Error: status 404 Not Found, content type "text/html", content: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.21.3</center>
</body>
</html>
Building frontend...
Installing canisters...
Installing code for canister candymachine, with canister_id j6mtw-iaaaa-aaaam-qafnq-cai
Error: The replica returned an HTTP Error: Http Error: status 404 Not Found, content type "text/html", content: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.21.3</center>
</body>
</html>

```

---

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [May 5, 2022, 8:29pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/2 "2022-05-05T20:29:53Z")

</div>

Try installing 0.10.0 and running it there - we just added more context to our error messages

```auto
DFX_VERSION=0.10.0 sh -ci "$(curl -fsSL https://smartcontracts.org/install.sh)"

```

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [May 5, 2022, 8:54pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/3 "2022-05-05T20:54:57Z")

</div>

no difference ☹

```nohighlight
Executing 'npx azle candymachine'
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
    Updating git repository `https://github.com/dfinity/candid`
     Ignored package `didc v0.1.4 (https://github.com/dfinity/candid?rev=e7abc462fd54e72e3449999169c12e9f5209d091#e7abc462)` is already installed, use --force to override
warning: be sure to add `../bin` to your PATH to be able to run the installed binaries
    Updating crates.io index
     Ignored package `ic-cdk-optimizer v0.3.4` is already installed, use --force to override
warning: be sure to add `../bin` to your PATH to be able to run the installed binaries
   Compiling azle-js-value-derive v0.0.0 (/home/daniel/Documents/experiments/candymachine/target/azle/canisters/candymachine/azle_js_value_derive)
   Compiling candymachine v0.0.0 (/home/daniel/Documents/experiments/candymachine/target/azle/canisters/candymachine)
    Finished release [optimized] target(s) in 17.47s
Original: 3.41 MiB
Stripping Unused Data Segments...
    Size: 2.10 MiB (38.3% smaller)
Execute a binaryen optimization pass on your WASM....
    Size: 1.90 MiB (9.7% smaller)

Final Size: 1.90 MiB (44.3% smaller)
Building frontend...
Running "npm" "run" "build"...
Installing canisters...
Installing code for canister candymachine, with canister ID j6mtw-iaaaa-aaaam-qafnq-cai
Error: The replica returned an HTTP Error: Http Error: status 404 Not Found, content type "text/html", content: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.21.3</center>
</body>
</html>

```

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [May 5, 2022, 9:52pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/4 "2022-05-05T21:52:13Z")

</div>

hmm ` Installing code for canister candymachine_dip721, with canister ID r7inp-6aaaa-aaaaa-aaabq-cai Error: The replica returned an HTTP Error: Http Error: status 413 Payload Too Large, content type "", content: Request 0x1a6a1f97559fa9d7d88ead9005d44b823d7ad0a03c09465d7225e2b3101be506 is too large. Message byte size 2196830 is larger than the max allowed 2097152.`

when i go back to test

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [May 6, 2022, 12:22am UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/5 "2022-05-06T00:22:19Z")

</div>

@lastmjs you think maybe Azle is making too big of packages ?

---

<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:** [May 6, 2022, 6:26am UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/6 "2022-05-06T06:26:25Z")

</div>

IDK about the 413 error, but the 404 usually happens when you don’t have a wallet configured for this identity on the network you’re using. To check if this is an issue, you can use `dfx identity --network ic get-wallet` and see if you have a wallet configured or not.

---

<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:** [May 6, 2022, 12:06pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/7 "2022-05-06T12:06:34Z")

</div>

You’re deploying to production? If your final Wasm binary is over 2mb you need to gzip it. The next version of Azle will do this for you automatically

---

<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:** [May 6, 2022, 12:58pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/8 "2022-05-06T12:58:22Z")

</div>

This works: [New and Improved Rust CDK: First-class support for Rust Canister Development - #26 by roman-kashitsyn](https://forum.dfinity.org/t/new-and-improved-rust-cdk-first-class-support-for-rust-canister-development/10399/26)

In the next release of Azle a `.gz` version of the binary will automatically be produced that you can use to deploy to mainnet. You just need to manually change your dfx.json to point to the `.gz` file when deploying to mainnet.

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [May 6, 2022, 2:10pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/9 "2022-05-06T14:10:13Z")

</div>

wallet is configured I used to be able to deploy with older versions of dfx. everything broke when I updated to 0.9.3

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [May 6, 2022, 5:19pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/10 "2022-05-06T17:19:36Z")

</div>

I had to set up a new wallet

---

<div class="post-metadata">

**Author:** ![cwb2819259](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cwb2819259/32/1747_2.png) [@cwb2819259](https://forum.dfinity.org/u/cwb2819259)\
**Post date:** [August 30, 2022, 2:52pm UTC](https://forum.dfinity.org/t/issues-with-deployment-with-dfx-replica-returns-not-found/12753/11 "2022-08-30T14:52:22Z")

</div>

I use dfx 0.11.1, but No.gz file found.Has it been updated now?
