# Coded Component Script does not load?

**URL:** <https://community.appfarm.io/t/coded-component-script-does-not-load/655>\
**Category:** Bug reports\
**Tags:** coded-component\
**Created:** [August 29, 2023, 11:17am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655 "2023-08-29T11:17:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgreodor](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kgreodor](https://community.appfarm.io/u/kgreodor)\
**Post date:** [August 29, 2023, 11:17am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/1 "2023-08-29T11:17:47Z")

</div>

We are using a coded component, the one in beta. It has been working for a while. But a over the weekend it suddenly stopped working. The issues seems to be related to a script not loading.

The error I get looks like this

```auto
Refused to execute script from 'https://..../undefined' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

```

Is this a bug or?

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [August 30, 2023, 6:50am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/2 "2023-08-30T06:50:45Z")

</div>

Hi!

Did you deploy just before the weekend? Or did this happen independently?

---

<div class="post-metadata">

**Author:** ![kgreodor](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kgreodor](https://community.appfarm.io/u/kgreodor)\
**Post date:** [August 30, 2023, 7:30am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/3 "2023-08-30T07:30:46Z")

</div>

I deployed last week, and sometimes inbetween it suddenly stopped working. And not able to debug since the script that is tied to the coded component does not seem to load. No console logs etc.

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [August 31, 2023, 6:33am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/4 "2023-08-31T06:33:08Z")

</div>

Hi!

Is the script code itself added in Appfarm, or is this just the URL to the script?

I notice that the script URL in your screenshot has “undefined” in it, could that also be something to look into?

---

<div class="post-metadata">

**Author:** ![kgreodor](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kgreodor](https://community.appfarm.io/u/kgreodor)\
**Post date:** [August 31, 2023, 7:27am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/5 "2023-08-31T07:27:03Z")

</div>

Sorry, I removed too much of the URL. It’s added inn the code part of the CodedComponent.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/0d76bc4b3f0963975845a70498a716c0b6c08f1b.png)

```auto
playlist:1 Refused to execute script from 'https://{accname}.appfarm.app/{appname}/layout/undefined' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

```

Feels wonky… Not sure were the error is.

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [August 31, 2023, 7:41am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/6 "2023-08-31T07:41:55Z")

</div>

Hi,

Thats not a valid URL? Looks like your set up that dynamic url wrong? Do you have a function there, trying to construct a URL, but you’ve forgot the dollar-sign in front of the `{accname}` (should be `${accname}`)?

---

<div class="post-metadata">

**Author:** ![kgreodor](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kgreodor](https://community.appfarm.io/u/kgreodor)\
**Post date:** [August 31, 2023, 8:07am UTC](https://community.appfarm.io/t/coded-component-script-does-not-load/655/7 "2023-08-31T08:07:45Z")

</div>

Sorry for not being clear. These are just dummy variables. So in reality {accname} is an actual appfarm account name etc etc.
