Majority of Online Resources upload correctly, but some files are not included in generated JS -- “unknown resource” error online

OS: macOS 15.7.3 (Sequoia)
PsychoPy version: 2025.2.4

Hi PsychoPy team,

I’m encountering a bizarre issue where a very select few .jpg files are not being added to psychoJS.start in the JavaScript file created by Builder. The majority of files are added correctly.

These files are added via Online Resources with the correct path pointing to the image. They appear in the Online Resources list in Builder, but they do not make it into the generated JavaScript file. They do get uploaded to Pavlovia. There is no reason to believe they are any different in naming convention, size, or format from the other images that upload and export correctly.

This is a very bizarre bug (although I admit I consistently run into issues where I need to rename a file after modifying it, otherwise PsychoPy continues using the old version no matter how I sync). However, in this case, I’ve tried multiple fixes and nothing resolves the issue for 2 files.

What did you try to make it work?:

  1. Duplicated/re-exported and renamed the files (this sometimes works, but has not worked for all files).
  2. Referenced the files explicitly in a routine to ensure Builder detects them as used.
  3. Deleted the local HTML folder and re-exported the experiment from scratch.
  4. Moved the files to a new subfolder and re-added them with new names.
  5. Verified the files are successfully uploaded to Pavlovia.
  6. Restarted my computer.
  7. Restarted PsychoPy.
  8. Deleted the generated JS files and re-exported to regenerate them.
  9. Deleted the Git repository and recreated it from scratch.
  10. Cleared browser cache.
  11. Confirmed there is no HTML folder in the output path.
  12. Re-synced the project.

Link to the most relevant existing thread you have found: Resource list not updating from Builder to JS ; "Unknown Resource" online, but works fine offline? - #10 by wakecarter

What specifically went wrong when you tried that?:
I can see that only a few of the resources are not added to the generated JavaScript file. As a result, I get an “unknown resource” error when deploying online. When the experiment attempts to display the image, it cannot find the specific .jpg file because it was never referenced in the exported JS (psychoJS.start)

Thank you.

But maybe that’s not the issue since you later say it is blank. How about

See also

Thanks for your reply regarding this issue. Yes, I did try other browsers, hard resetting, and clearing the cache. The only thing that ended up working for the last two stubborn files was renaming the file multiple times (about 50 attempts) after which, for some reason, it finally got added to the JS file and was able to run. So I suppose the issue is closed, although it was definitely a bizarre bug.

Was it to do with capitalisation?

On Pavlovia file.JPG is different from file.jpg

However, on Windows you can’t rename a file just by changing the capitalisation. What I do is change it to something else (e.g. file.jpeg) and then sync and then make the second change and sync again.

Nope, I just kept changing the file name with no differences in how I capitalized anything. Then, finally, it showed up in the javascript file.