.zip file problems

PennController for IBEX Forums Support .zip file problems

Viewing 15 posts - 31 through 45 (of 47 total)
  • Author
    Posts
  • #4945
    Elise
    Participant

    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!

    Elise

    #4946
    Jeremy
    Keymaster

    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)

    Jeremy

    #4947
    Elise
    Participant

    Thanks, Jeremy!

    I have nearly 80 pictures, but I will have a look they don’t exceed the limit.

    Best,
    Elise

    #6772
    mg5171
    Participant

    Hi,
    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!

    #6773
    Jeremy
    Keymaster

    Hi,

    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)”)

    Jeremy

    #6776
    mg5171
    Participant

    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.
    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)

    #6777
    Jeremy
    Keymaster

    Hi,

    This is because you are trying to load https://maddiegilbert.com/abxziptest/abx_zipped.zip when you should load https://www.maddiegilbert.com/abxziptest/abx_zipped.zip

    Not sure why the policy does not transfer to the subdomain-prefix-less URL though

    Jeremy

    #6778
    mg5171
    Participant

    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.

    #6880
    samsanto
    Participant

    Hi Jeremy,

    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.

    I changed https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip to https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip and 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:

    
    PennController.PreloadZip("https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip");
    PennController.CheckPreloaded();
    
    

    Let me know if you have any ideas or need more information… Thanks for your help!

    -Sam

    #6881
    Jeremy
    Keymaster

    Hi Sam,

    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()
    )

    Jeremy

    #6882
    samsanto
    Participant

    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).

    #6883
    Jeremy
    Keymaster

    Actually it’s not because of an absence of a www prefix that my code is not working for you: one should not use a www prefix 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/

    Jeremy

    #6884
    samsanto
    Participant

    Yeah, my experiment is on the PCIbex Farm. Here’s the demo link:
    https://farm.pcibex.net/r/mRRSNl/

    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?

    #6885
    Jeremy
    Keymaster

    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?

    Jeremy

    #6886
    samsanto
    Participant

    Yes, done! Thank you.

Viewing 15 posts - 31 through 45 (of 47 total)
  • You must be logged in to reply to this topic.