Open chiarch84 opened 1 year ago
Thanks for the report. Can you please check whether it works in https://radiantearth.github.io/stac-browser for your instance?
Well our instance is under authentication so I cannot load it there. But if you want to test it you can register for an EU-Login and try it: https://jeodpp.jrc.ec.europa.eu/eu/data/stac-browser/#/
In this case, I'd like to ask for the following:
1) I have the same error for version 3.0.2 and 3.0.0-rc.1. I don't remember the precise version in which it was working since it has been some time now that we've got this error but I failed to report it. 2) I think we tried it last week and had the same problem but can retry . I'll report it to you. 3) No errors in the console and all the calls to get the items are correctly performed and return the correct number of items.
Just to be sure, did you change something from the original 3.0.0 dev branch on for searching items?
So is this a potential regression of #231 ?
Search has received updates over time, yes.
Yes it seems a regression of that. I don't remember if I tested right after your workaround. For sure it has been some months now that it's not working anymore.
In the previous post I meant if the ways of retrieving items from the APIs has changed over time, e.g. if you're looking for new parameters or for children instead of items. I'm just guessing if this could be the problem or if it's probably again a problem of listener.
Yeah, there have been changes over time. The biggest issue right now is that I can't reproduce it with any of the public instances. I can't login with the EU login right now.
FYI. In this working example when clicking on a collection from the sidebar (in this case cgls_landcover
) the following request is performed -> https://explorer.digitalearth.africa/stac/collections/cgls_landcover/items?limit=12. That request is redirected (302) to https://explorer.digitalearth.africa/stac/search?collection=cgls_landcover&limit=12
Is this the correct funcionality?
This has nothing to do with STAC Browser, that seems like a server-specific behavior.
And do you think the field context.page = 0 would make the difference to make this browsing work? Since I'm trying to find differences between our STAC Browser and this example where it works, and cannot find any differences a part from this field which we currently don't return.
The context extension is not used by the sidebar. I assume it's still some kind of race condition, but it's hard to reproduce and fix.
@m-mohr I've managed to reproduce this using latest revision on main branch. The issue seems to be related to apiCatalogPriority
config option. Using catalog https://explorer.digitalearth.africa/stac/
I ran locally two instances of stac-browser with apiCatalogPriority='childs'
and apiCatalogPriority=null
(default), respectively.
docker run -p 20011:8080 -e SB_catalogUrl="https://explorer.digitalearth.africa/stac/" -e SB_apiCatalogPriority="childs" stac-browser:v1
docker run -p 20012:8080 -e SB_catalogUrl="https://explorer.digitalearth.africa/stac/" stac-browser:v1
On the first instance (apiCatalogPriority='childs') the issue is reproducible. For instance, expanding catalog "cci_landcover" would load only the sub-catalogs tree (cci_landcover-\<YYYY>-1) but not the directly linked items. While on the second instance the full tree was loaded with both sub-catalogs and directly linked items.
I reverted the priority
related changes on src/models/stac.js:STAC.getChildren()
from the commit that introduced apiCatalogPriority
and the issue seemed gone, full tree was loaded as expected.
Hope this helps.
Thank you for the evaluation @itrnd. I believe, after my first evaluations last year, that the issue is related to loading from API endpoints in general and the fact that due to race conditions sometimes the data in the background gets overridden/erased. The prio option may only hide the behavior in some cases. Nevertheless it's good to have this documented for when someone starts to fix this.
We deployed the current stable version of STAC browser and the items are not loading in the browse menu even if correctly returned by the GET call.