Test and troubleshoot
Test your graphic on the LIGR platform. Push the draft, then open it in the dashboard code viewer. Show it on the preview overlay of a test match before you use it on air.
Dashboard code viewer
Section titled “Dashboard code viewer”Open a code graphic from your theme to inspect it in the dashboard viewer. The dashboard viewer requires a session with access to the owning organization. It provides Controls, Data, and Files, plus scenario playback and Show, Hide, and Reset.
A working version uses the current saved draft. A numbered version loads that published snapshot and its pinned files. Preview controls only change the current preview. They do not edit the published version. Use Open working version when you need the draft after inspecting a published version.
Preview on an overlay
Section titled “Preview on an overlay”After you push and publish, open a control room of a competition that uses the theme. Your graphic appears in the graphic list with its control variables. Show it on the preview overlay of a test match before you use it on air.
Inspect the payload on an overlay
Section titled “Inspect the payload on an overlay”The overlay frames your graphic in a sandbox, so the browser cannot inspect the frame from the page.
Add ?debugCodeGraphics=1 to an overlay URL to see each data message that your graphic receives.
Use one of these overlay URLs from the control room of a test match:
| URL | Where to get it |
|---|---|
…/monitoring-{key}?debugCodeGraphics=1 | Copy monitoring link |
…/preview-{key}?debugCodeGraphics=1 | Preview Link in the control room header |
- Open the overlay URL with
?debugCodeGraphics=1in a desktop browser. - Open the browser console and show messages at the Verbose level.
- Find the
[CodeGraphicIframe] payloadline withtype: 'LOAD_GRAPHIC'. It holds the full payload of the load. - Paste this listener to print each later message as an object:
addEventListener('ligr:code-graphic-payload', e => console.log(e.detail))Each event has graphicId, type, seq, and payload. type is LOAD_GRAPHIC or GRAPHIC_UPDATE.
A GRAPHIC_UPDATE payload holds only the changed surfaces. seq is the same value that your graphic receives.
The overlay reads the flag when it loads a graphic. If you add the flag to an open overlay, reload the page. The flag changes no graphic output, and it sends no network request.
Checklist
Section titled “Checklist”Check every item before you push a version for a broadcast.
- The handshake,
HELLOthroughLOAD_GRAPHIC, completes within 2 seconds. - The graphic renders correctly from
LOAD_GRAPHICalone, with no earlierGRAPHIC_UPDATE. - The graphic updates correctly on a partial
GRAPHIC_UPDATE, for example a score change with no clock change. - The graphic sends
HIDDENwithinexitDurationMsofGRAPHIC_HIDE. - The browser console shows no error across a full show and hide cycle.
- The graphic makes no network call at runtime.
- The built
dist/folder is under 10 MiB, and no file is over 5 MiB. - The
<body>background stays transparent in every state. - The animation holds 60 frames per second during show and hide.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| The frame stays blank | The entry file never sends READY, or a script error stopped it | Open the browser console. Check for a script error or a missing READY |
| The graphic never receives data | You echoed the wrong sessionId, or you never sent READY | Copy sessionId from HELLO exactly. Send READY before you expect LOAD_GRAPHIC |
| The graphic never hides | You never send HIDDEN, or exitDurationMs is shorter than your animation | Send HIDDEN when the out-animation ends. Raise exitDurationMs in the manifest |
| A message fails with a 1 MB error | A payload, usually externalData, is too large | Trim the data source. Load large assets from the bundle instead of the payload |
| Fonts do not load | A font path is absolute, or the font is missing from the bundle | Use relative paths. Ship the font file inside dist/ |
| The wrong team shows on the left | The home and away fields are swapped | sportData['1'] is the home team. sportData['2'] is the away team |
CODE_GRAPHIC_INVALID on push or publish | The manifest breaks a rule, or a file was not uploaded in the session you named | Read details[]. Each line is one problem. See The manifest |
409 LOCKED on push or publish | A person has the graphic open in the dashboard editor, or a stale lock has not expired | Read holder.userName. Wait up to 60 seconds, then retry |
404 on a theme you expect to reach | The API key belongs to another organization | Use a key of the organization that owns the theme |
| The frame is blank on the overlay but fine in the viewer | The bundle did not upload, or the entry file is missing | GET …/code-graphics/{graphicId} lists assets. Check the entry file is there |
Report a problem
Section titled “Report a problem”Use Issues and support for code graphics, SDK, and CLI reports. General app problems, including broken pages, login, and billing, go to LIGR support.