pushkin-consortium / pushkin-exptemplates-basic

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

Bump client and api #45

Closed jessestorbeck closed 12 months ago

jessestorbeck commented 1 year ago

Bumping the versions of the client and api as a result of merging pushkin-consortium/pushkin-client#39 and pushkin-consortium/pushkin-api#20. This can be approved after new versions of the api and client are published to npm.

jkhartshorne commented 1 year ago

@ellissc -- can you please check this, see if it works for you in local deploy?

jkhartshorne commented 1 year ago

@ayang21 -- please also check.

jessestorbeck commented 1 year ago

@jkhartshorne @ellissc @ayang21

There are going to be yarn install errors with install experiment testing this branch of the exp template and install site testing pushkin-consortium/pushkin-sitetemplate-basic#8 BEFORE new versions of pushkin-client and pushkin-api are published to npm. Also the instructions here for running local versions of the client and api assume you've already successfully run install site and install experiment.

I think the way around this would be to publish your local versions of the client and api as the instructions suggest, but yalc add the client and api to the templates themselves BEFORE running install site and install experiment. You'd also need to make the necessary edits to the package.json files in the local versions of the site template and exp template prior to install site and install experiment. I can give it a shot and see if that works.

jessestorbeck commented 1 year ago

@ayang21 @ellissc -- You can disregard my earlier comment now that the latest client and api are published. You can test this PR and https://github.com/pushkin-consortium/pushkin-sitetemplate-basic/pull/8 as normal by cloning the repos, checking out the relevant branches, and choosing the path option when running install site and install experiment.

I've just tested this myself, and it's working as expected.

ellissc commented 1 year ago

I've tried this a few times and the site works and loads, but when I click on the experiment, it gives the same error:

Uncaught runtime errors: ERROR Network Error AxiosError@http://localhost/static/js/bundle.js:80647:18 handleError@http://localhost/static/js/bundle.js:81944:14

Is this an issue with the experiment template? I tested both PRs with the above instructions. Is there a specific CLI version I should be using as well?

jessestorbeck commented 1 year ago

@ellissc -- I'm using v3.4.0, which is the latest version of the CLI. Can you view an experiment if you just select the latest release of the basic site/exp template?

ellissc commented 1 year ago

I got a few errors. I first got a docker error, so I upgraded and restarted docker / my computer. Then, after restarting, I got another error message mentioning docker and yalc when running pushkin prep after installing the latest basic site release:

Error: Command failed: docker build -t server:latest pushkin/front-end

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 64c88f2a-8ef4-4cb0-9654-b5649c836dc9::hdyyr3qimg40th7ly71v62dxn: "/.yalc": not found

I attached the full error log. error_log.txt

jessestorbeck commented 1 year ago

@ellissc Surprisingly, I think I actually know what's happening. Try v5.0.1 of the basic exp template. There was a bug that worked its way into v5.0.2 where things would appear to work if you gave your experiment a name you'd previously used with another Pushkin site, but otherwise there would be a yalc-related error.

Also did you try the development versions of the site and exp templates again after updating Docker? I am not sure what's causing the uncaught runtime errors, but maybe the Docker update could've done something to fix it.

ayang21 commented 1 year ago

while running pushkin prep, I reached this eroor down below:

image

versions: node@20.5.0 pushkin@3.4.0

ellissc commented 1 year ago

@ellissc Surprisingly, I think I actually know what's happening. Try v5.0.1 of the basic exp template. There was a bug that worked its way into v5.0.2 where things would appear to work if you gave your experiment a name you'd previously used with another Pushkin site, but otherwise there would be a yalc-related error.

@jessestorbeck v5.0.1 runs in the CLI without any issues and localhost works, but the actual experiment still gives the same network error as before:

ERROR
Network Error
AxiosError@http://localhost/static/js/bundle.js:77550:18
handleError@http://localhost/static/js/bundle.js:78847:14

Also did you try the development versions of the site and exp templates again after updating Docker? I am not sure what's causing the uncaught runtime errors, but maybe the Docker update could've done something to fix it.

I just tried the development versions: prep and start work, but it gives the above network error after starting the new experiment. I tried all of these with new, unique names each time.

jessestorbeck commented 1 year ago

@ellissc, I'm assuming in each case, you tried something like pushkin stop; pushkin prep; pushkin start after getting that network error? In my case, I get something that looks slightly different (like this) the first time I try to run a new experiment, but then it resolves after pushkin stop; pushkin prep; pushkin start (even if I edit the experiment). I'm still not sure why this is happening.

ellissc commented 1 year ago

@jessestorbeck I was able to get the development & non-development versions to work now. I'd been going through those commands each time: pushkin stop; pushkin kill; pushkin armageddon and pushkin prep; pushkin start and get the network error each time, even when I try it with a new instance. What worked was adding--nocache to the pushkin start call.

I'm not sure I understand it fully, but it seems that the cache from the dev versions were causing the issues with the non-dev (and vice-versa)? Anyways, I was able to get the development versions to work and test them out.

jessestorbeck commented 12 months ago

@ellissc, since I only get the error the first time I try to run a newly added experiment, I thought you might be getting it each time because you're clearing out Docker after each attempt. That is actually not the case, since I tried running kill and armageddon after running the experiment successfully, and it still worked after running prep and start again.

Could you approve the changes so I can at least merge this update, and hopefully we can figure out this issue at some point soon?