Help Needed: Unspecified Javascript Error

I am quite lost with the following error I have when I try to run my experiment:


I can see the first screen of my experiment with this error in front.

This is the URL to my experiment:

I’m really hoping somebody can help me with this.

Kindest regards,


You are currently in piloting mode without tokens, so I can’t access your experiment.
Have you tried seeing what happened in the web console/web debugger? Often it will tell you what line of your script is causing the problem.

Hi @aisa2,

Do you mean the ‘Run PsychoJS task in local debug mode’?

When I press the ‘Run PsychoJS task in local debug mode’ I get an error for less than one second saying that one of my images (the first one) has an unknown resource. The name is correct and it seems to be in the correct folder.

Apologies I do not have any tokens yet to open the experiment.

@Snoek I mean the ones on your browser. You can look it up on google, here’s an example on Chrome:

I haven’t tried local debug, could be useful as well.

Given your error on the local debug mode, you might be trying to reference a file that’s not in your resources folder?

Thank you for the link @aisa2, I will look at the debugging of the errors now.

I am not sure whether this error in the local debug mode is correct, as the image it is referring to is correctly placed in the resources map of the html folder. Perhaps it is therefore only showing for less than a second. I could be wrong though, as there is definitely something not right.

@Snoek good luck!

error1 error2

These are snippets of the errors and warnings I am getting in repetition. It looks like it has something to do with append.

I am happy with any information, I am just starting out with this.

Wakefield’s crib sheet gets into a lot of the details for moving online. There is a fix for .append in the code_JS section.

Thank you for the sheet, I did have a look at the sheet before and fixed various errors with it. The append function must have slipped by me.

After implementing append function Array.prototype.append = [].push;, the error on the right top side has disappeared. However, these two errors remain:


Do you (or perhaps anybody else) have any suggestions or tips for fixing these?

I’m afraid I’m at the end of my expertise here, never seen those before. I hope someone else can help you sort it out!

1 Like

Thank you for your great help already, I hope so too

The error window.onerror refers to the “console.error(error);” line:

_captureErrors() {
	this.logger.debug('capturing all errors using window.onerror');
	const self = this;
	window.onerror = function (message, source, lineno, colno, error) {
		self._gui.dialog({ "error": error });
		return true;

The BrowserConsoleAppender.append is in the following line:

`                console[consoleMethodName].apply(console, formattedMessage)`

I have added tokens and changed my experiment to running.

If there is anybody that could help me with this, it would be very much appreciated.

I have exactly the same errors. Please share if you found solution. Thank you!

I have these exact same errors as well - would love to hear if anyone has found a solution to this. Thank you!

I have found that “Unknown JavaScript error” can be caused by Text having a height of 0.

hello dis you found a solution for this bug many of us experience? thanks