mapbox / mapbox/mapbox-gl-js

Map does not print in Chrome headless

Open
#12,192 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs investigation :mag:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 2.9.2

**browser**: Chrome current stable (headless), on Windows 10

### Steps to Trigger Behavior

1. Create a page with a map
2. Launch Chrome in headless mode and have it print that page

### Expected Behavior

See a map

### Actual Behavior

No map, just the Mapbox logo, scale and copyright notice.

The map renders fine in Firefox and Chrome in a window. It will never print in Firefox (with or without `preserveDrawingBuffer`). And it will never print in headless Chrome, with or without `--disable-gpu` and/or `--use-gl=swiftshader`. I get this message from Chrome a few times:

```
[.WebGL-000030DA00397800]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported mapbox-gl-js 2.9.2 case: print a page containing a map in current stable Chrome headless on Windows 10, with and without the listed GPU flags. Compare the result with normal Chrome and Firefox, and use successful map output in headless Chrome as the completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.