# Error when loading front-end of my application

**URL:** <https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441>\
**Category:** Developers\
**Created:** [August 13, 2021, 2:15am UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441 "2021-08-13T02:15:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 13, 2021, 2:15am UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/1 "2021-08-13T02:15:31Z")

</div>

Hi

I have just deployed the canister on ic network using the below command:

```auto
dfx deploy --network ic

```

backend is working fine, and both backend and front work fine on the local network, however, on the ic network I get the following error. Anyone knows how I can troubleshoot?

```auto
Internal Server Error

```

[https://uaim5-2aaaa-aaaai-qaesq-cai.raw.ic0.app](https://uaim5-2aaaa-aaaai-qaesq-cai.raw.ic0.app/)

---

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 14, 2021, 5:13pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/2 "2021-08-14T17:13:55Z")

</div>

I’ve been trying to get the root of this with no luck! Any help is appreciated. Should I do anything else after deploy?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [August 15, 2021, 9:13am UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/3 "2021-08-15T09:13:43Z")

</div>

Can you share more details? Like your deploy logs and, maybe even the code repo of your app?

Not sure I can help though but, can compare with mine that works out.

---

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 16, 2021, 3:59pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/4 "2021-08-16T15:59:57Z")

</div>

Thank you. Here is the log:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/f/fb3d0abfceb9b45c38461cfb3e70a9a74e22e43e.png)

Also the code is a modified version of CanCan available here:  
[functionland/cancan: A scalable video sharing service. (github.com)](https://github.com/functionland/cancan)

It works fine when deployed locally (both FO and BO tested on Ubuntu)  
But when deploy to ic and loading FO, it gives that error message.  
Here is a screenshot of it runing locally:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/f/fd313f768847484b2ba8f2fb3e3131dd0bf56848.png)

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [August 16, 2021, 4:23pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/5 "2021-08-16T16:23:24Z")

</div>

I think you issue is that you do not have a canister deployed for your frontend.

If I check your [dfx.json](https://github.com/functionland/cancan/blob/6bd0d954e8efe7edff00518d7d432355c7989463/dfx.json#L3), there is only a reference to one canister, the backend one, the one you deployed.

If I check CanCan [dfx.json](https://github.com/dfinity/cancan/blob/031f31c0f45af72e42416043e1a2415642844d4e/dfx.json#L6) there are two. A backend one as you did and, another one of type `assets` that serve the frontend app.

You should also deploy that canister and it is then the one you will access through your browser.

---

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 16, 2021, 4:39pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/6 "2021-08-16T16:39:06Z")

</div>

Thank you! I totally missed it and was defenitely a problem there. However, I am still getting the same eeor after changing the dfx and now I see assets are uploaded too. Unless it takes some time due to propagation stuff:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/4feed9e08c77765f8113f5ce645ef3f7cdff5b69.png)  
 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/d/db67d717c82add0e7fd4d2ca332c005026854683.png)

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [August 16, 2021, 4:47pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/7 "2021-08-16T16:47:35Z")

</div>

It actually works out, just tested 😉.

Now that you have deployed the assets / your frontend app, you should use the new canister ID to access it through your browser.

[https://bv7wf-6qaaa-aaaai-qahbq-cai.raw.ic0.app/](https://bv7wf-6qaaa-aaaai-qahbq-cai.raw.ic0.app/) instead of previously / your backend cannister [https://uaim5-2aaaa](https://uaim5-2aaaa)…

---

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 16, 2021, 5:00pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/8 "2021-08-16T17:00:55Z")

</div>

Thanks for the help 😃

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [August 16, 2021, 5:11pm UTC](https://forum.dfinity.org/t/error-when-loading-front-end-of-my-application/6441/9 "2021-08-16T17:11:53Z")

</div>

My pleasure, glad it worked out!
