Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm range request fails on Firefox #1932

Open
Fil opened this issue Jan 6, 2025 · 5 comments
Open

wasm range request fails on Firefox #1932

Fil opened this issue Jan 6, 2025 · 5 comments

Comments

@Fil
Copy link
Contributor

Fil commented Jan 6, 2025

What happens?

If you type this query into shell.duckdb.org:
SELECT bbox FROM read_json('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson');

on Firefox, you get a "failed range request" error.

See observablehq/framework#1886

To Reproduce

Open Firefox to shell.duckdb.org, and type this query:
SELECT bbox FROM read_json('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson');

Browser/Environment:

Firefox 133.0.3 (aarch64)

Device:

Macbook Air

DuckDB-Wasm Version:

@duckdb/[email protected]

DuckDB-Wasm Deployment:

https://shell.duckdb.org/

Full Name:

Fil Rivière

Affiliation:

Observable

@ROBBYCHERPES2
Copy link

Go

@fkauker-fsq
Copy link

I'd suggest trying

SELECT bbox FROM read_json_auto('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson');

source: https://motherduck.com/blog/getting-started-gis-duckdb/

@Fil
Copy link
Contributor Author

Fil commented Jan 15, 2025

@fkauker-fsq exact same error

Image

@fkauker-fsq
Copy link

Ok reproduced it. There is also another message if you run it twice!

Image

@carlopi
Copy link
Collaborator

carlopi commented Jan 17, 2025

Thanks for raising. I do reproduce.

Problem here is a non-trivial problem where the request being sent out of the browser has this headers:

Range	bytes=0-16383
Accept-Encoding	gzip, deflate, br, zstd, identity

and comes back a resource with those headers:

content-length	16384
content-encoding	gzip

Problem is that the resource here should have length 16384 AFTER decompression, while here it's 16384 pre-decompression and 125KB afterwards.

Given there is a browser in the middle, I would think here it's the server that it's not compliant, I would need to check how to detect this and fall back to a simpler strategy (ideally warning of current problem).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants