Apify Debug Bundle
Overview
Collect all diagnostic information needed to troubleshoot failed Actor runs and prepare Apify support tickets. Pulls run metadata, logs, dataset samples, and environment info into a single bundle so a support engineer (or you) can diagnose the failure without live access to your account.
Prerequisites
apify-client installed
APIFY_TOKEN configured
- A failed or problematic run ID to investigate
Authentication
All API calls authenticate with the APIFY_TOKEN as a Bearer header
(Authorization: Bearer $APIFY_TOKEN), and the SDK reads the same token from
process.env.APIFY_TOKEN. Get the token from the Apify Console under
Settings → Integrations → Personal API tokens. Never commit it — the bundle
script redacts any local .env before packaging, and the platform auto-redacts
secrets inside run logs.
Instructions
The workflow has four steps. The skeleton below is enough to run it; each step's
full implementation lives in implementation.md.
Investigate the failed run — pull run summary, dataset stats, and the log
tail via the SDK. The core call:
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.run(runId).get();
const log = await client.run(runId).log().get();
Create the debug bundle — run apify-debug-bundle.sh <RUN_ID>. It
collects environment info, run details, log, a 5-item dataset sample,
key-value store keys, a redacted .env, and platform health, then packages
everything into a timestamped .tar.gz. Full script in
implementation.md.
Compare against a good run (optional) — diff a successful and failed run
field-by-field to spot the delta (compareRuns(successId, failId)).
Live-tail a running Actor (optional) — stream logs when the final log is
not yet available.
For copy-pasteable code for every step, see
implementation.md.
Output
A single timestamped tarball, apify-debug-YYYYMMDD-HHMMSS.tar.gz, containing:
| File |
Contents |
environment.txt |
Node/npm versions, installed Apify packages, CLI version |
run-details.json |
Run status, options, stats, usage, cost |
run-log.txt |
Full run log (secrets auto-redacted by the platform) |
dataset-sample.json |
First 5 dataset items |
kv-store-keys.json |
Key-value store key listing |
env-redacted.txt |
Local .env with all values redacted |
platform-health.json |
Apify platform health snapshot |
Attach the tarball directly to an Apify support ticket.
Sensitive Data Handling
Always redact before sharing:
- API tokens (
apify_api_*)
- Proxy passwords
- PII (emails, names, IPs)
- Custom environment variables
Safe to include:
- Run IDs, Actor IDs, dataset IDs
- Error messages and stack traces
- Run configuration (memory, timeout)
- Platform health status
Escalation Path
- Check run log for stack trace
- Compare with a successful run
- Check Apify Status for outages
- Create debug bundle
- Submit to Apify Support with bundle attached
Error Handling
| Issue |
Cause |
Solution |
Run not found |
Invalid run ID or expired |
Unnamed runs expire after 7 days |
Log unavailable |
Run still in progress |
Wait for completion or stream live |
| Empty dataset |
Actor produced no output |
Check failedRequestHandler in code |
| High CU usage |
Memory too high or slow execution |
Reduce memory, optimize code |
Examples
Four worked scenarios — a plain FAILED run, an "it worked yesterday"
regression diff, an empty-dataset investigation, and live-tailing a hung run —
are in examples.md. The quickest path:
export APIFY_TOKEN="apify_api_..."
./apify-debug-bundle.sh abc123DEF # → apify-debug-20260717-142530.tar.gz
tar -xzf apify-debug-*.tar.gz && tail -40 apify-debug-*/run-log.txt
See examples.md for the full walkthroughs, including
reading the comparison output and interpreting a live tail.
Resources
Next Steps
For rate limit issues, see the apify-rate-limits skill.
Source: jeremylongshore/claude-code-plugins-plus-skills → skills/.curated/apify-debug-bundle/SKILL.md
Also appears in: jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/apify-pack/skills/apify-debug-bundle/SKILL.md
1---2name: apify-debug-bundle3description: "| Collect Apify debug evidence for support tickets and troubleshooting. Use when an Actor run has failed, is stuck, or produced empty output and you need to gather run metadata, logs, dataset samples, and environment info before opening a support ticket. Trigger with \"apify debug\", \"apify support bundle\", \"collect apify logs\", \"apify diagnostic\", \"apify run failed why\"."4allowed-tools: "Read, Bash(curl:*), Bash(npm:*), Bash(node:*), Bash(tar:*), Bash(apify:*), Grep"5category: engineering-core6source_repo: jeremylongshore/claude-code-plugins-plus-skills7source_path: "skills/.curated/apify-debug-bundle/SKILL.md"8source_url: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/HEAD/skills/.curated/apify-debug-bundle/SKILL.md9metadata:10 source: https://skillmd.com/skills/thedixitjain/apify-debug-bundle11---1213# Apify Debug Bundle1415## Overview1617Collect all diagnostic information needed to troubleshoot failed Actor runs and prepare Apify support tickets. Pulls run metadata, logs, dataset samples, and environment info into a single bundle so a support engineer (or you) can diagnose the failure without live access to your account.1819## Prerequisites2021- `apify-client` installed22- `APIFY_TOKEN` configured23- A failed or problematic run ID to investigate2425## Authentication2627All API calls authenticate with the `APIFY_TOKEN` as a Bearer header28(`Authorization: Bearer $APIFY_TOKEN`), and the SDK reads the same token from29`process.env.APIFY_TOKEN`. Get the token from the Apify Console under30**Settings → Integrations → Personal API tokens**. Never commit it — the bundle31script redacts any local `.env` before packaging, and the platform auto-redacts32secrets inside run logs.3334## Instructions3536The workflow has four steps. The skeleton below is enough to run it; each step's37full implementation lives in [implementation.md](references/implementation.md).38391. **Investigate the failed run** — pull run summary, dataset stats, and the log40 tail via the SDK. The core call:4142 ```typescript43 const client = new ApifyClient({ token: process.env.APIFY_TOKEN });44 const run = await client.run(runId).get();45 const log = await client.run(runId).log().get();46 ```47482. **Create the debug bundle** — run `apify-debug-bundle.sh <RUN_ID>`. It49 collects environment info, run details, log, a 5-item dataset sample,50 key-value store keys, a redacted `.env`, and platform health, then packages51 everything into a timestamped `.tar.gz`. Full script in52 [implementation.md](references/implementation.md).53543. **Compare against a good run** (optional) — diff a successful and failed run55 field-by-field to spot the delta (`compareRuns(successId, failId)`).56574. **Live-tail a running Actor** (optional) — stream logs when the final log is58 not yet available.5960For copy-pasteable code for every step, see61[implementation.md](references/implementation.md).6263## Output6465A single timestamped tarball, `apify-debug-YYYYMMDD-HHMMSS.tar.gz`, containing:6667| File | Contents |68|------|----------|69| `environment.txt` | Node/npm versions, installed Apify packages, CLI version |70| `run-details.json` | Run status, options, stats, usage, cost |71| `run-log.txt` | Full run log (secrets auto-redacted by the platform) |72| `dataset-sample.json` | First 5 dataset items |73| `kv-store-keys.json` | Key-value store key listing |74| `env-redacted.txt` | Local `.env` with all values redacted |75| `platform-health.json` | Apify platform health snapshot |7677Attach the tarball directly to an Apify support ticket.7879## Sensitive Data Handling8081**Always redact before sharing:**8283- API tokens (`apify_api_*`)84- Proxy passwords85- PII (emails, names, IPs)86- Custom environment variables8788**Safe to include:**8990- Run IDs, Actor IDs, dataset IDs91- Error messages and stack traces92- Run configuration (memory, timeout)93- Platform health status9495## Escalation Path96971. Check run log for stack trace982. Compare with a successful run993. Check [Apify Status](https://status.apify.com) for outages1004. Create debug bundle1015. Submit to [Apify Support](https://console.apify.com/support) with bundle attached102103## Error Handling104105| Issue | Cause | Solution |106|-------|-------|----------|107| `Run not found` | Invalid run ID or expired | Unnamed runs expire after 7 days |108| `Log unavailable` | Run still in progress | Wait for completion or stream live |109| Empty dataset | Actor produced no output | Check `failedRequestHandler` in code |110| High CU usage | Memory too high or slow execution | Reduce memory, optimize code |111112## Examples113114Four worked scenarios — a plain `FAILED` run, an "it worked yesterday"115regression diff, an empty-dataset investigation, and live-tailing a hung run —116are in [examples.md](references/examples.md). The quickest path:117118```bash119export APIFY_TOKEN="apify_api_..."120./apify-debug-bundle.sh abc123DEF # → apify-debug-20260717-142530.tar.gz121tar -xzf apify-debug-*.tar.gz && tail -40 apify-debug-*/run-log.txt122```123124See [examples.md](references/examples.md) for the full walkthroughs, including125reading the comparison output and interpreting a live tail.126127## Resources128129- [Full implementation walkthrough](references/implementation.md)130- [Worked examples](references/examples.md)131- [Actor Run API](https://docs.apify.com/api/v2/actor-run-get)132- [Run Log API](https://docs.apify.com/api/v2)133- [Apify Support Portal](https://console.apify.com/support)134135## Next Steps136137For rate limit issues, see the `apify-rate-limits` skill.138139---140141**Source:** [`jeremylongshore/claude-code-plugins-plus-skills`](https://github.com/jeremylongshore/claude-code-plugins-plus-skills) → `skills/.curated/apify-debug-bundle/SKILL.md`142143**Also appears in:** `jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/apify-pack/skills/apify-debug-bundle/SKILL.md`