Unknown resource error when reading audio files

Hi everyone!

I’ve been having issues with my signal detection experiment that uses audio files. I have a working version of the experiment that only has the trials routine for testing, but when I made a version of the experiment with the trials that includes the consent form and questionnaires, as soon as it reaches the trials routine it gives me an error.

Here is the error message screenshot:

I don’t think this is an issue with my psychoJS code, as on the console it points to a different JS file when it gets the error. Here is a screenshot of the console error message:

This is what the index-size-error.js message says:
///Could not load content for https://run.pavlovia.org/elizonda/crmv2-fulltest/node_modules/standardized-audio-context/src/factories/index-size-error.ts (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)///

I’ve double checked that within the excel conditions files the pathways had the slashes in the right orientation, I also remade the experiment with an updated html file and still had no luck. The audio files are in wav format which I’ve read it could be a potential issue during playback, but I do have similar experiments that playback the audio files with no issue being in that format. I do have some custom code that does independent randomization on certain columns on the condition excel sheet, but I don’t think this is causing the issue as I have a version with only the trials routine that is working correctly.

Here are the links to the experiments:

Working experiment without consent/questionnaire forms:
https://gitlab.pavlovia.org/elizonda/crmrandofixv2

Experiment with “unknown resource” error when trials routine begins with consent/questionnaire forms:
https://gitlab.pavlovia.org/elizonda/crmv2-fulltest

Any help would be greatly appreciated!

Thank you

For anyone reading:

On builder view click the cog wheel to edit experiment settings.
Go to the online tab then select all of the resources you wish to use.
If in the resources folder, ensure you reference them with the preface " resources/ ".

Hi wen!

Thank you for your quick response! I added the audio stimuli to the additional resources and I still get the unknown resource error.

Capture

I’m not sure why I am getting this error because prior to the “trials” routine, there is a “practice” routine that is able to get the audio files and play them correctly.

I also double checked the resources code within the JS file using relative pathways and everything seems in order there. As well as updated the html and still no luck.

The problem is that you have both a component “Masker” (in the practice routine) and a variable “Masker” (in masterCondFile.xlsx and used in loadB). Make sure that everything has a unique name and you should be good to go :slight_smile:

1 Like

Yes! That fixed the problem!

Thanks so much!