# Send your Device Lab results

> How to email a Device Lab result to OpenPWA: which JSON to copy from the harness page, which fields it holds, and what to add to the message.

import LabProvenance from '@components/lab/LabProvenance.astro';

Send Device Lab results from your device to `re-openpwa@inbox.withretide.com`. The harness pages have no upload form. The lab app's script, [lab.js](/lab/device-tests/lab.js), says in its header that it sends no data (no fetch, no beacon, no analytics) and copies its results to the clipboard only when you tap the copy button. Copy the JSON and paste it into your email.

## Copy the JSON

On the lab app ([/lab/device-tests/](/lab/device-tests/)) the button is **Copy results as JSON**; on the T7 permission app ([/lab/device-tests/t7/perm/](/lab/device-tests/t7/perm/)) it is **Copy JSON**. Both try the clipboard first. If the clipboard is refused, both select the JSON in the text box so you can copy it from the menu. Copy once per context: once in the Safari tab and once in the Home Screen app.

## What the JSON contains

The lab app exports these JSON fields, defined in [lab.js](/lab/device-tests/lab.js).

| Field | What it holds |
|---|---|
| `collectedAt` | the time of the read, from `new Date().toISOString()` |
| `page`, `referrer` | the page URL and `document.referrer` |
| `userAgent` | `navigator.userAgent` |
| `context` | a label that starts with `app` or `browser tab`, followed by the matched `display-mode` and the value of `navigator.standalone` |
| `navigator.standalone`, `displayModes` | the standalone flag and each `display-mode` media query |
| `viewport` | inner size, screen size, pixel ratio, orientation and safe-area insets |
| `declarations` | the manifest link, apple-touch-icon, `theme-color` and status-bar meta tags the page declares |
| `featureDetects` | which APIs exist in this context |
| `serviceWorker` | the registration result, whether a worker controls the page, and what the worker exposes |
| `push` | whether a subscription exists and its `endpointHost` |
| `storageMarker` | the test marker in localStorage, IndexedDB and a cookie |
| `lastEventLocalStorage`, `recentEventsIndexedDB` | the last notification event the page kept in localStorage, and up to ten recent events the worker recorded in IndexedDB |

The T7 permission app's JSON holds `test`, `page`, `userAgent`, `state` (notification permission, the push permission state of the registration and of `window.pushManager`, display modes, `navigator.standalone`, the controlling worker and the registration scopes), `lastRequest` and an event `log`.

Both apps record a push subscription as its endpoint host only, for example `web.push.apple.com`, taken with `new URL(endpoint).host`. The endpoint path and the subscription keys are not in either JSON.

## Write the email

Put the test id, the OS version and the build in the subject, for example `T7 iOS 18.6.2 22G100`. Include the following in the body.

1. the environment block (see the [iPhone and iPad guide](/lab/guides/iphone-ipad/)), with no serial number, UDID, Apple Account or phone number;
2. the result fields for each test: result, what you observed, values, screenshot names, time taken;
3. the JSON, one block per context;
4. the hashes of the harness files you loaded, or the lines that differ from the harness v1 hash list, [/lab/harness/v1/SHA256SUMS.txt](/lab/harness/v1/SHA256SUMS.txt).

Redact screenshots before you attach them, as the [naming and redaction guide](/lab/guides/screenshots-and-naming/) describes: no other apps' content, no identifiers. Say for each test whether it ran from fresh state, with the icon removed and website data cleared.

<LabProvenance locale="en" />