Unable to upgrade my canister using the upgrade flag

I’ve tried multiple commands and have seem to be unable to do an upgrade without having to change some functionality in my code.

The first thing I tried was


But this gave me
image
\n
\n
\n
\n
\n
Next, I tried to use the install command instead

But got this

\n
\n
\n
\n
\n
I also tried to stop the canister as well with no avail.

I know its not working as well because I have this variable called block which I print after and before calling the previous calls and it keeps moving up/persisting instead of restarting. It is flexibly defined as well.
image

The only way to get it to upgrade is to add some variable that then sets off the upgrade, but I’d rather not have to keep doing that.

If you’re trying to use dfx deploy to upgrade a canister even though the canister’s wasm did not change, you can use the --upgrade-unchanged parameter.

1 Like