Unable to deploy to the IC Network

Hello,
My dapp is presently Live on https://rbsr6-fyaaa-aaaai-aarwa-cai.ic0.app/

However, I had to change my laptop, and now I am unable to push to the live app
I have signed in the nns app (Not sure if it is relavent)

Installing canisters...
Upgrading code for canister ttbl, with canister_id ruvat-eqaaa-aaaai-aarvq-cai
The replica returned an HTTP Error: Http Error: status 403 Forbidden, content type "", content: Requested canister rejected the message

This is the error message which I am getting when I try to deploy using the command dfx deploy --network ic --no-wallet

and this is the error which I get when I try with dfx deploy --network ic

Building frontend...
Installing canisters...
Upgrading code for canister ttbl, with canister_id ruvat-eqaaa-aaaai-aarvq-cai
The Replica returned an error: code 3, message: "Canister ruvat-eqaaa-aaaai-aarvq-cai has no update method 'wallet_call'"

Thanks for the help!

Since you changed your laptop I am guessing that you are now using a different principal than the one you were using on your old laptop? We can also have a hint from the first error message Http Error: status 403 Forbidden means you are not authorized to do this change.
If yes then you can’t push code to the live site with your new principal, you need the old one.
If you already have taken care of this, then it’s another issue, maybe a more experienced one could help.

1 Like

Thanks, that makes sense…
How then do I retrieve and use my old principal?

If you have a backup of your old laptop, you can find the private key of that principal at the default location: “~/.config/dfx/identity/default/identity.pem”

2 Likes

Do you still have access to your old laptop?

No, unfortunately I do not have access

however I see that the nns app gives me the original principal…
is it somehow possible to set the identity here using the older principal?

I dont have the private keys, but I believe I have the prinicipal

Principal only won’t work, if you lost access to your private key you lost access to your app.

Aah I see thanks! that sucks
lesson learnt

Is there a guide on best practises for deployments?
I have seen some people use multiple canisters fronted by a LoadBalancer?

1 Like

I don’t have enough knowledge in that area, on another note did you mention you see your principal in your nns?
Did you assign your principal in the nns to be a controller of that canister? if yes then there’s hope.

there are 3 canisters in the nns app
all 3 say that “You are not the controller of this canister.”

and the front end canister where the app is deployed does not show up on the nns.

Im very new to this… and just got it to work somehow…

has no controllers apparently

1 Like

Yup it was worth the try though, your dapp looks cool :slight_smile:

1 Like

Usually what I do is to create the canister first from the nns and then add another controller to it which is my default dfx principal, or the vise versa.
More info here:

1 Like

Thanks for this information. I will try to set up a new dapp with these steps

i followed the steps you had mentioned here…
however now I am getting this error

The replica returned an HTTP Error: Http Error: status 404 Not Found, content type "", content: Requested canister has no wasm module

Can you give more details how and where you get this error?

I created the canisters through nns. then I added my prinicipal as controllers to the 2 canisters i have created.
i also changed the canister_ids.json file with the new canisters i have created

then I try to do “dfx deploy network=ic”

Building frontend...
Installing canisters...
Installing code for canister ttbl, with canister_id wsxna-waaaa-aaaam-qaa2a-cai
The replica returned an HTTP Error: Http Error: status 404 Not Found, content type "", content: Requested canister has no wasm module

I think you need to install first
dfx canister install
Edit: looks like you already installed

am getting a different error when I try to install:

An error happened during communication with the replica: error sending request for url (http://127.0.0.1:8000/api/v2/status): error trying to connect: tcp connect error: Connection refused (os error 61)

You need the --network ic flag for your command to actually install/deploy your canisters on the IC.