pushkin-consortium / pushkin-exptemplates-basic

Basic jsPsych experiment with a "hello world" timeline.
MIT License
0 stars 6 forks source link

security updates #44

Closed jkhartshorne closed 1 year ago

jkhartshorne commented 1 year ago

Upgraded a lot of dependencies.

jessestorbeck commented 1 year ago

I am getting some weird behavior that I cannot figure out. I am testing this branch of the basic experiment template, along with the updates to pushkin-api https://github.com/pushkin-consortium/pushkin-api/pull/20/commits/d5e61e57a02a5f663674695aea25779003e84310 and pushkin-client https://github.com/pushkin-consortium/pushkin-client/pull/39/commits/52d55acde6efca1f0c0ebeacb46bfb3aaf9b0a04.

I'm not getting any errors, but when I run the basic 'hello world' experiment, it's running this test timeline we were using yesterday, and I cannot figure out why this is happening. I have confirmed I'm in the right branch of the basic template, and experiment.js in the template and in my actual site is the intended single-trial 'hello world'. The experiment though is always 'hello world' --> 'hello' --> 'hello world'. I thought maybe it's a Docker thing, so I've cleared out Docker multiple times AND restarted my computer, but the problem persists. Is there anything that could be overwriting the timeline?

jkhartshorne commented 1 year ago

Did you double-check the experiments.js file for the experiment you are testing? Maybe the test sequence snuck into the template or something.

jessestorbeck commented 1 year ago

I found the test sequence in pushkin/front-end/node_modules/basicTest_web/build/experiment.js

Is it possible that when the CLI creates the yalc package for the experiment, it doesn't overwrite an existing yalc package by the same name? I think I called an experiment "basicTest" before with that test timeline. Let me try a unique name, and see what that does.

jessestorbeck commented 1 year ago

I called the new experiment "abc123" and this is what I'm seeing in localhost:

Screen Shot 2023-08-22 at 2 21 52 PM

I looked at that docker container, and abc123_web isn't in the correct .yalc folder:

Screen Shot 2023-08-22 at 2 20 14 PM

I also confirmed that abc123_web is not in pushkin/front-end/node_modules.

jkhartshorne commented 1 year ago

I recommend running kill, prep,  start

-- Sent with HEY https://hey.com/sent

jessestorbeck commented 1 year ago

This error is persisting even after setting up a new site. I can try the basic template from the latest release in combination with the new api and client and see what that does.

jkhartshorne commented 1 year ago

OK. I can take a look at this this afternoon. In the meantime, can you please make a fully reproducible list of what you did? That is, with version numbers of everything? Just to ensure I have the best chance of reproducing the problem.

jessestorbeck commented 1 year ago
  1. yalc publish pushkin-client and pushkin-api
  2. install site basic v0.2.2; install install experiment from path to cloned template
  3. yalc add pushkin-client in pushkin/front-end and experiments/exp_123/web page
  4. Edit package.json in experiments/exp_123/web page adding ".yalc" to the files array
  5. yalc add pushkin-api in pushkin/api and experiments/exp_123/api controllers
  6. Edit package.json in experiments/exp_123/api controllers adding ".yalc" to the files array
  7. pushkin prep; pushkin start

I did notice while running prep that there is an output line that says "exp_123_web is published locally via yalc", but when I go to my yalc store directory, exp_123_web isn't there:

Screen Shot 2023-08-23 at 10 43 24 AM

Maybe this suggests an issue with yalc publish?

jessestorbeck commented 1 year ago

