Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy doesn´t works in ic #24

Open
javierpineros opened this issue May 16, 2023 · 6 comments
Open

Deploy doesn´t works in ic #24

javierpineros opened this issue May 16, 2023 · 6 comments

Comments

@javierpineros
Copy link

javierpineros commented May 16, 2023

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:

image

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

@jacmos3
Copy link

jacmos3 commented May 19, 2023

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?

@MioQuispe
Copy link
Owner

Hey guys, working on the new version...
In the mean time you can try:

npm i -S @connect2ic/core@0.2.0-beta.23 @connect2ic/react@0.2.0-beta.23

@jacmos3
Copy link

jacmos3 commented May 21, 2023

Hello, thanks for reply and support

I've tried the svelte version (svelte@0.2.0-beta.23) since I'm using svelte in the project, but after have imported it if I try to "dfx deploy" I receive this error:

Screenshot 2023-05-21 at 15 27 28

Btw which node and dfx versions do you suggest to work with connect2ic/svelte@0.2.0-beta.23?

thanks

@MioQuispe
Copy link
Owner

Hello, thanks for reply and support

I've tried the svelte version (svelte@0.2.0-beta.23) since I'm using svelte in the project, but after have imported it if I try to "dfx deploy" I receive this error:

Screenshot 2023-05-21 at 15 27 28

Btw which node and dfx versions do you suggest to work with connect2ic/svelte@0.2.0-beta.23?

thanks

try npm i -S regenerator-runtime

latest versions should be fine

@jacmos3
Copy link

jacmos3 commented May 22, 2023

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

Screenshot 2023-05-22 at 21 27 55

@jacmos3
Copy link

jacmos3 commented May 22, 2023

When trying to login with AstroX, I receive this error: "Error: process is not defined"
Screenshot 2023-05-22 at 23 16 37

When trying to login with Plug Wallet, I receive this other error (CONNECT_FAILED):
Screenshot 2023-05-22 at 23 17 32

(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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants