Debugging

Check your work

deploy (preview) → check_app with steps → app_logs for browser errors → fix with a patch → promote

check_app({ app: "standup", preview: "standup-fix", width: 390, steps: [
  { action: "fill", selector: "#name", value: "Ada" },
  { action: "select", selector: "#mood", value: "Happy" },
  { action: "click", selector: "text=Post" },
  { action: "expect", selector: ".post", count: 1 },
  { action: "expect", selector: ".post .mood", text: "Happy" }
]})

More on check_app

Errors from the browser

When a browser opens an app's page (a request with Sec-Fetch-Dest: document), OpenBelt puts a small error reporter first in its <head>, after a <link rel="modulepreload" href="/sdk.js"> that loads the SDK beside the page's own scripts. It sends uncaught errors, unhandled rejections, console.error calls, scripts and stylesheets that fail to load, and failed SDK calls to POST /_log on the app's host, and each becomes an error line in the app log:

browser error on /standup/: Uncaught TypeError: list is null (app.js:12:5) (Chrome 141, version 3f2a9c1e0b7d, live)

Trace ids and logs

QuestionLook at
Did my deploy go live?The deploy_app result's version, and x-openbelt-version on the page
Why is the page blank?check_app, then app_logs for browser errors and 404s
Is it broken for people?app_logs: their browsers' errors, with the page, file:line and version
Did the write happen?collection_list, or app_logs with the write's trace
What did this request do?x-openbelt-trace from the response, then app_logs or the platform log

Source: docs/debugging.md on GitHub