March 30, 2020 at 5:31 pm #4945EliseParticipant
Okay, than AWS seems to be a good choice:)
Something has changed now: After the dashed sentence, loading takes place (with the original preloading sentence, my moving object is missing) and the page is displayed- just the picture that should be loaded from the zip file is missing.
I will try out different things the next days and hopefully just my IP address has been flagged.
Thanks for all your help today!
EliseMarch 30, 2020 at 5:37 pm #4946
Yes, what you see is a good sign: it means that the script works as intended and does not crash when your request for the image fails
My guess is that the moving object is missing because your request to your bucket is processed very quickly but, instead of returning the zip file, it returns an error-like object (hence the non-display of your image upon running the trial)
In the meantime, if you don’t have too many images and the files are not too big, feel free to upload them to the PCIbex Farm (the Potsdam-experiments account currently only uses about 4.5MB out of the new 64MB limit)
JeremyMarch 30, 2020 at 5:43 pm #4947EliseParticipant
I have nearly 80 pictures, but I will have a look they don’t exceed the limit.
EliseMarch 28, 2021 at 2:02 pm #6772
I’m having trouble with CORS access–the warnings from Chrome are clear. I use DreamHost and have the .htaccess file uploaded in the same folder as the zip file. I can download the zip file by using the direct address. However, the .htaccess file appears in the DreamHost platform, but not when I try to access the folder directly (https://www.maddiegilbert.com/abxziptest/), the .htaccess file does not appear in the list of files. Any idea why? (I realize this is not strictly a PCIbex problem). I suspect this may be why PCIbex is having trouble accessing the folder.
Thanks!March 28, 2021 at 2:16 pm #6773
The .htaccess file is not supposed to be publicly visible, so it’s a good sign that you can only access it when you’re logged in onto DreamHost. I get no error message when I preload your zip file in a project on farm.pcibex.net: the Log tab of the Debug window confirms that the download is successfull (“[14:15:16] Download of https://www.maddiegilbert.com/abxziptest/abx_zipped.zip complete (PennController: 0)”)
JeremyMarch 29, 2021 at 1:00 pm #6776
Right, so I suppose then the question is why my .htaccess file is not working. Did something change with the new version of PCIbex? I’ve used Zip files before, and it’s usually worked. I suppose the issue is either with that file or with DreamHost. Here’s the link to the experiment (https://farm.pcibex.net/r/vhmYyZ/), and these are the errors I get:
Access to XMLHttpRequest at ‘https://maddiegilbert.com/abxziptest/abx_zipped.zip’ from origin ‘https://farm.pcibex.net’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Uncaught Error: InvalidStateError: Failed to read the ‘responseText’ property from ‘XMLHttpRequest’: The value is only accessible if the object’s ‘responseType’ is ” or ‘text’ (was ‘arraybuffer’).
at XMLHttpRequest.n.onreadystatechange (PennController.js:65)March 29, 2021 at 1:07 pm #6777
This is because you are trying to load
https://maddiegilbert.com/abxziptest/abx_zipped.zipwhen you should load
Not sure why the policy does not transfer to the subdomain-prefix-less URL though
JeremyMarch 29, 2021 at 1:42 pm #6778
Wow, that’s an easy fix. Thanks for that tip; you saved me hours more frustration! I was using basically the same code as with the old version of PCIbex, so I wonder if that changed in this new version.April 21, 2021 at 2:09 pm #6880
I was having the same problems as above where I was getting the following error: Access to XMLHttpRequest at ‘https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip from origin ‘https://farm.pcibex.net’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zipand that solved the above error, but I still cannot access my zipped resources.
It seems like preloading my zip file goes fine, however, when I “check preloaded” I do not actually see anything in my debugger log to indicate the filed were loaded. Then, when it reaches the point in my experiment when I actually try to access the resources, I see the “Please wait, resources are loading…” message before the experiment crashes altogether with the following three errors:
1. PennController.js:65 Uncaught (in promise) DOMException: The element has no supported sources.
2. PennController.js:65 Uncaught Error: InvalidStateError: Failed to read the ‘responseText’ property from ‘XMLHttpRequest’: The value is only accessible if the object’s ‘responseType’ is ” or ‘text’ (was ‘arraybuffer’).
at XMLHttpRequest.n.onreadystatechange (PennController.js:65)
3. PennController.js:65 http://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
Below is the section of code where I load my zip:
Let me know if you have any ideas or need more information… Thanks for your help!
-SamApril 21, 2021 at 2:48 pm #6881
The ERR_CONNECTION_TIMED_OUT tells it as it is: trying to access https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip results in a timeout (try clicking the link yourself)
This works for me (on the PCIbex Farm):
PreloadZip("https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip") newTrial( newButton("Hello World").print().wait() ) newTrial( newAudio("Am53-ACEC.mp3").print().wait() )
JeremyApril 21, 2021 at 3:20 pm #6882
So I guess I’m confused why it would work for you, but not me?
I get the timeout error when I try to click https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip (the connection is not secure even though its https?)
The zip downloads successfully when I go to just https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip (no www)… however when I try to do
PreloadZip("https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip")in my study code (no www) I get the No ‘Access-Control-Allow-Origin’ header is present error… I’m not sure where I’m going wrong here. I tried running the code you posted above that you stated worked for you and its not working on my end (because no www).April 21, 2021 at 3:27 pm #6883
Actually it’s not because of an absence of a
wwwprefix that my code is not working for you: one should not use a
wwwprefix in that URL (the reason it results in a timeout is probably due to there being no DNS record for it—and your university probably has its reasons for that)
Where do you host your experiment? If it’s on the PCIbex Farm, would you mind sharing its demonstration link with me?
NB: here’s the link to try out my code https://farm.pcibex.net/r/xcQKxQ/
JeremyApril 21, 2021 at 4:29 pm #6884
Yeah, my experiment is on the PCIbex Farm. Here’s the demo link:
I’m not sure if this is helpful, but when I run the study from your demonstration link, it works perfectly fine. When I downloaded a copy of your experiment and upload it to my account, I get all the aforementioned errors and it does not run… not sure if that is relevant?April 21, 2021 at 4:38 pm #6885
When I edit a copy of your project and remove the
www.prefix from the URL the zip file loads fine. Would you mind removing it from your own project so I can see whether there really is a problem specific to your project/account?
JeremyApril 21, 2021 at 5:10 pm #6886
Yes, done! Thank you.
- You must be logged in to reply to this topic.