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

Failed to initialize WebGL in Firefox #5362

Open
marcjulian opened this issue Jan 15, 2025 · 11 comments
Open

Failed to initialize WebGL in Firefox #5362

marcjulian opened this issue Jan 15, 2025 · 11 comments
Labels
bug Something isn't working need more info Further information is requested

Comments

@marcjulian
Copy link

marcjulian commented Jan 15, 2025

Issue

Noticed that the map is not rendered in Firefox with the latest deps

  • maplibre-gl 5.0.0
  • @maplibre/ngx-maplibre-gl 18.2.0

The following error is printed to the console

Failed to create WebGL context: WebGL creation failed: 
* tryNativeGL (FEATURE_FAILURE_CGL_FBO)
* Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)

ERROR Error: {"requestedAttributes":{"antialias":false,"preserveDrawingBuffer":false,"powerPreference":"high-performance","failIfMajorPerformanceCaveat":false,"desynchronized":false,"alpha":true,"depth":true,"stencil":true,"premultipliedAlpha":true},"statusMessage":"WebGL creation failed: \n* tryNativeGL (FEATURE_FAILURE_CGL_FBO)\n* Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)","type":"webglcontextcreationerror","message":"Failed to initialize WebGL"}

Image

Reproduction

Open the ngx-maplibre-gl (https://maplibre.org/ngx-maplibre-gl/) docs in Firefox and the map is not rendered on the home/examples page.

Same error occurs also on https://maplibre.org/maplibre-gl-js/docs/. (Perhaps this issue should be moved to maplibre-gl repo)

Environment

Firefox 134.0.1 (aarch64)
macOS Sequoia 15.2

@marcjulian marcjulian added the bug Something isn't working label Jan 15, 2025
@marcjulian
Copy link
Author

Seems to be no issue on Firefox Android 134.0

@HarelM
Copy link
Collaborator

HarelM commented Jan 15, 2025

Is it working with a previous version?
Might be related to changes made in maplibre-gl.
Can you check the maplibre.org and examples there (to see if this is related to the wrapper or to the core library)?

@marcjulian
Copy link
Author

Yes downgrading to the previous version worked in my app.

  • maplibre-gl 4.7.1
  • @maplibre/ngx-maplibre-gl 18.1.4

maplibre.org (https://maplibre.org/maplibre-gl-js/docs/) and examples are also effected. My guess its the core library.

Image

@HarelM
Copy link
Collaborator

HarelM commented Jan 15, 2025

Probably a combination of firefox, webgl 2 and macOS...
Can you check what's the latest version of the 5.0 prereleases that does work?
I tend to say that this is related to:

Can check if version 5.0.0-pre.9 is working?

@HarelM HarelM transferred this issue from maplibre/ngx-maplibre-gl Jan 15, 2025
@marcjulian
Copy link
Author

Yes, I can confirm 5.0.0-pre.9 works and the error appears with 5.0.0-pre.10.

@HarelM
Copy link
Collaborator

HarelM commented Jan 15, 2025

@0xFA11 can you take a look at this reported issue?

@0xFA11
Copy link
Contributor

0xFA11 commented Jan 15, 2025

I think I could take a look at this.

Just to clarify, this is on Windows, with Firefox and at latest 5.0.0 release but doesn't happen in 5.0.0-pre.9?
This link on Windows on Firefox works just fine for me: https://maplibre.org/ngx-maplibre-gl/demo/display-map
Can we get more specific repro steps?

@HarelM
Copy link
Collaborator

HarelM commented Jan 15, 2025

Not exactly:
Firefox 134.0.1 (aarch64)
macOS Sequoia 15.2

@0xFA11
Copy link
Contributor

0xFA11 commented Jan 15, 2025

I'm on M1 Max, Sequoia 15.2, Firefox 134.0.1 and this link still works fine for me locally: https://maplibre.org/ngx-maplibre-gl/demo/display-map

Image

@HarelM
Copy link
Collaborator

HarelM commented Jan 15, 2025

I'm getting an OK results as well on my M2 mac with the above firefox version:

Image

@marcjulian you'll need to dig into it, maybe some firefox configuration issue on your end?

@HarelM HarelM added the need more info Further information is requested label Jan 15, 2025
@marcjulian
Copy link
Author

I tried the following links again on my M3 mac in Firefox and couldn't reproduce the error again.

Also tried to reproduce in my app with the 5.0.0 version and it works without any issues.

For some reason the error doesn't reproduce and I haven't changed any settings in Firefox. I will try to reproduce the same condition in which the error first appeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants