empiricaly / empirica

Open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
https://empirica.ly/
Apache License 2.0
44 stars 8 forks source link

empirica export does not work in WSL2 or Linux #299

Closed ChillyWillyGH closed 1 year ago

ChillyWillyGH commented 1 year ago

Is there an existing issue for this?

What happened?

On both WSL2 (in Windows 10) and Linux (Amazon Linux 2 EC2 Instance), empirica export does not work.

It gets to DBG Started Tajriba server addr=:0 port=41513 and then just hangs.

I tried this both with the experiment I'm working on, and a stock experiment.

For the stock experiment, I simply did: empirica create test cd test empirica export

And still stuck on the line above.

Steps To Reproduce

In WSL2 or Linux (Amazon Linux 2):

empirica create test cd test empirica export

Empirica Version

Version: v1.3.1
SHA:     bce7ea3
Branch:  main
Time:    2023-04-30T08:37:49Z

What OS are you seeing the problem on?

Linux, Windows

What browser are you seeing the problem on?

No response

Relevant log output

2023-05-08T13:59:47.114498Z TRC Configuration config={"Auth":{"Production":false,"ServiceRegistrationToken":"0123456789123456","Users":[{"createdAt":"0001-01-01T00:00:00Z","id":"","name":"Nicolas","username":"username"}]},"Log":{"ForceTTY":false,"JSON":false,"Level":"trace","ShowLine":false},"Production":false,"Server":{"Addr":":0","Production":false},"Store":{"File":"/home/will/dev/semin/baseline/.empirica/local/tajriba.json","Metadata":null,"UseMemory":false,"compression":"NoCompression","format":"JSON"}}
2023-05-08T13:59:47.114959Z DBG store: started
2023-05-08T13:59:47.1149802Z DBG runtime: started
2023-05-08T13:59:47.1155779Z TRC runtime: global created glbl={"createdAt":"2023-05-07T20:26:22.0690517-05:00","createdByID":"01GZWFEZKMERHDKZW7BJMRXNZ1","id":"01GZWFEZKNM3JF5GWP8V0F1QMZ","kind":"global","name":"global"}
2023-05-08T13:59:47.1165254Z DBG Started Tajriba server addr=:0 port=33777

Anything else?

No response

Code of Conduct

npaton commented 1 year ago

I pushed a fix for this in the latest release. Try to empirica upgrade inside your project.

malsobay commented 1 year ago

@npaton I'm having the same issue on an AWS Ubuntu instance, even after upgrading.

Empirica version

Version: v1.3.2
SHA:     a1c7ead
Branch:  main
Time:    2023-05-14T11:24:08Z

Relevant logs

2023-05-16T18:12:55.419567259Z TRC Configuration config={"Auth":{"Production":false,"ServiceRegistrationToken":"0123456789123456","Users":[{"createdAt":"0001-01-01T00:00:00Z","id":"","name":"Nicolas","username":"username"}]},"Log":{"ForceTTY":false,"JSON":true,"Level":"trace","ShowLine":false},"Production":false,"Server":{"Addr":":0","Production":false},"Store":{"File":"/home/ubuntu/llm_negotiation/.empirica/local/tajriba.json","Metadata":null,"UseMemory":false,"compression":"NoCompression","format":"JSON"}}
2023-05-16T18:12:55.421130534Z DBG store: started
2023-05-16T18:12:55.421168911Z DBG runtime: started
2023-05-16T18:12:55.423795063Z TRC runtime: global created glbl={"createdAt":"2023-05-16T17:44:16.107788845Z","createdByID":"01H0JTKAFB7SB0CK805M12Y230","id":"01H0JTKAFB7SB0CK805PZAJ58E","kind":"global","name":"global"}
2023-05-16T18:12:55.424401736Z DBG Started Tajriba server addr=:0 port=34089
npaton commented 1 year ago

@malsobay You ran empirica upgrade at the root of your project, right? Can you also rm -rf .empirica/local/export and try again. Thanks!

malsobay commented 1 year ago

Yes, I updated at the root. I just tried your suggestion, and it's still stuck as before.

ChillyWillyGH commented 1 year ago

Hm same, still does not work for me on WSL2. I tried

rm .empirica/local/tajriba.json
empirica upgrade
empirica #started to create a new tajriba.json
empirica export

output of empirica version:

SHA:     a1c7ead
Branch:  main
Time:    2023-05-14T11:24:08Z

Client:  1.3.2
Server:  1.3.2
malsobay commented 1 year ago

@npaton As another data point, this doesn't work for me on macOS Ventura [13.3.1 (a) (22E772610a)] either, with the same behavior as the other platforms.

npaton commented 1 year ago

I think I found the issue. I will push an update as soon as I find the time.

npaton commented 1 year ago

It should be fixed in the latest release. If you wouldn't mind helping me test whether the upgrade will work "the simple way" first, and if not, I am adding instruction for the clean update below.

The simple way:

curl https://install.empirica.dev | sh

Then try to export from your project. If that fails, next, run:

empirica upgrade --global

Try exporting. If that does not work, try:

On macOS:

rm -rf $HOME/.local/share/empirica
rm -rf "$HOME/Library/Application Support/empirica"

On Linux:

rm -rf $HOME/.local/share/empirica

Try to export. If that still fails ( šŸ¤¦ ), try:

empirica upgrade --global

If all fails, let me know. Otherwise, please tell me how far you had to go to get it to work. It's hard to know exactly in what state everyone's machine is. There was a bug in how empirica upgraded itself and it created a bit of a mess. My apologies!

Release notes: https://github.com/empiricaly/empirica/releases/tag/%40empirica%2Fcore%401.3.3

malsobay commented 1 year ago

Works for me on Ubuntu! The install script failed, so I had to run empirica upgrade --global, and then empirica export worked. Thanks, @npaton !

ChillyWillyGH commented 1 year ago

Hi there, sorry I hadn't been looking at this for a few days.

Yes, it worked for me on WSL2 (Ubuntu 20 on Windows 10)!

I did empirica upgrade --global followed by empirica export

Thanks @npaton!