Problem with preloading audios

PennController for IBEX Forums Support Problem with preloading audios

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7818
    Elise
    Participant

    Hi Jeremy,

    For my experiment, I need to preload a bunch of image and audio files. There seems to be a problem with the google media policy every once in a while. This is the console error:

    PennController.js:40 Uncaught (in promise) DOMException: play() failed because the user didn’t interact with the document first. https://goo.gl/xX8pDD

    This seems to lead to a loop and I get this error multiple times without end. I saw on github that you did some changes to the way preloading works. I wondered whether this might resolve the issue and I can just upload the new version.

    This is the link to my experiment hosted on our own server:
    https://oltrogge.experiments-goethe.de/exps/Smoothie/main/experiment.html

    I am using the 2.0 PennController version. It happened on Chrome and Opera.

    It would be great if you could take a look and let me know what you think.

    Best,
    Elise

    • This topic was modified 2 years, 2 months ago by Elise.
    #7821
    Jeremy
    Keymaster

    Hi Elise,

    Feel free to replace your project’s PennController.js with the one for 2.1 beta: https://github.com/PennController/penncontroller/blob/master/dist/PennController.js (you can always overwrite it back with PennController 2.0 later if you experience any issues: https://github.com/PennController/penncontroller/blob/master/releases/2.0/PennController.js )

    But if you have many resources, and since you are already running your experiment on a dedicated webserver, I would suggest you just consolidate some (or all of) your resource files into (one) zip archive(s). This way you won’t have to send one request per resource file

    Jeremy

    #7873
    Elise
    Participant

    Hi Jeremy,

    Thanks for the reply! I changed to preloading the ressources from zip-files.

    I am running into another issue where sometimes the experiment crashes. I get the following error in the console:

    
    Uncaught (in promise) TypeError: Cannot set properties of null (setting 'controls')
        at c.window.PennController._AddElementType.uponCreation (server.cgi?include=js:formatted:11140:43)
        at c.n.uponCreation (server.cgi?include=js:formatted:3254:43)
        at server.cgi?include=js:formatted:3294:64
        at new Promise (<anonymous>)
        at Array.<anonymous> (server.cgi?include=js:formatted:3294:34)
        at server.cgi?include=js:formatted:1034:39
    

    I can see that this relates to an audio ressource. Evidently, the ressource .object is null at the time. When this happens, the experiment crashes without any possiblity of recovering. This only happens once in a while and so far I have not find a way to reproduce it consistently. I’ve seen this thread (https://www.pcibex.net/forums/topic/typeerror-error/), but I checked that all my files are uploaded and named correctly.

    So again, I wonder whether the new version has fixed this issue, because I see that the code relating to preloading has changed. But since I cannot reproduce the error consistently, there is no way for me of knowing whether the problem has already been solved. If you could give me some confidence, that would be great!

    Best,
    Elise

    • This reply was modified 2 years, 2 months ago by Elise.
    #7882
    Jeremy
    Keymaster

    Hi Elise,

    Would you mind sharing the link to your experiment with me, here or at support@pcibex.net?

    Jeremy

    #7885
    Elise
    Participant
    #7894
    Jeremy
    Keymaster

    Thanks, I’ve been unable to replicate the issue so far, so I can’t be sure that PennController 2.1beta would fix it. However, the way PennController 2.0 downloads and decompresses zip archives occasionally yields a corrupt output, so if the crash is related to that, chances are that 2.1beta would take care of it

    Jeremy

    #7897
    Elise
    Participant

    Hi Jeremy,

    Thanks for looking into this!

    I tried using the new version, but I think it happened again. I got this error:

    
    server.cgi?include=js:formatted:3351 Uncaught (in promise) TypeError: Failed to fetch
    

    This is where the error occured in the code: https://pasteboard.co/6ampth46pnN9.png

    Since I know that the rest of my experiment is stable under the 2.0 version, I went back to it. I’ll downsample my audios and just hope that the error doesn’t occur that often.

    Best,
    Elise

    • This reply was modified 2 years, 2 months ago by Elise.
    #10944
    serpilkarabuklu
    Participant

    Hello,

    It has been a while after this post, but I am having a similar problem with Chrome. I wonder if you could resolve this issue and share how. I’m using PCIbex 2.1 beta, trying to run the demo link. It works on Firefox but I am getting ‘Failed to Fetch’ error on Chrome. Other people who I shared the demo link were successful in running it on Chrome.

    Best,
    Serpil

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.