# Sketch is stuck on loading

**URL:** <https://discourse.processing.org/t/sketch-is-stuck-on-loading/33126>\
**Category:** Coding Questions\
**Created:** [October 28, 2021, 4:00am UTC](https://discourse.processing.org/t/sketch-is-stuck-on-loading/33126 "2021-10-28T04:00:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gm314](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@gm314](https://discourse.processing.org/u/gm314)\
**Post date:** [October 28, 2021, 4:00am UTC](https://discourse.processing.org/t/sketch-is-stuck-on-loading/33126/1 "2021-10-28T04:00:59Z")

</div>

I created a sketch that contains a pre-load function and uploaded it to my website’s ftp on dreamhost. The preload references a csv file via a url. The sketch runs fine in the p5js web editor. But it won’t run on my site.

I have seen posts that solve a similar issue for local executions which involve setting up a local server. However, I haven’t seen any fixes for ftp based issues. Can anyone assist?

---

<div class="post-metadata">

**Author:** ![philipplehmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philipplehmann/32/4111_2.png) [@philipplehmann](https://discourse.processing.org/u/philipplehmann)\
**Post date:** [October 28, 2021, 9:10am UTC](https://discourse.processing.org/t/sketch-is-stuck-on-loading/33126/2 "2021-10-28T09:10:00Z")

</div>

Are there any error messages when you open the console in the developper tools?  
One thing that pops to mind are [Cross-Origin Resource Sharing (CORS) - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) errors.

---

<div class="post-metadata">

**Author:** ![gm314](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@gm314](https://discourse.processing.org/u/gm314)\
**Post date:** [October 28, 2021, 3:30pm UTC](https://discourse.processing.org/t/sketch-is-stuck-on-loading/33126/3 "2021-10-28T15:30:23Z")

</div>

No error messages whatsoever. It just won’t load. And I know it’s not the code because it works fine in the p5 online editor. So I’m very puzzled.

Is it correct to assume that no setup function code runs until the preload is completed?

---

<div class="post-metadata">

**Author:** ![philipplehmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philipplehmann/32/4111_2.png) [@philipplehmann](https://discourse.processing.org/u/philipplehmann)\
**Post date:** [October 29, 2021, 9:43am UTC](https://discourse.processing.org/t/sketch-is-stuck-on-loading/33126/4 "2021-10-29T09:43:23Z")

</div>

Have you checked if p5 works? For example putting console.log(“Preload”) before you load your csv?  
You should see this message in the console.
