-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Can't render a simple map example on Android Chrome #3437
Comments
@gvieiradot Do you see anything in your phone's web browser's console? |
How can I open the Console in mobile chrome? |
I had the same issue on latest Chrome, Mac: Version 56.0.2924.87 (64-bit). Solution: I had disabled hardware acceleration in Chrome settings for some other reason. Re-enabling it made WebGL work again. |
I have the same issue using a Samsung Galaxy S6 on BrowserStack. Android: 5.0.2 When I visit https://www.mapbox.com/mapbox-gl-js/example/check-for-support/ |
I noticed that on the Note 4 Chrome browser on BrowserStack too. http://mapbox.github.io/mapbox-gl-supported/diagnostics.html doesn't seem to indicate any issues: |
I have the same problem on android devices. on the first moment I see map background, and after that showing only text layer with labels. Android ver. / Chrome ver.: https://www.dropbox.com/s/wtlfskbfu1guqeh/IMAGE%202017-06-21%2012%3A37%3A51.jpg?dl=0 |
I can also confirm we are experiencing issues of this kind. Same errors as mentioned by others here.
|
FWIW (and possibly not related to the original issue; posting here in case it helps someone finding this via Google) I was running into similar issues in IE11 in a VM, but then I realised the following option was being passed to the
This will cause MapboxGL to throw the "Failed to initialize WebGL" error if running on a particularly rubbish platform. |
Any new updates about this issue? |
Also requesting an update. Seeing as Adroid 5 has a relatively large market share, it must surely impact a lot of users, and be a high priority? |
same issue, map tiles not rendering, but text and markers show, on android (kindle fire) |
Noting that this issue was reported on a both a Galaxy S6 and Galaxy Tab 3 for both Chrome and the Samsung "browser." |
@danswick How about Asus Zenfone 5? |
I have this issue with puppeteer, which is headless chrome for desktop (MacOS X in my case). But headless chrome claims it supports WebGL https://bugs.chromium.org/p/chromium/issues/detail?id=617551 TypeError: Cannot read property 'resize' of undefined
|
@stereobooster I've run GL JS with puppeteer without issues, maybe it's something to do with third-party libraries like react-mapbox-gl from your trace? |
@mourner but error originates from |
Yes your example works on my machine without any problems. Thanks @mourner I posted issue to |
I believe this is happen after the first release of this year. Last year version it is working just fine. Either the mapbox gl or the mobile browsers that is the issue |
Just to add another data point I tested this in Chrome 62.0.3202.4 on Android 7.1.2 and it's working fine for me. |
Just to add on here. My coworker and I both have Late 2016 MacBook Pros w/ intel iris 550 for graphics. Chrome v65 64-bit works fine for me, for her it says the usual "failed to initialize webgl". She then can load the page in safari and it works perfectly. I can confirm this block of could alerts that WebGL isnt supported when run in her browser:
For me I needed to enable the hardware acceleration setting in her Chrome settings, and relaunch the browser. This is unfortunate UX, but I can for people viewing our client's project, catch the thrown WebGL error from MapBoxGL and instruct the users to enable hardware acceleration. I will note, I still think there is some underlying bug. Because other coworkers have MapBoxGL render in their version of chrome (still version 65, 64-bit) w/o explicitly enabling hardware acceleration. |
Android v5
|
Hello, UP !!! I'm encountering the same issue. Map color appears for a fraction of a second after which I only get street names on a grey background. |
We are seeing similar issues on some Android tablets (at least Acer Iconia & Moto C Plus). Either the map is immediately completely white except for the labels or it exhibits this behavior when zooming out a bit. Here's a video showing the behavior with Acer Iconia device and official Mapbox streets example: |
Same issue spotted here with an Android Phone using latest version of MapboxGL.
I can see the country delimitation flash and then disappear. I tried some default style What bother me the most is that there is no logs / error, so I cannot display the classic "your browser is not supported" message to my users. With an older version of Chrome on the same version of Android, it work as expected:
So to recap my findings:
Hope this can help 👌 |
They just gonna let Android 7 users declined so that this issue is not relevant anymore. |
@Altiano What do you mean? |
My first reaction looking at the screenshots here is that something's going wrong with the stencil buffer, because both the "background" and "symbol" layers are drawing correctly -- and those are two layer types that don't use the stencil buffer. The other layer type that doesn't use the stencil buffer is "circle". Could someone with a device that reproduces the problem try adding a circle layer to the map (a la https://www.mapbox.com/mapbox-gl-js/example/data-driven-circle-colors/ although it doesn't have to be data-driven)? My hunch is that the circle layer will render correctly. If that's true, it's evidence we should be looking for difference in the stencil implementations, although I still wouldn't know what exactly to look for. |
Oops, I didn't notice on my first pass through the comments that this reproduces on the BrowserStack Galaxy S6 image -- I can test and reproduce there. And, indeed, circle layers draw just fine. I will investigate further. |
Yep, I can see this even on a Galaxy S8 with Android 8 when running a PWA. When the app starts the map works just fine but if I switch to another app and go back to the running app after, say, several hours the map often shows as in the attached picture. Closing the app and restarting it always fixes the problem. Not sure if this helps but just thought to bring it up. |
It turned out to be a depth buffer issue rather than a stencil buffer issue. We have a proposed fix at #7471 -- please give it a try if you have a chance! It's a workaround that shouldn't be necessary, but is easy to do, and it fixes the rendering problem on the BrowserStack Galaxy S6 Chrome image I've been using for reproduction. Hearing back from more of you will help us understand how complete a fix it is. For your convenience if you haven't set up a gl-js build environment before, you can use a packaged version I made with the fix here: |
@trupples I mean Android 4.1.x |
@ChrisLoer I tried the packaged version on the Acer Iconia device and the map now seems to work correctly! When zooming out a lot it could take some time for the new tiles to show up, but I never saw the blank background issue. I will continue monitoring the situation with the Galaxy S8 since with that device it took some time to repro the issue. In any case, looks really promising so far. Thanks for looking into this! 👏 |
Great! I also confirmed the fix worked on the BrowserStack Note 4 Chrome image. I merged #7471 so I'm going to mark this fixed -- if you're still seeing the rendering issues after the fix, please let us know! (there were a lot of problems reported on this issue, I suspect some of them were actually separate issues). |
mapbox-gl.js version: 0.26.0
Chrome version: 53.0
Android version: 4.1.1
Device: Galaxy X
Steps to Trigger Behavior
Expected Behavior
Open on my device with no errors;
Actual Behavior
When I try to open via Android Chrome the map imagery crashes. I can see it for some milliseconds and then it crashes, leaving only the labels;
At my computer it work just great.
The text was updated successfully, but these errors were encountered: