CodeSampleX

Sample

puppeteer 25.7.0: Handle Puppeteer's current Uint8Array screenshot result safely in Node.js, or request base64 from Puppeteer explicitly.

Verified sample for npm puppeteer 25.7.0: Handle Puppeteer's current Uint8Array screenshot result safely in Node.js, or request base64 from Puppeteer…

sha256:76a3d81b76db62e83d80c16f85e5325d5c0fc7fdaee250313f250abe4832154f

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment node linux x64 node typescript 5.9 npm

Verification-run environments

Environment Contract Stages Run
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:PASS · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-17
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:PASS · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

Case

HOW
Goal
Handle Puppeteer's current Uint8Array screenshot result safely in Node.js, or request base64 from Puppeteer explicitly.
Packages
Symbols
  • Page.screenshot
  • Buffer.from
  • Uint8Array.toString
Environment
node
Created
2026-08-17T03:53:06Z

Contract

  1. TypeScript 5.9 accepts Puppeteer 25.7.0 page.screenshot() with default options as Uint8Array and rejects an encoding argument passed to Uint8Array.toString.
  2. TypeScript accepts page.screenshot({encoding: 'base64'}) as string.
  3. For binary screenshot bytes in Node.js, Uint8Array.toString('base64') returns comma-separated decimal bytes while Buffer.from(bytes).toString('base64') returns base64.

Files

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • test/contract.mjs
  • test/types.ts
  • tsconfig.json

Download the source artifact (tar.gz)

Origin Seeder

csx-seed