lilab-bcb/cirrocumulus

"Unable to retrieve datasets" error for Static Website server method

jwtobias opened this issue · 9 comments

I am trying to use your instructions for making a static website deployment on an Ubuntu 20.04 server. When I visit my site, I see the cirrocumulus home page, but I get an "Unable to retrieve datasets" banner in the lower left (screenshot attached).

I think I have the files I need where they should be, but here are a look into my datasets.json file and the referenced dataset that was produced by cirro prepare_data:

(base) jtobias@WS8:~/cirrocumulus/build$ cat datasets.json
[
{
"id": "hum_cbn_forCirro",
"name": "hum_cbn_forCirro",
"url": "hum_cbn_forCirro/hum_cbn_forCirro.jsonl"
}
]

(base) jtobias@WS8:~/cirrocumulus/build$ ls hum_cbn_forCirro/
hum_cbn_forCirro.jsonl hum_cbn_forCirro.jsonl.idx.json uns

Screen Shot 2021-10-08 at 11 06 01 AM

Can you please open the network tab in Chrome developer tools? This is what you should see if the page is requesting the correct datasets.json file:
Screen Shot 2021-10-08 at 11 54 20 AM
e.

Here's what I have. There's a 404 status for that file. I'm pointing my browser to https://[host]/build
Screen Shot 2021-10-08 at 12 00 12 PM

Can you try?

cd build ; npx http-server .

Then navigate to http://127.0.0.1:8080

That's a little tricky for me for this headless server. Let me see if I can do something like that via Xwindows.

Ok, that works.
Screen Shot 2021-10-08 at 12 30 28 PM

But I'm confused... How can I get my apache server to work properly?

I can point my browser directly at the datasets.json file and it shows the contents...

https://[FQDN-host]/build/datasets.json

Screen Shot 2021-10-08 at 1 00 25 PM

I have discovered a solution... If I copy the the datasets.json file to the directory above build (my web root), this seems to solve the problem.

The script seems not to be looking for that file in the build directory itself.

This will fix the issue:
mv static/js/main.c57698e7.js temp
cat temp | sed 's/\/datasets/datasets/g' > static/js/main.c57698e7.js