# Unspecified JavaScript Error in Pavlovia

**URL:** <https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [April 27, 2021, 4:46pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633 "2021-04-27T16:46:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![evansorenson](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/evansorenson/32/14445_2.png) [@evansorenson](https://discourse.psychopy.org/u/evansorenson)\
**Post date:** [April 27, 2021, 4:46pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633/1 "2021-04-27T16:46:24Z")

</div>

URL of experiment: [Hwang Lab / alpha\_colorConstant\_sledgehammer · GitLab](https://gitlab.pavlovia.org/HwangLab/alpha_colorconstant_sledgehammer)

Description of the problem:  
When trying to run on pavlovia, I am getting the following error. I inspected the error in the developer tools in the browser but the call stack points me to where the error is logged in the corejs file. Not really sure what the error is or where it is. I definitely could have some JS code wrong somewhere, but I am having trouble finding anything.

> Unfortunately we encountered the following error:
> 
> - **Unspecified JavaScript error**
> 
> Try to run the experiment again. If the error persists, contact the experiment designer.

Thanks for your help,  
Evan

---

<div class="post-metadata">

**Author:** ![evansorenson](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/evansorenson/32/14445_2.png) [@evansorenson](https://discourse.psychopy.org/u/evansorenson)\
**Post date:** [April 27, 2021, 4:59pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633/2 "2021-04-27T16:59:30Z")

</div>

![Screen Shot 2021-04-27 at 11.57.47 AM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/b/b/bb2ed1cdf691ee50f556c8164d48a56cf0d27baf.png)

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [April 27, 2021, 5:32pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633/3 "2021-04-27T17:32:40Z")

</div>

This error is very difficult to debug, but I have come across a few causes:

1. a text element with a size that rounds to zero (e.g. .1) when the units are in pixels.
2. setting an image as unspecified.
3. Trying to run an experiment straight after syncing changes when there are lots of resources. To resolve this close and reopen the browser.
4. Setting a property “during: ISI”.

If the experiment works on some browsers but not others try editing the index.html file directly to replace `<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.3.3/pixi.min.js"></script>`

with `<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/pixi.js-legacy@5.3.3/dist/pixi-legacy.min.js"></script>`

---

<div class="post-metadata">

**Author:** ![evansorenson](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/evansorenson/32/14445_2.png) [@evansorenson](https://discourse.psychopy.org/u/evansorenson)\
**Post date:** [April 27, 2021, 6:06pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633/4 "2021-04-27T18:06:47Z")

</div>

#1 is the winner. It was a text element I forgot to resize from 0.1 and units are in pixels. Thanks for your help!!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [April 27, 2021, 6:12pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-in-pavlovia/22633/5 "2021-04-27T18:12:05Z")

</div>

It’s in first position for a reason – it’s the one I’ve encountered most.
