# Browser Autoplay/CORS policy is making my P5 web game not work

**URL:** <https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117>\
**Category:** Libraries\
**Created:** [June 23, 2020, 10:01pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117 "2020-06-23T22:01:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudb](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sudb](https://discourse.processing.org/u/Sudb)\
**Post date:** [June 23, 2020, 10:01pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117/1 "2020-06-23T22:01:34Z")

</div>

Hello. I made the game in this url: [http://bunnypop.bizsb.com/](http://bunnypop.bizsb.com/) as part of a class project last year. The game has worked fine until recently. It has suddenly stopped working and I suspect it is because of browser Autoplay or CORS policy from checking the console errors. Could some one please help me?

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [June 24, 2020, 8:37pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117/2 "2020-06-24T20:37:01Z")

</div>

The link gets me to your folder listing of your game. Can you describe how to reproduce the error? Provide steps, actual error messages and optionally a screenshot.

Kf

---

<div class="post-metadata">

**Author:** ![Sudb](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sudb](https://discourse.processing.org/u/Sudb)\
**Post date:** [June 24, 2020, 9:14pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117/3 "2020-06-24T21:14:39Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/8d1c4c409a65fd7a89468e903a078e2b520ddd53.png)  
Thanks! I’ve attached a screenshot above showing error messages in console log and page showing “loading” message. All error messages pertain to being unable to access the sound assets (they’re definitely in the right folder with right path). Primary error message is about being unable access p5.sound.min files (definitely there) but these probably indicate why sound assets can’t be accessed. I provided the folders in the url but if you click on thr folder called bunnypop, it starts the webgame home page by going to the index file and should show a page similar to my screenshot if clicked on.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [June 24, 2020, 9:52pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117/4 "2020-06-24T21:52:25Z")

</div>

> [@Maximum size of a method in Processing](https://discourse.processing.org/t/maximum-size-of-a-method-in-processing/17136/29):
>
> Another workaround: [Chrome-allow-file-access-from-file.com](http://Chrome-allow-file-access-from-file.com) A more complete solution: More solutions: [GitHub.com/processing/p5.js/wiki/Local-server](http://GitHub.com/processing/p5.js/wiki/Local-server)

---

<div class="post-metadata">

**Author:** ![Sudb](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sudb](https://discourse.processing.org/u/Sudb)\
**Post date:** [June 25, 2020, 8:54pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117/5 "2020-06-25T20:54:52Z")

</div>

Thank you! That was really helpful. Problem solved :)!

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 29, 2020, 6:47pm UTC](https://discourse.processing.org/t/browser-autoplay-cors-policy-is-making-my-p5-web-game-not-work/22117/6 "2020-06-29T18:47:46Z")

</div>

Glad your problem was solved! Is your game available online somewhere?
