-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble progressing through experiment #112
Comments
The other branches are also on "@empirica/player": "^1.0.0-beta.2", |
On further exploration, the |
Managed to get all the way through intro screens, but can't launch a game. Can create batches, etc, but then everything waits at "No experiments available", in both cypress and manually |
This has turned into a bit of a stochastic bug, unfortunately. There definitely seems to be some issue with displaying the correct screens at the correct times. Everything is in this branch: https://github.com/Watts-Lab/deliberation-empirica/tree/james-simplify-tests Phantom batchesHere (https://github.com/Watts-Lab/deliberation-empirica/blob/james-simplify-tests/cypress/e2e/No_Experiments_Available.js) is a test that checks that the "No experiments available" page displays when any existing batches have been completed. When I run it locally (recording on cypress.io here: https://dashboard.cypress.io/projects/htzagd/runs/60/overview/81d6bff1-9469-40a9-b8ea-b1e199e3e23b) it instead displays our consent form. What is interesting is that it initially does display the "No experiments available" before it does so, and then goes on to the consent form. When the same test is run through GitHub actions it seems to give the correct behavior. https://dashboard.cypress.io/projects/htzagd/runs/62/test-results/5c5a7b68-ce10-4f9c-bbe9-bf2136f46b0d Game doesn't startThis test (https://github.com/Watts-Lab/deliberation-empirica/blob/james-simplify-tests/cypress/e2e/Normal_Paths.js) should walk a single player through a 1 player game. When I run it locally (recording here: https://dashboard.cypress.io/projects/htzagd/runs/60/overview/e36196c2-f7a5-4ce2-b6fd-fca93e0ade67) It goes successfully through the intro screens, but then waits indefinitely at "Game Loading". If we add extra players, e.g. by making playerKeys longer at the top of the test file (the test will walk through all of them in stages): const playerKeys = [
'test_'+Math.floor(Math.random() * 1e13),
'test_'+Math.floor(Math.random() * 1e13)
] the behavior is the same. No informed consent on GH runnerWhen we run the above test as a Github action, (recording: https://dashboard.cypress.io/projects/htzagd/runs/61/test-results/ad899927-00b1-4f0d-b90c-8fe33c732bc7) the test fails earlier: https://dashboard.cypress.io/projects/htzagd/runs/62/test-results/d9b47ce8-bdd1-4759-aa1c-f114f6fdc3c8, with no experiments available! I'm fairly sure these are running sequentially (https://github.com/Watts-Lab/deliberation-empirica/runs/6821195224?check_suite_focus=true#step:3:304) so I don't think this is due to interference. |
I apologize, I had not seen this bug(s) report before. I will do my best to fix it/them in the next couple of days. |
I think there's a lot of things breaking due to the fact the js server component is probably not starting correctly. I have been overoptimistic with Node.js' ESM support. Try to change the "scripts": {
"dev": "npm run build && node --trace-warnings --enable-source-maps dist/index.js",
"build": "rsync -aP --exclude=node_modules --exclude=*.js -m src/* dist/ && esbuild src/index.js --platform=node --define:process.env.NODE_ENV='\"production\"' --bundle --minify --outfile=dist/index.js",
"serve": "node --trace-warnings --enable-source-maps index.js"
}, Also pull the latest version of Empirica itself ( And run: empirica upgrade Let me know how it goes. |
Latest build still in progress, will be ready in ~10min. |
The latest build (client: "@empirica/player": "^1.0.0-beta.3", server: "@empirica/admin": "^1.0.0-beta.4") fixes the walkthrough problems. There is still the issue of phantom batches, ie. that the consent form and intro screens are available when there are no games available, tested here: https://dashboard.cypress.io/projects/htzagd/runs/180/overview/72bd8d5c-b4b2-4fc2-992e-a15af5499005 @npaton do you want me to move the remaining error to a separate issue and close this one? |
Yeah, that would be great, thanks! |
Moving the remaining error to issue #120 |
Hi Nicolas, when we try to advance from one page in the intro screens to the next (it seems to be when
next()
is called) we're getting this error:and the page fails to advance to the next intro screen. There are no console log messages that occur when the button is clicked, but we are getting this error in the console every few seconds after the server starts:
Google suggests that it might be related to a missing export: nodejs/node#38790, although I don't have a lot of confidence in that diagnosis.
Steps to reproduce
docker-compose -f docker-compose-dev.yml up -V --force-recreate --remove-orphans empirica
cd cypress && npx cypress open
Experiment.Step.Through.js
(Walkthrough)Our cypress tests aren't working properly in CI just yet (that's another issue) so I think you'll need to run the test locally to see it fail at this particular spot, or step through manually.
We aren't having the error in the other branches - Could it be something we're doing when we replace the consent and playerID pages?
The text was updated successfully, but these errors were encountered: