Issues with deployment with dfx replica returns not found

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

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

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>

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

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

no difference :frowning:

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>

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

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

1 Like

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.

1 Like

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

1 Like

This works: New and Improved Rust CDK: First-class support for Rust Canister Development - #26 by roman-kashitsyn

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.

1 Like

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

I had to set up a new wallet

1 Like

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