Skip to main content

Catch browser deprecation reports before a feature breaks

Send a Reporting-Endpoints header that names Buggregator as the endpoint called default. The browser then sends its deprecation reports there: a warning that your page uses a feature that is going away. Intervention reports come too. They show in Buggregator next to your CSP violations, with the message, the file, line and column.

Steps

1. Start Buggregator

bash
docker run --pull always \
  -p 127.0.0.1:8000:8000 \
  ghcr.io/buggregator/server:latest

2. Name the default endpoint

Browsers send deprecation and intervention reports only to the endpoint named default. shop is the project; leave out /shop for the default project.

http
Reporting-Endpoints: default="http://localhost:8000/csp/shop"

To get CSP violations through the same header, add a second endpoint and point your policy at it:

http
Reporting-Endpoints: buggregator="http://localhost:8000/csp/shop", default="http://localhost:8000/csp/shop"
Content-Security-Policy: default-src 'self'; report-to buggregator

3. Serve the page from https or localhost

The Reporting API works only when both your app and the Buggregator address are https or localhost. Over plain http, for example http://buggregator:8000 from Docker, the browser drops the reports without an error.

4. Check it with curl

Send one deprecation report by hand to see how it looks.

bash
curl -X POST http://localhost:8000/csp/shop \
  -H 'Content-Type: application/reports+json' \
  -d '[{"type":"deprecation","url":"https://shop.test/","age":3,"user_agent":"Mozilla/5.0","body":{"id":"PrefixedStorageInfo","message":"window.webkitStorageInfo is deprecated.","sourceFile":"https://shop.test/app.js","lineNumber":2,"columnNumber":5}}]'

5. Read the reports

Open http://localhost:8000 and pick CSP reports in the menu. Each request is one event. The event page shows each report with its message, the file with line and column, and the raw report.

Why it works

The Reporting API is how the browser tells a site about problems it found on the page. It POSTs them as a JSON list, application/reports+json, to the endpoints you named. Buggregator reads that list, so one request with a CSP violation and a deprecation becomes one event with two reports.

Checked on with Buggregator v2.13.0

Setup in 60 seconds

No registration. No account. Start it and point your app at it.

1

Start Buggregator

One file, installed with one command. The web UI opens on port 8000. Prefer containers? Use the Docker tab.

$ curl -fsSL https://raw.githubusercontent.com/buggregator/server/master/scripts/install.sh | sh
$ HTTP_ADDR=127.0.0.1:8000 \
  SMTP_ADDR=127.0.0.1:1025 \
  VAR_DUMPER_ADDR=127.0.0.1:9912 \
  MONOLOG_ADDR=127.0.0.1:9913 \
  PROXY_ADDR=127.0.0.1:8080 \
  ~/.local/bin/buggregator

The script picks the file for your CPU: Intel/AMD or ARM.

One file for Linux, macOS and Windows, about 40 MB. Nothing else to install.

This run line keeps it on this computer. Without the *_ADDR settings it listens on all network interfaces

Rather not run a script? Download the file yourself

Runs on Windows, macOS and Linux, on Intel/AMD and ARM.

Prefer not to do it yourself? Your AI agent can set Buggregator up for you