Description of the problem: Hi there! We’re two students having problems with running our experiment online. The page is stuck on “initalising”, we searched through the forum looking for help or people with similar problems, but couldn’t really find anything. We’re extremely thankful for anyone out there who can give us a step by step on how to fix this. Thank you!
Hi! I have the same problem. In my case, it seems to be due to importing numpy to Python, which is incompatible with the Py → JS translator.
Not using any libraries you use currently might help in getting pas the initialising stage.
You could try to look at the developer view by pressing crtl+shift+J on the web page, likely you’ll see something like “Uncaught SyntaxError: Unexpected token ‘*’”, which correlates to this line of JS code: import * as random from ‘random’;
If an experiment is stuck initialising it means that there is a syntax error somewhere in the compiled JavaScript. The usual places that these errors occur are:
Code components - if there is an error somewhere in the JavaScript syntax (either from a code component with code type ‘Auto>JS’ where the code has not translated, or from a code type Both/JS where the JS side contains a syntax error).
If you do not have a code component it might be that there is a comma or something missing in a parameter field.
I would suggest the below to find the location of the syntax error.
Launch the page that is stuck on ‘initializing’
right click and ‘inspect’ the window
Go to the ‘console’ section that opens up (it might start automatically in ‘elements’ navigate to the console tab).
the console should show an error message with a message that looks like it is refering to the line of code causing the problem in your script. try to click on that line number - if it doesn’t let you click on it refresh the page and try to click on it.
clicking on the line of code will show you where in the compiled code the error is arising from.
Thank you so much!
This is the error message: Failed to load resource: the server responded with a status of 404 ()
What does that mean? What could be the problem?
Hi There, I just tried your link and it didn’t get stuck on the initialising screen (and the resources load until then I see the first survey page) - is the initialising screen issue now resolved?
Hello,
I think you have a stable internet connection as unstable connectivity can cause loading issues. May be you’re using a compatible browser like Google Chrome or Mozilla Firefox, as some browsers may have issues with PsychoPy. The latest version of PsychoPy and that all your experiment files are up to date.
I am not sure where the problem could be, I generally use Python and not really that good with JS.
I tried these steps and got this:
Uncaught ReferenceError: browser is not defined
at start (onpage-dialog.preload.js:118:5)
at onpage-dialog.preload.js:132:1
at onpage-dialog.preload.js:390:12Understand this errorAI
:12002/#1.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
zotero.js:332 Service worker (re)started at 2024-10-22 19:36:17 at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/zotero.js:314
(anonymous) @ zotero.js:332Understand this errorAI
debug.js:92 (3)(+0000000): Setting debug.store to false
debug.js:92 (3)(+0000008): Translators: Saved 728 translators.
debug.js:92 (3)(+0000000): Repo: Next check in 76336.208s
debug.js:92 (3)(+0000000): HTTP GET chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/utilities/resource/dateFormats.json
debug.js:92 (3)(+0000003): HTTP GET chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/utilities/resource/dateFormats.json
debug.js:92 (3)(+0000000): Setting lastVersion to “5.0.147”
debug.js:92 (3)(+0000000): Connector_Browser: onActivated for http://localhost:12002/
debug.js:92 (3)(+0000003): Connector_Browser: onFrameLoaded for http://localhost:12002/; http://localhost:12002/
content-script.js:104183 current location http://localhost:12002/
content.js:9 content-script.js 加载成功
content.js:9 response Object
debug.js:92 (3)(+0000631): HTTP GET chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/utilities/resource/dateFormats.json
debug.js:92 (3)(+0000014): Translators: Looking for translators for http://localhost:12002/
debug.js:92 (4)(+0000011): Translate: Binding sandbox to http://localhost:12002/
debug.js:92 (4)(+0000002): Translate: Parsing code for unAPI (e7e01cac-1e37-4da6-b078-a0e8343b0e98, 2019-06-10 23:11:21)
debug.js:92 (4)(+0000001): Translate: Parsing code for COinS (05d07af9-105a-4572-99f6-a8e231c0daef, 2021-06-01 17:38:46)
debug.js:92 (4)(+0000003): Translate: Parsing code for Embedded Metadata (951c027d-74ac-47d4-a107-9c3069ab7b48, 2024-06-14 04:50:00)
debug.js:92 (3)(+0000000): Translate: Embedded Metadata: found 2 meta tags
debug.js:92 (4)(+0000002): Translate: Parsing code for DOI (c159dcfe-8a53-4301-a499-30f6549c340d, 2024-08-21 22:15:00)
debug.js:92 (3)(+0000000): Translate: All translator detect calls and RPC calls complete:
debug.js:92 (3)(+0000000): No suitable translators found
debug.js:92 (5)(+0000000): Translate: Running handler 0 for translators