OpenSourceBrain / OSBv2

An updated version of the Open Source Brain platform
https://www.v2.opensourcebrain.org/
Other
11 stars 6 forks source link

NWBE standalone fails on 1st (and 2nd) load, works after that #820

Closed pgleeson closed 9 months ago

pgleeson commented 10 months ago

Direct URLs with the current preferred format (http://nwbexplorer.opensourcebrain.org/?nwbfile=...), e.g. as used on https://github.com/OpenSourceBrain/DANDIArchiveShowcase/blob/main/validation_folder/README.md#000399 should open the nwb file directly in NWBE.

What I'm finding is on a new session, the first load of the link goes to the notebook control centre/hub (where you go for "Manage running workspaces"), the second load goes to the NWE homepage, and the third load goes to the correct page. Every subsequent link after that goes to the correct page (hence making it difficult to debug/notice the issue during testing, but new users may well give up before the 3rd try).

When a user is logged in on OSB, the step of the control hub is skipped, but the NWBE homepage shows first time around.

@etowett Is this something you could look into? If you can replicate this and see if there is any subsequent error message on the cluster it would be great.

filippomc commented 9 months ago

For now we make sure http://nwbexplorer.opensourcebrain.org/nwbfile= works. Then we work more to make http://nwbexplorer.opensourcebrain.org?nwbfile= work while still keeping the old version working.

filippomc commented 9 months ago

Works: https://nwbexplorer.v2dev.opensourcebrain.org/nwbfile=https://github.com/openworm/WormsenseLab_ASH/raw/main/test_data/07-06-25-1.nwb

SimaoBolota-MetaCell commented 9 months ago

Tested successfully @filippomc

NWB Explorer works standalone See below:

following the URL - https://nwbexplorer.v2dev.opensourcebrain.org/nwbfile=https://github.com/openworm/WormsenseLab_ASH/raw/main/test_data/07-06-25-1.nwb - leads to NWB Explorer loaded with the correct data

Image

Image

While following a different URL - https://nwbexplorer.v2dev.opensourcebrain.org/nwbfile=https://github.com/openworm/WormsenseLab_ASH/raw/main/test_data/09-07-15-2.nwb - leads to NWB explorer loaded with different data

Image

Image

pgleeson commented 9 months ago

This is not working on live. http://nwbexplorer.opensourcebrain.org/nwbfile=https://api.dandiarchive.org/api/assets/14df4c07-159e-471c-afae-7af889d01539/download/ goes to the nwbe homepage on first load for a logged out user (also for logged in user). In fact it never loads after 2nd, 3rd try. That's the currently preferred form of the url, isn't it @filippomc?

filippomc commented 9 months ago

I works with https://nwbexplorer.v2.opensourcebrain.org/nwbfile=https://api.dandiarchive.org/api/assets/14df4c07-159e-471c-afae-7af889d01539/download/, so there's something about the redirect.

It looks like parameters are not passed through:

$ wget http://nwbexplorer.opensourcebrain.org/nwbfile=https://api.dandiarchive.org/api/assets/14df4c07-159e-471c-afae-7af889d01539/download/
--2023-12-07 18:07:45--  http://nwbexplorer.opensourcebrain.org/nwbfile=https://api.dandiarchive.org/api/assets/14df4c07-159e-471c-afae-7af889d01539/download/
Resolving nwbexplorer.opensourcebrain.org (nwbexplorer.opensourcebrain.org)... 130.211.205.161
Connecting to nwbexplorer.opensourcebrain.org (nwbexplorer.opensourcebrain.org)|130.211.205.161|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://nwbexplorer.v2.opensourcebrain.org/ [following]
--2023-12-07 18:07:45--  https://nwbexplorer.v2.opensourcebrain.org/
filippomc commented 9 months ago

fixed. Also works with http://nwbexplorer.opensourcebrain.org?nwbfile=https://api.dandiarchive.org/api/assets/14df4c07-159e-471c-afae-7af889d01539/download/

pgleeson commented 9 months ago

Great! Links on DANDI Archive site as well as https://github.com/OpenSourceBrain/DANDIArchiveShowcase/blob/main/validation_folder/README.md working nicely now...

I did notice though that if you load 2 different nwb files in separate tabs as an anonymous user with nwbe, they seem to both use the same kernel, so the nwbfile info in the second gets put into the first, i.e. the undeerlying model in both is the same.. Feature or bug..?

filippomc commented 9 months ago

yes the second one will overload the first. Can make so the two go on separate pods, but that would require to dedicate resources for another pod. Is this something we want or do we say we support only one file at a time?