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

maplibre v4 raises a CORS error in our examples #8551

Closed
Tracked by #8541
chrisgervang opened this issue Feb 27, 2024 · 6 comments
Closed
Tracked by #8541

maplibre v4 raises a CORS error in our examples #8551

chrisgervang opened this issue Feb 27, 2024 · 6 comments

Comments

@chrisgervang
Copy link
Collaborator

chrisgervang commented Feb 27, 2024

Might have been introduced with maplibre/maplibre-gl-js#3233, but need investigation.

Expected

  • positron basemap style should load without issue in our examples

Actual

Screen Shot 2024-02-27 at 2 12 00 PM

@chrisgervang
Copy link
Collaborator Author

I'm noticing this in v3 as well actually. @alasarr @felixpalmer, is there something we need to configure in the Carto style or in how we use maplibre going forward?

@felixpalmer
Copy link
Collaborator

@chrisgervang that maplibre PR is pretty huge, could you elaborate as to why you think that PR introduces the issue?

@chrisgervang
Copy link
Collaborator Author

I'm actually seeing it in #8555 as well, which is using v3. It suggests this big PR isn't the cause. It's hard to believe we're the first to have this issue, but searching maplibre doesn't return a lot to do with CORS errors.

@HarelM
Copy link
Contributor

HarelM commented Mar 7, 2024

I was able to get the tiles when using https://maplibre.org/maputnik/, which uses version 4 of maplibre, so I'm not sure maplibre is to blame here.
The linked PR is about the communication between the worker and main thread and has little to do with CORS.
Is it possible that this is a real CORS issue somehow? although I can't reproduce it in Maputnik, so I don't know if this can be said about real CORS issue.
In any case, if there's anything I can shed light on, let me know, I'm super excited that you are using our latest versions.
Keep up the good work!

@chrisgervang
Copy link
Collaborator Author

The issue had been difficult to reproduce today... and then I remembered I might have had a VPN on. The CORS error consistently appears while on my VPN.

For posterity, I disabled my VPN, disabled cacheing in DevTools, tested with examples/get-started/pure-js/maplibre and examples/gallery/src/maplibre-overlay.html, and have gone through each version of Maplibre v2.4.0, v3.0.0-v3.6.0, v3.6.1, v3.6.2, v4.0, and v4.1 (the latest) without seeing CORS errors.

I think that confirms a VPN can CORS errors (maybe that was common knowledge).

@chrisgervang
Copy link
Collaborator Author

What I failed to mention earlier is CORS wasn't the only issue I noticed.. I also noticed a rendering issue in Maplibre where tiles aren't rendering correctly - they "checkerboard" while navigating. I thought this was related to CORS, but now I've confirmed it's actually a regression in our interleaved rendering mode.

interleaved.mp4

I'll open up an issue for this with a repro.

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

3 participants