create-ic-app
create-ic-app copied to clipboard
Deploy doesn´t works in ic
I have a project created with create-ic-app@latest command, leaving intact it, it works fine in local, but it doesn´t works in ic, throwing the following javascript error in browser console:
Unable to fetch root key. Check to ensure that your local replica is running
Error: Failed to parse at Uint8ArrayDecoder$2._decode (index.6fb51243.js:65:66389) at Uint8ArrayDecoder$2.decodeFirst (index.6fb51243.js:65:66504) at decode$5 (index.6fb51243.js:66:10453) at HttpAgent$1.status (index.6fb51243.js:78:11) at async HttpAgent$1.fetchRootKey (index.6fb51243.js:78:108) (
caught (in promise) Error: Failed to parse at Uint8ArrayDecoder$2._decode (index.6fb51243.js:65:66389) at Uint8ArrayDecoder$2.decodeFirst (index.6fb51243.js:65:66504) at decode$5 (index.6fb51243.js:66:10453) at HttpAgent$1.query (index.6fb51243.js:72:11) at async _e (index.6fb51243.js:885:2960) at async pr (index.6fb51243.js:2786:3025)
I think that this happens when receiving the response from the backend canister, but I'm not entirely sure
The issue can be easily replicated by creating a project and deploying it to ic without making any changes or additions to the code like these commands:
npx create-ic-app dfx deploy --network ic --> set name, package empty, and select react option
Open the url with the frontend canister and check javascript console.
Thanks for your help
Hello! same here! I have the same exact error. I am using the template-svelte-js and am having the same error on the deployed project. locally works fine (with plug wallet only though, because the Internet Identity button works for connecting but then the $wallet variable has not be filled and so it cannot be used).
Btw any suggestion on how to fix the parse error?
Hey guys, working on the new version... In the mean time you can try:
npm i -S @connect2ic/[email protected] @connect2ic/[email protected]
Hello, thanks for reply and support
I've tried the svelte version ([email protected]) since I'm using svelte in the project, but after have imported it if I try to "dfx deploy" I receive this error:
Btw which node and dfx versions do you suggest to work with connect2ic/[email protected]?
thanks
Hello, thanks for reply and support
I've tried the svelte version ([email protected]) since I'm using svelte in the project, but after have imported it if I try to "dfx deploy" I receive this error:
Btw which node and dfx versions do you suggest to work with connect2ic/[email protected]?
thanks
try npm i -S regenerator-runtime
latest versions should be fine
Ok now it builds and deploys (I'm using dfx 0.14.0, node 16.20.0, npm 8.19.4, and connect2ic 0.2.0-beta.23 both for core and svelte).
I was able to deploy to IC too, but I keep receiving the same error of the first message also with 0.2.0-beta.23 version
When trying to login with AstroX, I receive this error: "Error: process is not defined"
When trying to login with Plug Wallet, I receive this other error (CONNECT_FAILED):
(In the local version, connect with plug wallet works fine tho)
When I try to login with II or StoicWallet, no errors appear, the "connect" button becomes "disconnect", but the $wallet variable is empty or false, so all the #if code which are listening to its changes, does not work properly....
You can see it in the console of this demo app: https://qfs7f-2yaaa-aaaao-ajnma-cai.icp0.io/