When I run dfx deploy --network ic
Sometimes the new frontend code is seen immediately. Other times I do not see the new code loading for a long time. I have tried hard refresh, etc.
Any ideas or docs on duration until live?
When I run dfx deploy --network ic
Sometimes the new frontend code is seen immediately. Other times I do not see the new code loading for a long time. I have tried hard refresh, etc.
Any ideas or docs on duration until live?
Itâs going to vary depending on what youâre uploading, but as soon as the output from dfx deploy finishes and your terminal is ready to accept input again, your canister should be live
@kpeacock That is what I expected, but⌠it is no longer working. Up until when I posted this, it was working fine.
index.5dcfc311.js should be the lates js file served according to the terminal. I see [index.110754bd.js. This is the file from 4 -5 pushes ago.
Hmm, it seems like youâre hashing your filenames, so we may not be overwriting them in an attempt to optimize. Try dfx deploy --network ic --mode reinstall
I am on dfx 0.7.0, using a Mac
dfx deploy --network ic --mode reinstall
Preformatted text**error:** Found argument '--mode' which wasn't expected, or isn't valid in this context If you tried to supply
âmodeas a PATTERN use
â --mode`
Oh whoops, forgot that we donât have that argument on deploy. Youâll need to do dfx build
and dfx canister --network ic install <canister-name> --mode reinstall
You may also want to update to dfx 0.7.2
@kpeacock I really thought this would work. But noooo!
Upgraded to DFX 0.7.2, and then built and pushed with the commands above. It took longer to redeploy. Which suggests it was adding in new files/ But on hard refresh I still see index.110754bd.js, the old file.
Yeah, things kinda seem like theyâre working. It might be that the old index.html
is still hanging around. Can you compare the index.html you have with the one thatâs live, and maybe try deleting your build output directory and re-running your build job on your machine?
This was working yesterday and then it stopped after the 2- 3rd push of the day.
I tried deleting and rebuilding on local. Then pushing again as you suggested.
I still see the old index.html code which does not match the one I have just built and deployed. To test I changed the index.html to have ICME V0.2 as the title.
Other note: when I run âdfx buildâ it automatically deletes all of the contents of dist folder, and adds new files.
Without pairing on this with you, Iâm not sure what else to try. Maybe double-check the dfx.json
and canister_ids.json
to make sure that youâre pointing to the same canister? Mode reinstall ought to replace the asset canisterâs wasm with the latest one and then re-upload all the files
This is a tough one. No general project changes were made since it was working and now. It just simply stopped deploying new code, no errors being shown. Very basic JS changes, and not dfx changes. etc.
When you view the source of the site on your end, what asset.js file do you see? It might be cacheing or some other network feature.
My local subnet might hate me.
Iâm still getting the v.01 site, so this could be a caching issue. Iâll check in with the boundary nodes team
Iâm seeing v.0.2 now. I donât know if you tried something different, or if something was just hung up
Hi @kpeacock . Thanks for your help. I used Git to resolve the problem. Reverted back to the previous day, changed v0.1 to v0.2 and pushed. It worked. Moved back to present, checked differences, and found it!
In my root I have canister_ids.json. Not sure how it happened, but those ids were changed. Moved back to the old canister_ids.json and deploys work again.
How do I delete those newly created canisters from IC or turn them off?
If you want to reclaim the cycles, I recommend installing a cycles wallet to them and sending their balance back to your main wallet.
Otherwise, dfx canister stop
and dfx canister delete
will shut them down
Thank you! I guess now I have a staging and production environment.