I’m new to dfinity and started working recently but stuck at one issue.
ICP backend and frontend canister url running well after I ran dfx deploy.
Please refer the screen shot.
Both is working but if I run dfx deploy and then try to do npm start then my browser asks credentials & I’m unable to proceed. As a result my code written to connect backend to frontend I’m not able to verify.
refer below screenshot of terminal & issue.
If I run npm start in new terminal without dfx deploy then it is creating new localhost 8081 and I’m not facing issue to load the url in browser. But this url do not connect with ICP code.
I tried few things and then realized since my index.js and main.css had comments at start due to which may be when I used frontend url then my css did not load properly. Also did not observed any connection between frontend and backend as data was not getting pulled from the backend.
I’m new to ICP & dfinity so I’m referring to some tutorial online and as per that dfx deploy must be followed by npm start to get the localhost url.
Even the blog I referred talks about npm start to deploy dapp locally.
Hi sir,
I just started exploring ICP when I started my first dapp and give my name to it and pressed the “click me button” it is giving this error
Server returned an error:
Code: 400 (Bad Request)
Body:
AgentError: Server returned an error:
Code: 400 (Bad Request)
Body:
at HttpAgent._HttpAgent_requestAndRetry (http://localhost:8080/index.js:1352:11)
at async HttpAgent._HttpAgent_requestAndRetry (http://localhost:8080/index.js:1350:16)
at async HttpAgent._HttpAgent_requestAndRetry (http://localhost:8080/index.js:1350:16)
at async HttpAgent._HttpAgent_requestAndRetry (http://localhost:8080/index.js:1350:16)
at async Promise.all (index 0)
at async HttpAgent.call (http://localhost:8080/index.js:925:43)
at async caller (http://localhost:8080/index.js:265:61)
at async HTMLFormElement.<anonymous> (http://localhost:8080/index.js:22558:20)