Following up on that, I noticed also that when I run install experiment, that seems to be when [experiment]_web and [experiment]_api directories are supposed to be added to my yalc store directory. This is what I observed when I ran install experiment and chose basic v5.0.1 (v5.0.2 is giving me the "EMFILE: too many open files" for some reason, even though installing https://github.com/pushkin-consortium/pushkin-exptemplates-basic/commit/cac00ae89413459548bdd8c10ce97cff206ffa28 from path does not). However, when I run install experiment from path https://github.com/pushkin-consortium/pushkin-exptemplates-basic/commit/cac00ae89413459548bdd8c10ce97cff206ffa28, only [experiment]_api shows up in my yalc store.

This issue seems to be unrelated to the updates to pushkin-api and pushkin-client, since this is happening before I've done yalc add for those.

jkhartshorne commented 1 year ago

Following up on that, I noticed also that when I run install experiment, that seems to be when [experiment]_web and [experiment]_api directories are supposed to be added to my yalc store directory. This is what I observed when I ran install experiment and chose basic v5.0.1 (v5.0.2 is giving me the "EMFILE: too many open files" for some reason, even though installing https://github.com/pushkin-consortium/pushkin-exptemplates-basic/commit/cac00ae89413459548bdd8c10ce97cff206ffa28 from path does not). However, when I run install experiment from path https://github.com/pushkin-consortium/pushkin-exptemplates-basic/commit/cac00ae89413459548bdd8c10ce97cff206ffa28, only [experiment]_api shows up in my yalc store.

I'm not reproducing these issues. Just to see what happens, try deleting everything in your .yalc store, and then try installing experiment again.

Also, what versions of yarn and yalc are you using?

jkhartshorne@MacBook-Air-345 ~ % yalc --version
1.0.0-pre.53
jkhartshorne@MacBook-Air-345 ~ % yarn --version
1.22.19
jkhartshorne commented 1 year ago

@jessestorbeck -- So I think the problem might actually be that it doesn't like the name "abc123" for some reason. Try using just the name "abc" and see what happens.

jessestorbeck commented 1 year ago
jessestorbeck@Jesses-MacBook-Air-4 basicTest123 % yalc --version
1.0.0-pre.53
jessestorbeck@Jesses-MacBook-Air-4 basicTest123 % yarn --version
1.22.19

I just tried with an experiment I called "cats". This is what my .yalc store looks like now after running install experiment. I republished the client and api, but is the template supposed to end up there too? I did still use numbers in the name of my site directory. I could try again without those.

Screen Shot 2023-08-24 at 10 09 33 AM
jkhartshorne commented 1 year ago

I just tried with an experiment I called "cats". This is what my .yalc store looks like now after running install experiment. I republished the client and api, but is the template supposed to end up there too? I did still use numbers in the name of my site directory. I could try again without those.

I don't recall if it should be there before running pushkin prep. Did you run prep yet? If not, run that and check.

jkhartshorne commented 1 year ago

BTW I recommend the version of the site template I just published. Should be slightly less buggy on Mac (more of that annoying architecture stuff.)

jessestorbeck commented 1 year ago

With previous versions of the basic template, cats_web and cats_api would be present in the .yalc store after running install experiment. I will look again after running prep though.

jkhartshorne commented 1 year ago

Nevermind. It should install during pushkin install experiments:

Screen Shot 2023-08-24 at 10 19 44 AM

Can you please post the complete output you get during pushkin install experiments? Here's mine:

jkhartshorne@MacBook-Air-345 temp % pushkin install experiment
? What do you want to call your experiment? cats
? Which experiment template do you want to use? basic
? Which version? (Recommend:v5.0.2) v5.0.2
Making cats in /Users/jkhartshorne/Documents/Projects/PushkinDev/PushkinNew/temp/experiments
retrieving from https://api.github.com/repos/pushkin-consortium/pushkin-exptemplates-basic/releases/117897789
be patient...
finished downloading
Installing dependencies for api controllers
Installing dependencies for web page
Installing dependencies for worker
loaded compFile
Building worker
Writing out front-end config
running setEnv()
Successfully set front-end 'environment variable'
Building front end
Building cats_api from api controllers
Building cats_web from web page
worker is built
cats_api is built
cats_web is built
cats_api is published locally via yalc
cats_web is published locally via yalc
cats_api added to build cycle via yalc
cats_web added to build cycle via yalc
jkhartshorne@MacBook-Air-345 temp % 
jessestorbeck commented 1 year ago
jessestorbeck@Jesses-MacBook-Air-4 cats % pushkin install experiment
? What do you want to call your experiment? catExp
? Which experiment template do you want to use? path
? What is the absolute path to your experiment template? /Users/jessestorbeck/pushkinProjects/pushki
n-exptemplates-basic
Making catExp in /Users/jessestorbeck/Desktop/cats/experiments
copying from /Users/jessestorbeck/pushkinProjects/pushkin-exptemplates-basic
be patient...
Installing dependencies for api controllers
Installing dependencies for web page
Installing dependencies for worker
loaded compFile
Building catExp_api from api controllers
Building worker
Writing out front-end config
running setEnv()
Successfully set front-end 'environment variable'
Building front end
Building catExp_web from web page
catExp_api is built
worker is built
catExp_api is published locally via yalc
catExp_api added to build cycle via yalc
catExp_web is built
catExp_web is published locally via yalc
catExp_web added to build cycle via yalc
jessestorbeck@Jesses-MacBook-Air-4 cats % 
jkhartshorne commented 1 year ago

and catExp_web is still not in your .yalc store?

jessestorbeck commented 1 year ago

This is right after emptying my .yalc store:

jessestorbeck@Jesses-MacBook-Air-4 catSite % pushkin install experiment
? What do you want to call your experiment? catExperiment
? Which experiment template do you want to use? path
? What is the absolute path to your experiment template? /Users/jessestorbeck/pushkinProjects/pushki
n-exptemplates-basic
Making catExperiment in /Users/jessestorbeck/Desktop/catSite/experiments
copying from /Users/jessestorbeck/pushkinProjects/pushkin-exptemplates-basic
be patient...
Installing dependencies for api controllers
Installing dependencies for web page
Installing dependencies for worker
loaded compFile
Building catExperiment_api from api controllers
Building catExperiment_web from web page
Building worker
Writing out front-end config
running setEnv()
Successfully set front-end 'environment variable'
Building front end
catExperiment_api is built
catExperiment_api is published locally via yalc
catExperiment_api added to build cycle via yalc
catExperiment_web is built
worker is built
catExperiment_web is published locally via yalc
catExperiment_web added to build cycle via yalc
jessestorbeck@Jesses-MacBook-Air-4 catSite % cd /Users/jessestorbeck/.yalc/packages
jessestorbeck@Jesses-MacBook-Air-4 packages % ls
catExperiment_api       pushkin-exptemplates-basic
jessestorbeck@Jesses-MacBook-Air-4 packages % 

Unlike your output above, for some reason the template ends up in the .yalc store, but not catExperiment_web.

jkhartshorne commented 1 year ago

Unlike your output above, for some reason the template ends up in the .yalc store, but not catExperiment_web.

That is bizarre. I'm stumped. I assume you've tried googling.

jkhartshorne commented 1 year ago

So I don't know what catExperiment_api was allowed, but apparently capitalization isn't allows. Try using just "cats" as your name, see what happens.

jessestorbeck commented 1 year ago

I'm looking at the CLI code now trying to figure out what to google. Maybe something will jump out at me.

jkhartshorne commented 1 year ago

I'm looking at the CLI code now trying to figure out what to google. Maybe something will jump out at me.

Did you see my most recent message? Try without capitalization.

jessestorbeck commented 1 year ago

Same result unfortunately:

jessestorbeck@Jesses-MacBook-Air-4 temp % pushkin install experiment
? What do you want to call your experiment? exp
? Which experiment template do you want to use? path
? What is the absolute path to your experiment template? /Users/jessestorbeck/pushkinProjects/pushki
n-exptemplates-basic
Making exp in /Users/jessestorbeck/Desktop/temp/experiments
copying from /Users/jessestorbeck/pushkinProjects/pushkin-exptemplates-basic
be patient...
Installing dependencies for api controllers
Installing dependencies for web page
Installing dependencies for worker
loaded compFile
Building exp_api from api controllers
Building exp_web from web page
Building worker
Writing out front-end config
running setEnv()
Successfully set front-end 'environment variable'
Building front end
exp_api is built
exp_api is published locally via yalc
exp_api added to build cycle via yalc
exp_web is built
worker is built
exp_web is published locally via yalc
exp_web added to build cycle via yalc
jessestorbeck@Jesses-MacBook-Air-4 temp % cd /Users/jessestorbeck/.yalc/packages; ls
exp_api             pushkin-exptemplates-basic
jessestorbeck@Jesses-MacBook-Air-4 packages % 
jkhartshorne commented 1 year ago

So we've been using an old version yarn ("Yarn Classic"). The new version ("Yarn Modern") doesn't need yalc, which also explains why yalc hasn't been updated in a while.

I have rewritten to make use of the new stack. This will require a little updating on your part to try:

  1. Install corepack. Assuming you have homebrew, you'll use brew install corepack. If you installed yarn using homebrew, it'll ask you to unlink yarn (it gives instructions).
  2. $ corepack enable
  3. $ corepack enable yarn <-- not sure this is necessary, but I did it
  4. npm install -g install-local
  5. Get the latest commit of pushkin-cli in the poorly-named "minor-upgrades" branch.

Then do everything as normal. LMK what happens.

Unfortunately, I probably won't be able to look at this a lot more today. I'll check in periodically to see if there's anything quick I can do, though. But anything requiring real time will have to wait.

jkhartshorne commented 1 year ago

PS I'm having some weird permissions errors on start. So you may run into that, too. I'm not sure what's driving it yet.

jkhartshorne commented 1 year ago

PPS I realized the issues were that the site template still wants to copy yalc files around. I just pushed a new release of the basic site template. You should use that. And I also pushed a new version of the CLI, which you should use.

jessestorbeck commented 1 year ago

Do I need to go back to the old version of yarn?

jkhartshorne commented 1 year ago

PPPS So this is more complicated than I realized, and things are not really working. I'll try a little more and then i really have to do other things.

jkhartshorne commented 1 year ago

OK, I'm giving up for now. The new version is not working. I think we may actually want to switch to a monorepo structure for specifically this problem, but I need to understand it better.

You can continue trying to work with the old version that wasn't working and see if you can get it to work. Or you can try to find something else you can work on. Given my other deadlines this week and the conference next week, I might not be able to work out my solution until after AMLaP.

jkhartshorne commented 1 year ago

Do I need to go back to the old version of yarn?

You probably (?) still want the new version.

jessestorbeck commented 1 year ago

I think I actually figured it out, but now I am confused why it was working for you. If you look at the first property in package.json in the template's 'web page' folder, it says: "name": "pushkin-exptemplates-basic", whereas in the master branch it says "name": "pushkintemplate_web".

In the initExperiment function in the CLI, there is a replace operation where all instances of "pushkintemplate" are replaced with the experiment name. But in this case, the package name didn't get replaced, since there was no match. So I'm not sure anything else is really going wrong here besides the _web package not being properly renamed. I'm going to test again now after changing the name in package.json.

jkhartshorne commented 1 year ago

I think I actually figured it out, but now I am confused why it was working for you. If you look at the first property in package.json in the template's 'web page' folder, it says: "name": "pushkin-exptemplates-basic", whereas in the master branch it says "name": "pushkintemplate_web".

Which one are you looking at now?

jessestorbeck commented 1 year ago

I'm looking at 2023-security-upgrades. I changed the name back to "pushkintemplate_web" and I can confirm that I now have both [exp]_web and [exp]_api in my .yalc store. However, I'm now getting an error from prep. I am using the latest distribution CLI, not the minor-updates branch. This seems to happen regardless of whether I use the distribution versions of the api and client or the local versions we've been testing (https://github.com/pushkin-consortium/pushkin-client/commit/52d55acde6efca1f0c0ebeacb46bfb3aaf9b0a04 and https://github.com/pushkin-consortium/pushkin-api/commit/d5e61e57a02a5f663674695aea25779003e84310).

jessestorbeck@Jesses-MacBook-Air-4 jesseSite % pushkin prep
Removing any .DS_Store files, if present.
/Users/jessestorbeck/Desktop/jesseSite/experiments
/Users/jessestorbeck/Desktop/jesseSite/pushkin
package manager:  yarn
resetting experiments.js
Cleaned up front-end/experiments.js
Started prepping API for sleepycat
Started loading API controller for jspsych7exp
Using build-if-changed for  jspsych7exp_api
Installing dependencies for /Users/jessestorbeck/Desktop/jesseSite/experiments/sleepycat/api controllers
Started prepping web page for sleepycat
Started loading web page for sleepycat
Using build-if-changed for  sleepycat_web
Installing dependencies for /Users/jessestorbeck/Desktop/jesseSite/experiments/sleepycat/web page
loaded docker-compose.dev.yml and pushkin.yaml.
Building worker for sleepycat
Building docker image for sleepycat_worker
docker build /Users/jessestorbeck/Desktop/jesseSite/experiments/sleepycat/worker -t sleepycat_worker --load
Spooling up databases.
userMigsDir: /Users/jessestorbeck/Desktop/jesseSite/users/migrations
userDatabase: localtestdb
Loading migrations for sleepycat
expConfig:
 {"experimentName":"sleepycat","shortName":"sleepycat","apiControllers":{"mountPath":"jspsych7exp","location":"api controllers","name":"mycontroller"},"worker":{"location":"worker","service":{"image":"jspsych7exp","links":["message-queue","test_db","test_transaction_db"],"environment":{"AMQP_ADDRESS":"amqp://message-queue:5672","DB_USER":"postgres","DB_PASS":"example","DB_URL":"test_db","DB_NAME":"test_db"}}},"webPage":{"location":"web page"},"migrations":{"location":"migrations"},"seeds":{"location":""},"database":"localtestdb","logo":"logo512.png","text":"Enter your experiment description here.","tagline":"Be a citizen scientist! Try this quiz.","duration":"","productionDB":"Main"}
Building jspsych7exp_api from /Users/jessestorbeck/Desktop/jesseSite/experiments/sleepycat/api controllers
Waiting for test transaction db...
Waiting for test db...
Test transaction db is healthy
Starting migrations for test transactions DB.
Running migrations for localtransactiondb
Building sleepycat_web from /Users/jessestorbeck/Desktop/jesseSite/experiments/sleepycat/web page
Test test db is healthy
Running migrations for localtestdb
Ran migrations for localtestdb
Running seeds on /Users/jessestorbeck/Desktop/jesseSite/experiments/sleepycat
Ran migrations for localtransactiondb
Finished running all migrations. Shutting down database containers.
jspsych7exp_api is built
sleepycat_web is built
jspsych7exp_api is published locally via yalc
sleepycat_web is published locally via yalc
Loaded web page for sleepycat (sleepycat_web)
Added sleepycat to experiments.js
Writing out experiments.js
Installing combined API
Installed combined API
Installing combined front-end
Installed combined front-end
Finished building all experiment workers
updating docker-compose.dev.yml
Writing out front-end config
Building API
Building server
Error: Command failed: docker build -t api:latest pushkin/api
#0 building with "desktop-linux" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context: 73B 0.0s done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 290B 0.0s done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/node:20.2
#3 DONE 0.4s

#4 [1/8] FROM docker.io/library/node:20.2@sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96
#4 DONE 0.0s

#5 [internal] load build context
#5 transferring context: 219B done
#5 DONE 0.0s

#6 [2/7] COPY ./src /usr/src/app/src
#6 CACHED

#7 [3/7] COPY ./package.json ./yarn.lock ./.babelrc ./dockerStart.sh /usr/src/app/
#7 CACHED

#8 [4/7] WORKDIR /usr/src/app
#8 CACHED

#9 [5/7] RUN yarn install
#9 1.006 yarn install v1.22.19
#9 1.130 [1/4] Resolving packages...
#9 1.214 error Package "pushkin-api" refers to a non-existing file '"/usr/src/app/.yalc/pushkin-api"'.
#9 1.215 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#9 ERROR: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1
------
 > [5/7] RUN yarn install:
1.006 yarn install v1.22.19
1.130 [1/4] Resolving packages...
1.214 error Package "pushkin-api" refers to a non-existing file '"/usr/src/app/.yalc/pushkin-api"'.
1.215 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
Dockerfile:7
--------------------
   5 |     
   6 |     WORKDIR /usr/src/app
   7 | >>> RUN yarn install
   8 |     RUN yarn build
   9 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1

    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:511:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'docker build -t api:latest pushkin/api',
  stdout: '',
  stderr: '#0 building with "desktop-linux" instance using docker driver\n' +
    '\n' +
    '#1 [internal] load .dockerignore\n' +
    '#1 transferring context: 73B 0.0s done\n' +
    '#1 DONE 0.0s\n' +
    '\n' +
    '#2 [internal] load build definition from Dockerfile\n' +
    '#2 transferring dockerfile: 290B 0.0s done\n' +
    '#2 DONE 0.0s\n' +
    '\n' +
    '#3 [internal] load metadata for docker.io/library/node:20.2\n' +
    '#3 DONE 0.4s\n' +
    '\n' +
    '#4 [1/8] FROM docker.io/library/node:20.2@sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96\n' +
    '#4 DONE 0.0s\n' +
    '\n' +
    '#5 [internal] load build context\n' +
    '#5 transferring context: 219B done\n' +
    '#5 DONE 0.0s\n' +
    '\n' +
    '#6 [2/7] COPY ./src /usr/src/app/src\n' +
    '#6 CACHED\n' +
    '\n' +
    '#7 [3/7] COPY ./package.json ./yarn.lock ./.babelrc ./dockerStart.sh /usr/src/app/\n' +
    '#7 CACHED\n' +
    '\n' +
    '#8 [4/7] WORKDIR /usr/src/app\n' +
    '#8 CACHED\n' +
    '\n' +
    '#9 [5/7] RUN yarn install\n' +
    '#9 1.006 yarn install v1.22.19\n' +
    '#9 1.130 [1/4] Resolving packages...\n' +
    `#9 1.214 error Package "pushkin-api" refers to a non-existing file '"/usr/src/app/.yalc/pushkin-api"'.\n` +
    '#9 1.215 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\n' +
    '#9 ERROR: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1\n' +
    '------\n' +
    ' > [5/7] RUN yarn install:\n' +
    '1.006 yarn install v1.22.19\n' +
    '1.130 [1/4] Resolving packages...\n' +
    `1.214 error Package "pushkin-api" refers to a non-existing file '"/usr/src/app/.yalc/pushkin-api"'.\n` +
    '1.215 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\n' +
    '------\n' +
    'Dockerfile:7\n' +
    '--------------------\n' +
    '   5 |     \n' +
    '   6 |     WORKDIR /usr/src/app\n' +
    '   7 | >>> RUN yarn install\n' +
    '   8 |     RUN yarn build\n' +
    '   9 |     \n' +
    '--------------------\n' +
    'ERROR: failed to solve: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1\n'
}
jessestorbeck@Jesses-MacBook-Air-4 jesseSite % 
jkhartshorne commented 1 year ago

Are you using yarn 1.x? It looks like it.

Don't use the newer versions of the site template. It doesn't copy the .yalc folder over, so you won't have any local packages. Anything published before today should be fine.

jessestorbeck commented 1 year ago

I went back to v0.2.3 of the site template, and I was able to run a basic experiment on localhost. The data is in the database as well. When I run yarn --version, it still says 1.22.19, so I'm not sure what installing corepack did. I also used https://github.com/pushkin-consortium/pushkin-client/commit/52d55acde6efca1f0c0ebeacb46bfb3aaf9b0a04 and https://github.com/pushkin-consortium/pushkin-api/commit/d5e61e57a02a5f663674695aea25779003e84310. I went ahead and committed the name change to web page/package.json. I did have to run prep twice at first for it to run without an error (I'll put the error at the end here). I then got the usual run time error (pushkin-consortium/pushkin#225) the first time I tried to view the experiment. But after running stop, prep, and start, everything worked.

It seems like I can accept changes and merge this PR then?

jessestorbeck@Jesses-MacBook-Air-4 testsite123 % pushkin prep
Removing any .DS_Store files, if present.
/Users/jessestorbeck/Desktop/testsite123/experiments
/Users/jessestorbeck/Desktop/testsite123/pushkin
package manager:  yarn
resetting experiments.js
Started prepping API for meow
Started loading API controller for jspsych7exp
Using build-if-changed for  jspsych7exp_api
Installing dependencies for /Users/jessestorbeck/Desktop/testsite123/experiments/meow/api controllers
Started prepping web page for meow
Started loading web page for meow
Using build-if-changed for  meow_web
Installing dependencies for /Users/jessestorbeck/Desktop/testsite123/experiments/meow/web page
loaded docker-compose.dev.yml and pushkin.yaml.
Building worker for meow
Building docker image for meow_worker
docker build /Users/jessestorbeck/Desktop/testsite123/experiments/meow/worker -t meow_worker --load
Spooling up databases.
userMigsDir: /Users/jessestorbeck/Desktop/testsite123/users/migrations
userDatabase: localtestdb
Loading migrations for meow
Updated users/config.yaml to be compatible with default site template v2+.
expConfig:
 {"experimentName":"meow","shortName":"meow","apiControllers":{"mountPath":"jspsych7exp","location":"api controllers","name":"mycontroller"},"worker":{"location":"worker","service":{"image":"jspsych7exp","links":["message-queue","test_db","test_transaction_db"],"environment":{"AMQP_ADDRESS":"amqp://message-queue:5672","DB_USER":"postgres","DB_PASS":"example","DB_URL":"test_db","DB_NAME":"test_db"}}},"webPage":{"location":"web page"},"migrations":{"location":"migrations"},"seeds":{"location":""},"database":"localtestdb","logo":"logo512.png","text":"Enter your experiment description here.","tagline":"Be a citizen scientist! Try this quiz.","duration":"","productionDB":"Main"}
Building jspsych7exp_api from /Users/jessestorbeck/Desktop/testsite123/experiments/meow/api controllers
Building meow_web from /Users/jessestorbeck/Desktop/testsite123/experiments/meow/web page
jspsych7exp_api is built
jspsych7exp_api is published locally via yalc
meow_web is built
meow_web is published locally via yalc
Loaded web page for meow (meow_web)
Added meow to experiments.js
Writing out experiments.js
Installing combined API
Installed combined API
Installing combined front-end
Installed combined front-end
Waiting for test transaction db...
Waiting for test db...
Waiting for test transaction db...
Waiting for test db...
Waiting for test db...
Waiting for test transaction db...
Waiting for test db...
Waiting for test transaction db...
Waiting for test transaction db...
Waiting for test db...
Test transaction db is healthy
Starting migrations for test transactions DB.
Running migrations for localtransactiondb
Test test db is healthy
Running migrations for localtestdb
Ran migrations for localtransactiondb
Ran migrations for localtestdb
Running seeds on /Users/jessestorbeck/Desktop/testsite123/experiments/meow
Finished running all migrations. Shutting down database containers.
Finished building all experiment workers
updating docker-compose.dev.yml
Writing out front-end config
Building API
Building server
Error: Command failed: docker build -t server:latest pushkin/front-end
#0 building with "desktop-linux" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context: 59B 0.0s done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 366B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/node:20.2
#3 DONE 1.0s

#4 [1/8] FROM docker.io/library/node:20.2@sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96
#4 CACHED

#5 [internal] load build context
#5 transferring context: 3.63MB 0.3s done
#5 DONE 0.5s

#6 [2/9] COPY ./public /usr/src/app/public
#6 DONE 0.1s

#7 [3/9] COPY ./src /usr/src/app/src
#7 DONE 0.2s

#8 [4/9] COPY .yalc /usr/src/app/.yalc/
#8 DONE 0.1s

#9 [5/9] COPY ./experiments.js /usr/src/app/src/
#9 DONE 0.1s

#10 [6/9] COPY ./package.json ./yarn.lock ./yalc.lock ./craco.config.js /usr/src/app/
#10 DONE 0.1s

#11 [7/9] WORKDIR /usr/src/app
#11 DONE 0.0s

#12 [8/9] RUN yarn install
#12 1.146 yarn install v1.22.19
#12 1.591 [1/4] Resolving packages...
#12 3.571 [2/4] Fetching packages...
#12 42.79 info There appears to be trouble with your network connection. Retrying...
#12 75.83 info There appears to be trouble with your network connection. Retrying...
#12 108.8 info There appears to be trouble with your network connection. Retrying...
#12 142.6 info There appears to be trouble with your network connection. Retrying...
#12 184.2 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
#12 184.2 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#12 184.2 error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.0.tgz: ESOCKETTIMEDOUT".
#12 ERROR: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1
------
 > [8/9] RUN yarn install:
1.146 yarn install v1.22.19
1.591 [1/4] Resolving packages...
3.571 [2/4] Fetching packages...
42.79 info There appears to be trouble with your network connection. Retrying...
75.83 info There appears to be trouble with your network connection. Retrying...
108.8 info There appears to be trouble with your network connection. Retrying...
142.6 info There appears to be trouble with your network connection. Retrying...
184.2 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
184.2 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
184.2 error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.0.tgz: ESOCKETTIMEDOUT".
------
Dockerfile:10
--------------------
   8 |     
   9 |     WORKDIR /usr/src/app
  10 | >>> RUN yarn install
  11 |     RUN apt-get update && apt-get install -y netcat
  12 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1

    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:511:28)
    at maybeClose (node:internal/child_process:1098:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:511:28)
    at Pipe.<anonymous> (node:net:335:12) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'docker build -t server:latest pushkin/front-end',
  stdout: '',
  stderr: '#0 building with "desktop-linux" instance using docker driver\n' +
    '\n' +
    '#1 [internal] load .dockerignore\n' +
    '#1 transferring context: 59B 0.0s done\n' +
    '#1 DONE 0.0s\n' +
    '\n' +
    '#2 [internal] load build definition from Dockerfile\n' +
    '#2 transferring dockerfile: 366B done\n' +
    '#2 DONE 0.0s\n' +
    '\n' +
    '#3 [internal] load metadata for docker.io/library/node:20.2\n' +
    '#3 DONE 1.0s\n' +
    '\n' +
    '#4 [1/8] FROM docker.io/library/node:20.2@sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96\n' +
    '#4 CACHED\n' +
    '\n' +
    '#5 [internal] load build context\n' +
    '#5 transferring context: 3.63MB 0.3s done\n' +
    '#5 DONE 0.5s\n' +
    '\n' +
    '#6 [2/9] COPY ./public /usr/src/app/public\n' +
    '#6 DONE 0.1s\n' +
    '\n' +
    '#7 [3/9] COPY ./src /usr/src/app/src\n' +
    '#7 DONE 0.2s\n' +
    '\n' +
    '#8 [4/9] COPY .yalc /usr/src/app/.yalc/\n' +
    '#8 DONE 0.1s\n' +
    '\n' +
    '#9 [5/9] COPY ./experiments.js /usr/src/app/src/\n' +
    '#9 DONE 0.1s\n' +
    '\n' +
    '#10 [6/9] COPY ./package.json ./yarn.lock ./yalc.lock ./craco.config.js /usr/src/app/\n' +
    '#10 DONE 0.1s\n' +
    '\n' +
    '#11 [7/9] WORKDIR /usr/src/app\n' +
    '#11 DONE 0.0s\n' +
    '\n' +
    '#12 [8/9] RUN yarn install\n' +
    '#12 1.146 yarn install v1.22.19\n' +
    '#12 1.591 [1/4] Resolving packages...\n' +
    '#12 3.571 [2/4] Fetching packages...\n' +
    '#12 42.79 info There appears to be trouble with your network connection. Retrying...\n' +
    '#12 75.83 info There appears to be trouble with your network connection. Retrying...\n' +
    '#12 108.8 info There appears to be trouble with your network connection. Retrying...\n' +
    '#12 142.6 info There appears to be trouble with your network connection. Retrying...\n' +
    '#12 184.2 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".\n' +
    '#12 184.2 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\n' +
    '#12 184.2 error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.0.tgz: ESOCKETTIMEDOUT".\n' +
    '#12 ERROR: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1\n' +
    '------\n' +
    ' > [8/9] RUN yarn install:\n' +
    '1.146 yarn install v1.22.19\n' +
    '1.591 [1/4] Resolving packages...\n' +
    '3.571 [2/4] Fetching packages...\n' +
    '42.79 info There appears to be trouble with your network connection. Retrying...\n' +
    '75.83 info There appears to be trouble with your network connection. Retrying...\n' +
    '108.8 info There appears to be trouble with your network connection. Retrying...\n' +
    '142.6 info There appears to be trouble with your network connection. Retrying...\n' +
    '184.2 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".\n' +
    '184.2 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\n' +
    '184.2 error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.0.tgz: ESOCKETTIMEDOUT".\n' +
    '------\n' +
    'Dockerfile:10\n' +
    '--------------------\n' +
    '   8 |     \n' +
    '   9 |     WORKDIR /usr/src/app\n' +
    '  10 | >>> RUN yarn install\n' +
    '  11 |     RUN apt-get update && apt-get install -y netcat\n' +
    '  12 |     \n' +
    '--------------------\n' +
    'ERROR: failed to solve: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1\n'
}