qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.65k stars 3.01k forks source link

STAC browser - relative urls not supported: Protocol "" is uknown #59406

Open ttomasz opened 2 weeks ago

ttomasz commented 2 weeks ago

What is the bug or the crash?

When STAC catalog has relative URLs to its children then the browser throws error Protocol "" is unknown.

I also see in debugging tools (F12) that it tries to make request to the URL exactly as it's presented i.e. without trying to resolve the relative URL based on URL from connection.

Steps to reproduce the issue

  1. Add connection to STAC catalog that has relative URLs e.g.: https://pub-a8cc9feb8bdc4fdf9cbf37078dc21b8e.r2.dev/catalog.json.
  2. Try to open the collection by clicking the little arrow

Versions

QGIS version3.40.0-Bratislava
QGIS code branchRelease 3.40
 
Libraries
Qt version5.15.10
Python version3.11.9
GDAL/OGR version3.10.0
PROJ version9.5.0
EPSG Registry database versionv11.016 (2024-08-31)
GEOS version3.13.0-CAPI-1.19.0
SQLite version3.47.0
PDAL version2.8.1
PostgreSQL client versionunknown
SpatiaLite version5.1.0
QWT version6.1.5
QScintilla2 version2.14.1
OS versionKDE Flatpak runtime
 
Active Python plugins
QuickOSM2.2.3
cartogram33.1.5
felt3.1.5
qgis_stac1.1.2
AnotherDXF2Shape1.3.2
GTFS_Loader1.0.0
zoom_level0.3.1
qgis-maptiler-plugin3.3.2
AnimateOsm0.3.0
processing2.12.99
db_manager0.1.20
grassprovider2.12.99
MetaSearch0.3.6

Supported QGIS version

New profile

Additional context

Relative URLs may not be recommended but they are allowed according to the specification and work in STAC Web Browser: https://radiantearth.github.io/stac-browser/#/external/pub-a8cc9feb8bdc4fdf9cbf37078dc21b8e.r2.dev/catalog.json

wonder-sk commented 2 weeks ago

Can you try with the nightly builds please? It should be already fixed by https://github.com/qgis/QGIS/pull/59199

uclaros commented 2 weeks ago

Automatic backporting to 3.40 failed though, I'll do a manual back port

github-actions[bot] commented 1 day ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.